Interface VariableRegistry
- 
 public interface VariableRegistryA Service for resolving variables to their values. Variables may be predefined by the runtime, or be read from bootstrap.properties or the server.xml configuration.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringINSTALL_DIRThe variable literal for obtaining the server install location.static java.lang.StringSERVER_CONFIG_DIRThe variable literal for obtaining the server configuration directory.static java.lang.StringSERVER_NAMEThe variable literal for obtaining the server name.static java.lang.StringSERVER_OUTPUT_DIRThe variable literal for obtaining the server output directory.static java.lang.StringSHARED_APPS_DIRThe variable literal for obtaining the shared applications directory.static java.lang.StringSHARED_CONFIG_DIRThe variable literal for obtaining the shared configuration directory.static java.lang.StringSHARED_RESC_DIRThe variable literal for obtaining the shared resources directory.static java.lang.StringUSER_DIRThe variable literal for obtaining the server user directory.static java.lang.StringUSER_EXTENSION_DIRThe variable literal for obtaining the usr product extension directory.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddVariable(java.lang.String variable, java.lang.String value)Add a variable to the registry with the specified value if it does not exist already.voidremoveVariable(java.lang.String variable)Remove the specified variable from the registry.voidreplaceVariable(java.lang.String variable, java.lang.String value)Update the variable in the registry with the specified value.java.lang.StringresolveRawString(java.lang.String string)Resolve the variables in the given string.java.lang.StringresolveString(java.lang.String string)Resolve the variables in the given string.
 
- 
- 
- 
Field Detail- 
SERVER_NAMEstatic final java.lang.String SERVER_NAME The variable literal for obtaining the server name.- See Also:
- Constant Field Values
 
 - 
INSTALL_DIRstatic final java.lang.String INSTALL_DIR The variable literal for obtaining the server install location.- See Also:
- Constant Field Values
 
 - 
USER_DIRstatic final java.lang.String USER_DIR The variable literal for obtaining the server user directory.- See Also:
- Constant Field Values
 
 - 
USER_EXTENSION_DIRstatic final java.lang.String USER_EXTENSION_DIR The variable literal for obtaining the usr product extension directory.- See Also:
- Constant Field Values
 
 - 
SERVER_CONFIG_DIRstatic final java.lang.String SERVER_CONFIG_DIR The variable literal for obtaining the server configuration directory.- See Also:
- Constant Field Values
 
 - 
SERVER_OUTPUT_DIRstatic final java.lang.String SERVER_OUTPUT_DIR The variable literal for obtaining the server output directory.- See Also:
- Constant Field Values
 
 - 
SHARED_APPS_DIRstatic final java.lang.String SHARED_APPS_DIR The variable literal for obtaining the shared applications directory.- See Also:
- Constant Field Values
 
 - 
SHARED_CONFIG_DIRstatic final java.lang.String SHARED_CONFIG_DIR The variable literal for obtaining the shared configuration directory.- See Also:
- Constant Field Values
 
 - 
SHARED_RESC_DIRstatic final java.lang.String SHARED_RESC_DIR The variable literal for obtaining the shared resources directory.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
addVariableboolean addVariable(java.lang.String variable, java.lang.String value)Add a variable to the registry with the specified value if it does not exist already.- Parameters:
- variable- the name of the variable.
- value- the value of the variable.
- Returns:
- true if it was added, false otherwise.
 
 - 
replaceVariablevoid replaceVariable(java.lang.String variable, java.lang.String value)Update the variable in the registry with the specified value. If it does not exist already this will add the variable, if it already exists it will be overwritten.- Parameters:
- variable- the name of the variable.
- value- the value of the variable.
 
 - 
resolveStringjava.lang.String resolveString(java.lang.String string) Resolve the variables in the given string. This can be used either to resolve a string that contains variables in it, such as The server is called ${wlp.server.name}. or to specifically discover the value of a variable by wrapping it in ${ and } for example ${wlp.server.name}. If the variable is not defined then the variable substitution will remain, so ${this.does.not.exist} would return ${this.does.not.exist}. During variable resolution the value of the variable will be path normalized by this call. If path normalization is not required use resolveRawString instead.- Parameters:
- string- the string to resolve.
- Returns:
- the resolved string
 
 - 
resolveRawStringjava.lang.String resolveRawString(java.lang.String string) Resolve the variables in the given string. This can be used either to resolve a string that contains variables in it, such as The server is called ${wlp.server.name}. or to specifically discover the value of a variable by wrapping it in ${ and } for example ${wlp.server.name}. If the variable is not defined then the variable substitution will remain, so ${this.does.not.exist} would return ${this.does.not.exist}. If path normalization of variable values is required use resolveString instead.- Parameters:
- string- the string to resolve.
- Returns:
- the resolved string
 
 - 
removeVariablevoid removeVariable(java.lang.String variable) Remove the specified variable from the registry.- Parameters:
- variable-
 
 
- 
 
-