org.apache.felix.webconsole
Interface VariableResolver

All Known Implementing Classes:
DefaultVariableResolver

public interface VariableResolver

The VariableResolver interface defines the API for an object which may be provided by plugins to provide replacement values for variables in the generated content.

Plugins should call the WebConsoleUtil.setVariableResolver(javax.servlet.ServletRequest, VariableResolver) method to provide their implementation for variable resolution.

The main use of such a variable resolver is when a plugin is using a static template which provides slots to place dynamically generated content parts.

Note: The variable resolver must be set in the request before the response writer is retrieved calling the ServletRequest.getWriter() method. Otherwise the variable resolver will not be used for resolving variables.

See Also:
WebConsoleUtil.getVariableResolver(javax.servlet.ServletRequest), WebConsoleUtil.setVariableResolver(javax.servlet.ServletRequest, VariableResolver)

Method Summary
 String resolve(String variable)
          Returns a replacement value for the named variable or null if no replacement is available.
 

Method Detail

resolve

String resolve(String variable)
Returns a replacement value for the named variable or null if no replacement is available.

Parameters:
variable - The name of the variable for which to return a replacement.
Returns:
The replacement value or null if no replacement is available.


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.