@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 |
---|---|
Map<String,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".
|
Map<String,String> |
getClientConfigValues()
retrieves configuration values like
IConfig.getConfigValues(String)
but only those with the prefix "omero.client". |
Map<String,String> |
getConfigDefaults()
reads the etc/omero.properties file and returns all the key/value
pairs that are found there.
|
String |
getConfigValue(String key)
|
Map<String,String> |
getConfigValues(String keyRegex)
retrieves configuration values from the backend store which match the
given regex.
|
Date |
getDatabaseTime()
|
String |
getDatabaseUuid()
Provides the UUID for this OMERO (database) instance.
|
String |
getDatabaseVersion()
Retrieves the newest database patch.
|
String |
getInternalValue(String key)
Provides a configuration value, ignoring the visibility of the given
value.
|
Date |
getServerTime()
|
Class<? extends ServiceInterface> |
getServiceInterface() |
String |
getVersion()
|
void |
setConfigValue(String key,
String value)
|
boolean |
setConfigValueIfEquals(String key,
String value,
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 Class<? extends ServiceInterface> getServiceInterface()
getServiceInterface
in interface SelfConfigurableService
public Date getServerTime()
getServerTime
in interface IConfig
Date
representation of the server's own time.public Date getDatabaseTime()
getDatabaseTime
in interface IConfig
Date
representation of the database's time.public String getConfigValue(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 Map<String,String> getConfigValues(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 Map<String,String> getConfigDefaults()
IConfig
getConfigDefaults
in interface IConfig
Map
from the found keys to the linked values.public Map<String,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 Map<String,String> getClientConfigDefaults()
IConfig
getClientConfigDefaults
in interface IConfig
Map
from the found keys to the linked values.public String getInternalValue(String key)
LocalConfig
getInternalValue
in interface LocalConfig
public void setConfigValue(String key, 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(String key, String value, String test) throws ApiUsageException, SecurityViolation
setConfigValueIfEquals
in interface IConfig
ApiUsageException
SecurityViolation
IConfig.setConfigValue(String, String)
public String getVersion()
getVersion
in interface IConfig
IConfig.VERSION_REGEX
public String getDatabaseVersion()
LocalConfig
getDatabaseVersion
in interface LocalConfig
public String getDatabaseUuid()
IConfig
getDatabaseUuid
in interface IConfig
Version: 5.4.0-ice35-b74
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.