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.Boolean |
getBooleanKeyValue(java.lang.String section,
java.lang.String key,
java.lang.Boolean defValue)
Getting the boolean key value from the current environment.
|
java.lang.String |
getCurrentPrinterName()
Get the name of the current printer on the client side.
|
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.
|
java.lang.String |
getOperatingSystem()
If there is still no match, then any
os.name with the
lowercase text "unix" will return "UNIX" and any os.name
with the lowercase text "windows" will return "WIN32". |
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 |
setDefaultEnvironment(java.lang.String iniFile)
Sets the default environment to a stanza ini file, overwriting any default registry for
WIN32.
|
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.Boolean getBooleanKeyValue(java.lang.String section,
java.lang.String key,
java.lang.Boolean defValue)
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.defValue - The default value, to be returned when the value does not exist
in the environment.defValue if the value
does not exist in the environment.void setDefaultEnvironment(java.lang.String iniFile)
iniFile - The name of the ini file backing the stanzas.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.java.lang.String getOperatingSystem()
os.name with the
lowercase text "unix" will return "UNIX" and any os.name
with the lowercase text "windows" will return "WIN32".
If there is still no match, the os.name returned by the
Java will be returned.
java.lang.String getCurrentPrinterName()