Package ome.logic
Class ConfigImpl
- java.lang.Object
-
- ome.logic.AbstractLevel2Service
-
- ome.logic.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
-
-
Field Summary
-
Fields inherited from class ome.logic.AbstractLevel2Service
iQuery, iUpdate, metadata, queryFactory, readOnlyStatus, sec
-
-
Constructor Summary
Constructors Constructor Description ConfigImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
getClientConfigDefaults()
java.util.Map<java.lang.String,java.lang.String>
getClientConfigValues()
java.util.Map<java.lang.String,java.lang.String>
getConfigDefaults()
java.lang.String
getConfigValue(java.lang.String key)
seeIConfig.getConfigValue(String)
java.util.Map<java.lang.String,java.lang.String>
getConfigValues(java.lang.String keyRegex)
java.util.Date
getDatabaseTime()
seeIConfig.getDatabaseTime()
java.lang.String
getDatabaseUuid()
java.lang.String
getDatabaseVersion()
Retrieves the newest database patch.java.lang.String
getInternalValue(java.lang.String key)
Provides a configuration value, ignoring the visibility of the given value.java.util.Date
getServerTime()
seeIConfig.getServerTime()
java.lang.Class<? extends ome.api.ServiceInterface>
getServiceInterface()
java.lang.String
getVersion()
seeIConfig.getVersion()
void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
void
setConfigValue(java.lang.String key, java.lang.String value)
seeIConfig.setConfigValue(String, String)
boolean
setConfigValueIfEquals(java.lang.String key, java.lang.String value, java.lang.String test)
seeIConfig.setConfigValueIfEquals(String, String, String)
void
setCurrentDetails(CurrentDetails currentDetails)
CurrentDetails
setter for dependency injection.void
setDatabaseIdentity(DatabaseIdentity db)
void
setPreferenceContext(ome.system.PreferenceContext prefs)
PreferenceContext
setter for dependency injection.void
setSqlAction(ome.util.SqlAction sql)
SqlAction
setter for dependency injection.-
Methods inherited from class ome.logic.AbstractLevel2Service
getBeanHelper, getExtendedMetadata, getQueryFactory, getSecuritySystem, selfConfigure, setExtendedMetadata, setQueryFactory, setQueryService, setReadOnlyStatus, setSecuritySystem, setUpdateService
-
-
-
-
Method Detail
-
setSqlAction
public final void setSqlAction(ome.util.SqlAction sql)
SqlAction
setter for dependency injection.- Parameters:
sql
- the SQL action instance- See Also:
BeanHelper.throwIfAlreadySet(Object, Object)
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContext
in interfaceorg.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)
-
setCurrentDetails
public final void setCurrentDetails(CurrentDetails currentDetails)
CurrentDetails
setter for dependency injection.- Parameters:
currentDetails
- the details of the current thread's security 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 interfaceome.system.SelfConfigurableService
-
getServerTime
public java.util.Date getServerTime()
seeIConfig.getServerTime()
- Specified by:
getServerTime
in interfaceome.api.IConfig
-
getDatabaseTime
public java.util.Date getDatabaseTime()
seeIConfig.getDatabaseTime()
- Specified by:
getDatabaseTime
in interfaceome.api.IConfig
-
getConfigValue
public java.lang.String getConfigValue(java.lang.String key)
seeIConfig.getConfigValue(String)
- Specified by:
getConfigValue
in interfaceome.api.IConfig
-
getConfigValues
public java.util.Map<java.lang.String,java.lang.String> getConfigValues(java.lang.String keyRegex)
- Specified by:
getConfigValues
in interfaceome.api.IConfig
-
getConfigDefaults
public java.util.Map<java.lang.String,java.lang.String> getConfigDefaults()
- Specified by:
getConfigDefaults
in interfaceome.api.IConfig
-
getClientConfigValues
public java.util.Map<java.lang.String,java.lang.String> getClientConfigValues()
- Specified by:
getClientConfigValues
in interfaceome.api.IConfig
-
getClientConfigDefaults
public java.util.Map<java.lang.String,java.lang.String> getClientConfigDefaults()
- Specified by:
getClientConfigDefaults
in interfaceome.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 interfaceLocalConfig
-
setConfigValue
@Transactional(readOnly=false) public void setConfigValue(java.lang.String key, java.lang.String value)
seeIConfig.setConfigValue(String, String)
- Specified by:
setConfigValue
in interfaceome.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
seeIConfig.setConfigValueIfEquals(String, String, String)
- Specified by:
setConfigValueIfEquals
in interfaceome.api.IConfig
- Throws:
ome.conditions.ApiUsageException
ome.conditions.SecurityViolation
-
getVersion
public java.lang.String getVersion()
seeIConfig.getVersion()
- Specified by:
getVersion
in interfaceome.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 interfaceLocalConfig
-
getDatabaseUuid
public java.lang.String getDatabaseUuid()
- Specified by:
getDatabaseUuid
in interfaceome.api.IConfig
-
-