public interface EnvironmentAccessor
The accessor classes implementing this interface provide the way to access environment worker classes on the client side.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEnvironmentName()
Get the current environment's name.
|
java.lang.String |
getEnvironmentType()
Get the current environment's type.
|
java.lang.String |
getKeyValue(java.lang.String section,
java.lang.String key)
Getting the key value from the current environment.
|
boolean |
isCustomEnvironment()
Check if a custom environment is in use.
|
boolean |
load(java.lang.String env,
java.lang.String directory,
boolean flagNew,
java.lang.String baseKey)
Creates application defaults implementing Progress LOAD statement.
|
void |
setKeyValue(java.lang.String section,
java.lang.String key,
java.lang.String value)
Adds, modifies and deletes keys in current environment.
|
java.lang.String |
unload(java.lang.String env)
Unloads specifies environment from the current one.
|
java.lang.String |
use(java.lang.String env)
Specifies environment defaults to use in subsequent windows.
|
boolean load(java.lang.String env, java.lang.String directory, boolean flagNew, java.lang.String baseKey)
env
- The environment to create or load. Can be the registry key, initialization file.directory
- The directory path for existing initialization file or place to create
initialization file.flagNew
- If true
- the new file or registry key will be created overwriting the
possibly existed one.baseKey
- When the parameter is specified the searching is performed under the particular key
value. It is possible to specify "INI" as parameter. In this case search or creation
will be done inside initialization file specified in env parameter.true
if loaded false otherwisejava.lang.String use(java.lang.String env)
env
- The environment to load. If the parameter is empty string ("") the default
environment becomes the current one.null
if the
environment can't be found.boolean isCustomEnvironment()
java.lang.String getEnvironmentName()
java.lang.String getEnvironmentType()
void setKeyValue(java.lang.String section, java.lang.String key, java.lang.String value)
section
- The name of the section containing the key to modify.key
- The name of the key key to modify or default key if not specified.value
- The new value of the key under modification.java.lang.String getKeyValue(java.lang.String section, java.lang.String key)
section
- The name of the section containing the key to get.key
- The name of the key key to get or default key if not specified.java.lang.String unload(java.lang.String env)
env
- The environment to unload. Can be the registry or initialization file. The
environment to unload should be previously loaded by load() method.null
if the
environment can't be found.