Class RequestVariableResolver
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.lang.String,java.lang.Object>
-
- org.apache.felix.webconsole.servlet.RequestVariableResolver
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.String,java.lang.Object>
- Direct Known Subclasses:
DefaultVariableResolver
public class RequestVariableResolver extends java.util.HashMap<java.lang.String,java.lang.Object>TheRequestVariableResolveris aHashMapthat is used by the webconsole to process variables in the template. The resolver is stored as a request attribute with the nameREQUEST_ATTRIBUTE.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringKEY_APP_ROOTThe name of the key providing the absolute path of the Web Console root.static java.lang.StringKEY_PLUGIN_ROOTThe name of the key providing the absolute path of the current plugin.static java.lang.StringREQUEST_ATTRIBUTEThe name of the request attribute holding theRequestVariableResolverfor the request (value is "felix.webconsole.variable.resolver").
-
Constructor Summary
Constructors Constructor Description RequestVariableResolver()Creates a new variable resolver with default capacity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringresolve(java.lang.String variable)Returns the string representation of the value stored under the variable name in this map.
-
-
-
Field Detail
-
REQUEST_ATTRIBUTE
public static final java.lang.String REQUEST_ATTRIBUTE
The name of the request attribute holding theRequestVariableResolverfor the request (value is "felix.webconsole.variable.resolver"). This attribute is guaaranteed to be set for plugins.- See Also:
- Constant Field Values
-
KEY_APP_ROOT
public static final java.lang.String KEY_APP_ROOT
The name of the key providing the absolute path of the Web Console root. This key is guaaranteed to be set for plugins.
-
KEY_PLUGIN_ROOT
public static final java.lang.String KEY_PLUGIN_ROOT
The name of the key providing the absolute path of the current plugin. This key is guaaranteed to be set for plugins.
-
-
Method Detail
-
resolve
public java.lang.String resolve(java.lang.String variable)
Returns the string representation of the value stored under the variable name in this map. If no value is stored under the variable name,nullis returned.- Parameters:
variable- The name of the variable whose value is to be returned.- Returns:
- The variable value or
nullif there is no entry with the given name in this map.
-
-