@Transactional public class ConfigImpl extends AbstractLevel2Service implements LocalConfig
IConfig
iQuery, iUpdate, metadata, queryFactory, sec
VERSION_REGEX
Constructor and Description |
---|
ConfigImpl() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
getClientConfigDefaults()
reads the etc/omero.properties file and returns all the key/value
pairs that are found there which match the prefix "omero.client".
|
java.util.Map<java.lang.String,java.lang.String> |
getClientConfigValues()
retrieves configuration values like
IConfig.getConfigValues(String)
but only those with the prefix "omero.client". |
java.util.Map<java.lang.String,java.lang.String> |
getConfigDefaults()
reads the etc/omero.properties file and returns all the key/value
pairs that are found there.
|
java.lang.String |
getConfigValue(java.lang.String key)
|
java.util.Map<java.lang.String,java.lang.String> |
getConfigValues(java.lang.String keyRegex)
retrieves configuration values from the backend store which match the
given regex.
|
java.util.Date |
getDatabaseTime()
|
java.lang.String |
getDatabaseUuid()
Provides the UUID for this OMERO (database) instance.
|
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()
|
java.lang.Class<? extends ServiceInterface> |
getServiceInterface() |
java.lang.String |
getVersion()
|
void |
setConfigValue(java.lang.String key,
java.lang.String value)
|
boolean |
setConfigValueIfEquals(java.lang.String key,
java.lang.String value,
java.lang.String test)
|
void |
setCurrentDetails(CurrentDetails currentDetails)
CurrentDetails setter for dependency injection. |
void |
setDatabaseIdentity(DatabaseIdentity db) |
void |
setPreferenceContext(PreferenceContext prefs)
PreferenceContext setter for dependency injection. |
void |
setSqlAction(SqlAction sql)
SqlAction setter for dependency injection. |
getBeanHelper, getExtendedMetadata, getQueryFactory, getSecuritySystem, selfConfigure, setExtendedMetadata, setQueryFactory, setQueryService, setSecuritySystem, setUpdateService
public final void setSqlAction(SqlAction sql)
SqlAction
setter for dependency injection.sql
- the SQL action instanceBeanHelper.throwIfAlreadySet(Object, Object)
public final void setPreferenceContext(PreferenceContext prefs)
PreferenceContext
setter for dependency injection.prefs
- the preference contextBeanHelper.throwIfAlreadySet(Object, Object)
public final void setCurrentDetails(CurrentDetails currentDetails)
CurrentDetails
setter for dependency injection.currentDetails
- the details of the current thread's security contextBeanHelper.throwIfAlreadySet(Object, Object)
public final void setDatabaseIdentity(DatabaseIdentity db)
public final java.lang.Class<? extends ServiceInterface> getServiceInterface()
getServiceInterface
in interface SelfConfigurableService
public java.util.Date getServerTime()
getServerTime
in interface IConfig
Date
representation of the server's own time.public java.util.Date getDatabaseTime()
getDatabaseTime
in interface IConfig
Date
representation of the database's time.public java.lang.String getConfigValue(java.lang.String key)
getConfigValue
in interface IConfig
key
- The non-null name of the desired configuration valueString
value linked to this key, possibly null if not
set.public java.util.Map<java.lang.String,java.lang.String> getConfigValues(java.lang.String keyRegex)
IConfig
getConfigValues
in interface IConfig
keyRegex
- The non-null regex of the desired configuration valuesMap
from the found keys to the linked values.public java.util.Map<java.lang.String,java.lang.String> getConfigDefaults()
IConfig
getConfigDefaults
in interface IConfig
Map
from the found keys to the linked values.public java.util.Map<java.lang.String,java.lang.String> getClientConfigValues()
IConfig
IConfig.getConfigValues(String)
but only those with the prefix "omero.client".getClientConfigValues
in interface IConfig
Map
from the found keys to the linked values.public java.util.Map<java.lang.String,java.lang.String> getClientConfigDefaults()
IConfig
getClientConfigDefaults
in interface IConfig
Map
from the found keys to the linked values.public java.lang.String getInternalValue(java.lang.String key)
LocalConfig
getInternalValue
in interface LocalConfig
public void setConfigValue(java.lang.String key, java.lang.String value)
setConfigValue
in interface IConfig
key
- The non-null name of the desired configuration valuevalue
- The String
value to assign to the given key.public boolean setConfigValueIfEquals(java.lang.String key, java.lang.String value, java.lang.String test) throws ApiUsageException, SecurityViolation
setConfigValueIfEquals
in interface IConfig
ApiUsageException
SecurityViolation
IConfig.setConfigValue(String, String)
public java.lang.String getVersion()
getVersion
in interface IConfig
IConfig.VERSION_REGEX
public java.lang.String getDatabaseVersion()
LocalConfig
getDatabaseVersion
in interface LocalConfig
public java.lang.String getDatabaseUuid()
IConfig
getDatabaseUuid
in interface IConfig
Version: 5.4.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.