Package ome.logic

Class ConfigImpl

  • All Implemented Interfaces:
    ome.api.IConfig, LocalConfig, ome.api.ServiceInterface, ome.system.SelfConfigurableService, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    @Transactional(readOnly=true)
    public class ConfigImpl
    extends AbstractLevel2Service
    implements org.springframework.context.ApplicationContextAware, LocalConfig
    implementation of the IConfig service interface. Also used as the main developer example for developing (stateless) ome.logic implementations. See source code documentation for more.
    Since:
    3.0-M3
    See Also:
    IConfig
    • Constructor Detail

      • ConfigImpl

        public ConfigImpl()
    • Method Detail

      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
      • setPreferenceContext

        public final void setPreferenceContext​(ome.system.PreferenceContext prefs)
        PreferenceContext setter for dependency injection.
        Parameters:
        prefs - the preference context
        See Also:
        BeanHelper.throwIfAlreadySet(Object, Object)
      • setDatabaseIdentity

        public final void setDatabaseIdentity​(DatabaseIdentity db)
      • getServiceInterface

        public final java.lang.Class<? extends ome.api.ServiceInterface> getServiceInterface()
        Specified by:
        getServiceInterface in interface ome.system.SelfConfigurableService
      • getServerTime

        public java.util.Date getServerTime()
        see IConfig.getServerTime()
        Specified by:
        getServerTime in interface ome.api.IConfig
      • getDatabaseTime

        public java.util.Date getDatabaseTime()
        see IConfig.getDatabaseTime()
        Specified by:
        getDatabaseTime in interface ome.api.IConfig
      • getConfigValue

        public java.lang.String getConfigValue​(java.lang.String key)
        see IConfig.getConfigValue(String)
        Specified by:
        getConfigValue in interface ome.api.IConfig
      • getConfigValues

        public java.util.Map<java.lang.String,​java.lang.String> getConfigValues​(java.lang.String keyRegex)
        Specified by:
        getConfigValues in interface ome.api.IConfig
      • getConfigDefaults

        public java.util.Map<java.lang.String,​java.lang.String> getConfigDefaults()
        Specified by:
        getConfigDefaults in interface ome.api.IConfig
      • getClientConfigValues

        public java.util.Map<java.lang.String,​java.lang.String> getClientConfigValues()
        Specified by:
        getClientConfigValues in interface ome.api.IConfig
      • getClientConfigDefaults

        public java.util.Map<java.lang.String,​java.lang.String> getClientConfigDefaults()
        Specified by:
        getClientConfigDefaults in interface ome.api.IConfig
      • getInternalValue

        public java.lang.String getInternalValue​(java.lang.String key)
        Description copied from interface: LocalConfig
        Provides a configuration value, ignoring the visibility of the given value.
        Specified by:
        getInternalValue in interface LocalConfig
      • setConfigValue

        @Transactional(readOnly=false)
        public void setConfigValue​(java.lang.String key,
                                   java.lang.String value)
        see IConfig.setConfigValue(String, String)
        Specified by:
        setConfigValue in interface ome.api.IConfig
      • setConfigValueIfEquals

        @Transactional(readOnly=false)
        public boolean setConfigValueIfEquals​(java.lang.String key,
                                              java.lang.String value,
                                              java.lang.String test)
                                       throws ome.conditions.ApiUsageException,
                                              ome.conditions.SecurityViolation
        see IConfig.setConfigValueIfEquals(String, String, String)
        Specified by:
        setConfigValueIfEquals in interface ome.api.IConfig
        Throws:
        ome.conditions.ApiUsageException
        ome.conditions.SecurityViolation
      • getVersion

        public java.lang.String getVersion()
        see IConfig.getVersion()
        Specified by:
        getVersion in interface ome.api.IConfig
      • getDatabaseVersion

        public java.lang.String getDatabaseVersion()
        Description copied from interface: LocalConfig
        Retrieves the newest database patch. Also functions a simple DB ping.
        Specified by:
        getDatabaseVersion in interface LocalConfig
      • getDatabaseUuid

        public java.lang.String getDatabaseUuid()
        Specified by:
        getDatabaseUuid in interface ome.api.IConfig