public class RequestFormDataVar extends MultipartResolvingVar
The format for this var is
Used to resolve values returned by RestRequest.getFormData(String)
.
When multiple keys are used, returns the first non-null/empty value.
String foo = restRequest.resolveVars(
RestRequest
object be set as a context object on the resolver
or a session object on the resolver session.
Modifier and Type | Field and Description |
---|---|
static String |
NAME
The name of this variable.
|
Constructor and Description |
---|
RequestFormDataVar()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
allowNested()
Returns whether nested variables are supported by this variable.
|
protected boolean |
allowRecurse()
Returns whether variables in the resolved contents of this variable should also be resolved.
|
boolean |
canResolve(VarResolverSession session)
Returns
|
String |
resolve(VarResolverSession session,
String key)
The interface that needs to be implemented for subclasses of
SimpleVar . |
doResolve
public static final String NAME
public RequestFormDataVar()
protected boolean allowNested()
Var
For example, in
The default implementation of this method always returns
allowNested
in class Var
protected boolean allowRecurse()
Var
For example, if
The default implementation of this method always returns
Subclasses can override this method to override the default behavior.
allowRecurse
in class Var
public String resolve(VarResolverSession session, String key)
Var
SimpleVar
.public boolean canResolve(VarResolverSession session)
Var
For example, some variable cannot resolve unless specific context or session objects are available.
canResolve
in class Var
session
- The current session.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.