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 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:
      set in interface org.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:
      remove in interface org.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:
      remove in interface org.exoplatform.commons.api.settings.SettingService
    • remove

      public void remove(org.exoplatform.commons.api.settings.data.Context context)
      Specified by:
      remove in interface org.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:
      get in interface org.exoplatform.commons.api.settings.SettingService
    • save

      public void save(org.exoplatform.commons.api.settings.data.Context context)
      Specified by:
      save in interface org.exoplatform.commons.api.settings.SettingService
    • getSettingsByContext

      public 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)
      Specified by:
      getSettingsByContext in interface org.exoplatform.commons.api.settings.SettingService
    • countContextsByType

      public long countContextsByType(String contextType)
      Specified by:
      countContextsByType in interface org.exoplatform.commons.api.settings.SettingService
    • getContextNamesByType

      public List<String> getContextNamesByType(String contextType, int offset, int limit)
      Specified by:
      getContextNamesByType in interface org.exoplatform.commons.api.settings.SettingService
    • getEmptyContextsByTypeAndScopeAndSettingName

      public Set<String> getEmptyContextsByTypeAndScopeAndSettingName(String contextType, String scopeType, String scopeName, String settingName, int offset, int limit)
      Specified by:
      getEmptyContextsByTypeAndScopeAndSettingName in interface org.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:
      getContextsByTypeAndScopeAndSettingName in interface org.exoplatform.commons.api.settings.SettingService
    • countSettingsByNameAndValueAndScope

      public long countSettingsByNameAndValueAndScope(org.exoplatform.commons.api.settings.data.Scope scope, String key, String value)
    • getSettingsByContextAndScope

      public Map<String,org.exoplatform.commons.api.settings.SettingValue> getSettingsByContextAndScope(String contextType, String contextName, String scopeType, String scopeName)
      Specified by:
      getSettingsByContextAndScope in interface org.exoplatform.commons.api.settings.SettingService