Package org.exoplatform.settings.jpa
Class JPASettingServiceImpl
java.lang.Object
org.exoplatform.settings.jpa.JPASettingServiceImpl
- All Implemented Interfaces:
org.exoplatform.commons.api.settings.SettingService
public class JPASettingServiceImpl
extends Object
implements org.exoplatform.commons.api.settings.SettingService
Created by The eXo Platform SAS Author : eXoPlatform exo@exoplatform.com Mar
07, 2017
-
Constructor Summary
ConstructorsConstructorDescriptionJPASettingServiceImpl(SettingsDAO settingsDAO, SettingContextDAO settingContextDAO, SettingScopeDAO settingScopeDAO, EventManagerImpl<JPASettingServiceImpl, org.exoplatform.commons.api.settings.data.SettingData> eventManager, org.exoplatform.commons.api.persistence.DataInitializer dataInitializer) JPASettingServiceImpl must depend on DataInitializer to make sure data structure is created before initializing it -
Method Summary
Modifier and TypeMethodDescriptionlongcountContextsByType(String contextType) longcountSettingsByNameAndValueAndScope(org.exoplatform.commons.api.settings.data.Scope scope, String key, String value) org.exoplatform.commons.api.settings.SettingValue<?> get(org.exoplatform.commons.api.settings.data.Context context, org.exoplatform.commons.api.settings.data.Scope scope, String key) getContextNamesByType(String contextType, int offset, int limit) List<org.exoplatform.commons.api.settings.data.Context> getContextsByTypeAndScopeAndSettingName(String contextType, String scopeType, String scopeName, String settingName, int offset, int limit) getEmptyContextsByTypeAndScopeAndSettingName(String contextType, String scopeType, String scopeName, String settingName, int offset, int limit) Map<org.exoplatform.commons.api.settings.data.Scope, Map<String, org.exoplatform.commons.api.settings.SettingValue<String>>> getSettingsByContext(org.exoplatform.commons.api.settings.data.Context context) getSettingsByContextAndScope(String contextType, String contextName, String scopeType, String scopeName) voidremove(org.exoplatform.commons.api.settings.data.Context context) voidremove(org.exoplatform.commons.api.settings.data.Context context, org.exoplatform.commons.api.settings.data.Scope scope) voidremove(org.exoplatform.commons.api.settings.data.Context context, org.exoplatform.commons.api.settings.data.Scope scope, String key) voidsave(org.exoplatform.commons.api.settings.data.Context context) void
-
Constructor Details
-
JPASettingServiceImpl
public JPASettingServiceImpl(SettingsDAO settingsDAO, SettingContextDAO settingContextDAO, SettingScopeDAO settingScopeDAO, EventManagerImpl<JPASettingServiceImpl, org.exoplatform.commons.api.settings.data.SettingData> eventManager, org.exoplatform.commons.api.persistence.DataInitializer dataInitializer) JPASettingServiceImpl must depend on DataInitializer to make sure data structure is created before initializing it
-
-
Method Details
-
set
public void set(org.exoplatform.commons.api.settings.data.Context context, org.exoplatform.commons.api.settings.data.Scope scope, String key, org.exoplatform.commons.api.settings.SettingValue<?> value) - Specified by:
setin interfaceorg.exoplatform.commons.api.settings.SettingService
-
remove
public void remove(org.exoplatform.commons.api.settings.data.Context context, org.exoplatform.commons.api.settings.data.Scope scope, String key) - Specified by:
removein interfaceorg.exoplatform.commons.api.settings.SettingService
-
remove
public void remove(org.exoplatform.commons.api.settings.data.Context context, org.exoplatform.commons.api.settings.data.Scope scope) - Specified by:
removein interfaceorg.exoplatform.commons.api.settings.SettingService
-
remove
public void remove(org.exoplatform.commons.api.settings.data.Context context) - Specified by:
removein interfaceorg.exoplatform.commons.api.settings.SettingService
-
get
public org.exoplatform.commons.api.settings.SettingValue<?> get(org.exoplatform.commons.api.settings.data.Context context, org.exoplatform.commons.api.settings.data.Scope scope, String key) - Specified by:
getin interfaceorg.exoplatform.commons.api.settings.SettingService
-
save
public void save(org.exoplatform.commons.api.settings.data.Context context) - Specified by:
savein interfaceorg.exoplatform.commons.api.settings.SettingService
-
getSettingsByContext
public Map<org.exoplatform.commons.api.settings.data.Scope,Map<String, getSettingsByContextorg.exoplatform.commons.api.settings.SettingValue<String>>> (org.exoplatform.commons.api.settings.data.Context context) - Specified by:
getSettingsByContextin interfaceorg.exoplatform.commons.api.settings.SettingService
-
countContextsByType
- Specified by:
countContextsByTypein interfaceorg.exoplatform.commons.api.settings.SettingService
-
getContextNamesByType
- Specified by:
getContextNamesByTypein interfaceorg.exoplatform.commons.api.settings.SettingService
-
getEmptyContextsByTypeAndScopeAndSettingName
public Set<String> getEmptyContextsByTypeAndScopeAndSettingName(String contextType, String scopeType, String scopeName, String settingName, int offset, int limit) - Specified by:
getEmptyContextsByTypeAndScopeAndSettingNamein interfaceorg.exoplatform.commons.api.settings.SettingService
-
getContextsByTypeAndScopeAndSettingName
public List<org.exoplatform.commons.api.settings.data.Context> getContextsByTypeAndScopeAndSettingName(String contextType, String scopeType, String scopeName, String settingName, int offset, int limit) - Specified by:
getContextsByTypeAndScopeAndSettingNamein interfaceorg.exoplatform.commons.api.settings.SettingService
-
countSettingsByNameAndValueAndScope
-
getSettingsByContextAndScope
public Map<String,org.exoplatform.commons.api.settings.SettingValue> getSettingsByContextAndScope(String contextType, String contextName, String scopeType, String scopeName) - Specified by:
getSettingsByContextAndScopein interfaceorg.exoplatform.commons.api.settings.SettingService
-