Package omero.api
Interface _IConfigOperations
-
- All Superinterfaces:
_ServiceInterfaceOperations
- All Known Subinterfaces:
IConfig
- All Known Implementing Classes:
_IConfigDisp
,_IConfigTie
,ConfigI
public interface _IConfigOperations extends _ServiceInterfaceOperations
Access to server configuration. These methods provide access to the state and configuration of the server and its components (e.g. the database). However, it should not be assumed that two subsequent calls to a proxy for this service will go to the same server due to clustering. Not all possible server configuration is available through this API. Some values (such as DB connection info, ports, etc.) must naturally be set before this service is accessible. Manages synchronization of the various configuration sources internally. It is therefore important that as far as possible all configuration changes take place via this interface and not, for example, directly via java.util.prefs.Preferences. Also used as the main developer example for developing (stateless) ome.api interfaces. See source code documentation for more.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
getClientConfigDefaults_async(AMD_IConfig_getClientConfigDefaults __cb, Ice.Current __current)
Reads the etc/omero.properties file and returns all the key/value pairs that are found there which match the prefix omero.client.void
getClientConfigValues_async(AMD_IConfig_getClientConfigValues __cb, Ice.Current __current)
Retrieves configuration values likegetConfigValues
but only those with the prefix omero.client.void
getConfigDefaults_async(AMD_IConfig_getConfigDefaults __cb, Ice.Current __current)
Reads the etc/omero.properties file and returns all the key/value pairs that are found there.void
getConfigValue_async(AMD_IConfig_getConfigValue __cb, java.lang.String key, Ice.Current __current)
Retrieves a configuration value from the backend store.void
getConfigValues_async(AMD_IConfig_getConfigValues __cb, java.lang.String keyRegex, Ice.Current __current)
Retrieves configuration values from the backend store which match the given regex.void
getDatabaseTime_async(AMD_IConfig_getDatabaseTime __cb, Ice.Current __current)
Checks the database for its time using a SELECT statement.void
getDatabaseUuid_async(AMD_IConfig_getDatabaseUuid __cb, Ice.Current __current)
Provides the UUID for this OMERO (database) instance.void
getServerTime_async(AMD_IConfig_getServerTime __cb, Ice.Current __current)
Checks the current server for its time.void
getVersion_async(AMD_IConfig_getVersion __cb, Ice.Current __current)
Provides the release version.void
setConfigValue_async(AMD_IConfig_setConfigValue __cb, java.lang.String key, java.lang.String value, Ice.Current __current)
Sets a configuration value in the backend store.void
setConfigValueIfEquals_async(AMD_IConfig_setConfigValueIfEquals __cb, java.lang.String key, java.lang.String value, java.lang.String test, Ice.Current __current)
CallssetConfigValue
if and only if the configuration property is currently equal to the test argument.
-
-
-
Method Detail
-
getVersion_async
void getVersion_async(AMD_IConfig_getVersion __cb, Ice.Current __current) throws ServerError
Provides the release version. OMERO-internal values will be in the form Major.minor.patch, starting with the value 4.0.0 for the 4.0 release, Spring 2009. Customized values should begin with a alphabetic sequence followed by a hyphen: ACME-0.0.1 and any build information should follow the patch number also with a hyphen: 4.0.0-RC1. These values will be removed bygetVersion
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getConfigValue_async
void getConfigValue_async(AMD_IConfig_getConfigValue __cb, java.lang.String key, Ice.Current __current) throws ServerError
Retrieves a configuration value from the backend store. Permissions applied to the configuration value may cause aSecurityViolation
to be thrown.- Parameters:
__cb
- The callback object for the operation.key
- The non-null name of the desired configuration value__current
- The Current object for the invocation.- Throws:
ApiUsageException
- if the key is null or invalid.SecurityViolation
- if the value for the key is not readable.ServerError
-
getConfigValues_async
void getConfigValues_async(AMD_IConfig_getConfigValues __cb, java.lang.String keyRegex, Ice.Current __current) throws ServerError
Retrieves configuration values from the backend store which match the given regex. Any configuration value which would throw an exception on being loaded is omitted.- Parameters:
__cb
- The callback object for the operation.keyRegex
- The non-null regex of the desired configuration values__current
- The Current object for the invocation.- Throws:
ServerError
-
getConfigDefaults_async
void getConfigDefaults_async(AMD_IConfig_getConfigDefaults __cb, Ice.Current __current) throws ServerError
Reads the etc/omero.properties file and returns all the key/value pairs that are found there. Since this file is not to be edited its assumed that these values are in the public domain and so there's no need to protect them.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getClientConfigValues_async
void getClientConfigValues_async(AMD_IConfig_getClientConfigValues __cb, Ice.Current __current) throws ServerError
Retrieves configuration values likegetConfigValues
but only those with the prefix omero.client.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getClientConfigDefaults_async
void getClientConfigDefaults_async(AMD_IConfig_getClientConfigDefaults __cb, Ice.Current __current) throws ServerError
Reads the etc/omero.properties file and returns all the key/value pairs that are found there which match the prefix omero.client.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
setConfigValue_async
void setConfigValue_async(AMD_IConfig_setConfigValue __cb, java.lang.String key, java.lang.String value, Ice.Current __current) throws ServerError
Sets a configuration value in the backend store. Permissions applied to the configuration value may cause aSecurityViolation
to be thrown. If the value is null or empty, then the configuration will be removed in all writable configuration sources. If the configuration is set in a non-modifiable source (e.g. in a property file on the classpath), then a subsequent call togetConfigValue
will return that value.- Parameters:
__cb
- The callback object for the operation.key
- The non-null name of the desired configuration valuevalue
- The string value to assign to the given key.__current
- The Current object for the invocation.- Throws:
ApiUsageException
- if the key is null or invalid.SecurityViolation
- if the value is not writable.ServerError
-
setConfigValueIfEquals_async
void setConfigValueIfEquals_async(AMD_IConfig_setConfigValueIfEquals __cb, java.lang.String key, java.lang.String value, java.lang.String test, Ice.Current __current) throws ServerError
CallssetConfigValue
if and only if the configuration property is currently equal to the test argument. If the test is null or empty, then the configuration property will be set only if missing.- Parameters:
__cb
- The callback object for the operation.key
-__current
- The Current object for the invocation.- Throws:
ApiUsageException
SecurityViolation
ServerError
-
getDatabaseUuid_async
void getDatabaseUuid_async(AMD_IConfig_getDatabaseUuid __cb, Ice.Current __current) throws ServerError
Provides the UUID for this OMERO (database) instance. To make imports and exports function properly, only one physical database should be active with a given instance UUID. All other copies of the database with that UUID are invalid as soon as one modification is made. This value is stored in the configuration table under the key omero.db.uuid.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getDatabaseTime_async
void getDatabaseTime_async(AMD_IConfig_getDatabaseTime __cb, Ice.Current __current) throws ServerError
Checks the database for its time using a SELECT statement.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
InternalException
- though any call can throw an InternalException it is more likely that this can occur while contacting the DB. An exception here most likely means (A) a temporary issue with the DB or (B) a SQL dialect issue which must be corrected by the Omero team.ServerError
-
getServerTime_async
void getServerTime_async(AMD_IConfig_getServerTime __cb, Ice.Current __current) throws ServerError
Checks the current server for its time. This value may be variant depending on whether the service is clustered or not.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
-