Package org.apache.juneau.rest.vars
Class ServletInitParamVar
java.lang.Object
org.apache.juneau.svl.Var
org.apache.juneau.svl.SimpleVar
org.apache.juneau.svl.DefaultingVar
org.apache.juneau.rest.vars.ServletInitParamVar
Servlet init parameter variable resolver.
The format for this var is
This variable resolver requires that a RestRequest
bean be available in the session bean store.
Values are pulled from the GenericServlet.getInitParameter(String)
method.
Since this is a SimpleVar
, any variables contained in the result will be recursively resolved.
Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canResolve
(VarResolverSession session) Returnstrue if this variable can be resolved in the specified session.resolve
(VarResolverSession session, String key) The interface that needs to be implemented for subclasses ofSimpleVar
.Methods inherited from class org.apache.juneau.svl.DefaultingVar
doResolve
Methods inherited from class org.apache.juneau.svl.Var
allowNested, allowRecurse, getName
-
Field Details
-
NAME
The name of this variable.- See Also:
-
-
Constructor Details
-
ServletInitParamVar
public ServletInitParamVar()Constructor.
-
-
Method Details
-
resolve
Description copied from class:Var
The interface that needs to be implemented for subclasses ofSimpleVar
. -
canResolve
Description copied from class:Var
Returnstrue if this variable can be resolved in the specified session.For example, some variable cannot resolve unless specific context or session objects are available.
- Overrides:
canResolve
in classVar
- Parameters:
session
- The current session.- Returns:
true if this variable can be resolved in the specified session.
-