Package org.apache.felix.webconsole.servlet

## Class RequestVariableResolver

- java.lang.Object
- - java.util.AbstractMap<K,​V>
  - - java.util.HashMap<String,​Object>
    - - org.apache.felix.webconsole.servlet.RequestVariableResolver

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Map<String,​Object>`

Direct Known Subclasses:
  `DefaultVariableResolver`

    public class RequestVariableResolver
    extends HashMap<String,​Object>

The `RequestVariableResolver` is a `HashMap` that is used by the webconsole to process variables in the template. The resolver is stored as a request attribute with the name `REQUEST_ATTRIBUTE`.

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class java.util.AbstractMap

`AbstractMap.SimpleEntry<K extends Object,​V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,​V extends Object>`

### Nested classes/interfaces inherited from interface java.util.Map

`Map.Entry<K extends Object,​V extends Object>`

### Field Summary

Fields
`static String` `KEY_APP_ROOT` The name of the key providing the absolute path of the Web Console root.
`static String` `KEY_PLUGIN_ROOT` The name of the key providing the absolute path of the current plugin.
`static String` `REQUEST_ATTRIBUTE` The name of the request attribute holding the `RequestVariableResolver` for the request (value is "felix.webconsole.variable.resolver").

### Constructor Summary

Constructors
`RequestVariableResolver()` Creates a new variable resolver with default capacity.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `resolve​(String variable)` Returns the string representation of the value stored under the variable name in this map.

### Methods inherited from class java.util.HashMap

`clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

### Methods inherited from class java.util.AbstractMap

`equals, hashCode, toString`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.util.Map

`equals, hashCode`

### Field Detail

#### REQUEST_ATTRIBUTE

    public static final String REQUEST_ATTRIBUTE

The name of the request attribute holding the `RequestVariableResolver` for 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 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.

See Also:
  `ServletConstants.ATTR_APP_ROOT`, Constant Field Values

#### KEY_PLUGIN_ROOT

    public static final 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.

See Also:
  `ServletConstants.ATTR_PLUGIN_ROOT`, Constant Field Values

### Constructor Detail

#### RequestVariableResolver

    public RequestVariableResolver()

Creates a new variable resolver with default capacity.

### Method Detail

#### resolve

    public String resolve​(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, `null` is returned.

Parameters:
  `variable` - The name of the variable whose value is to be returned.
Returns:
  The variable value or `null` if there is no entry with the given name in this map.