public class LocalizationVar extends MultipartVar
The format for this var is
This variable resolver requires that a RestRequest object be set as a context object on the resolver or a
session object on the resolver session.
Values are pulled from the RestRequest.getMessage(String,Object[]) method.
These in turn are pulled from the resource bundle associated with the servlet class where the request was made.
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.
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME
The name of this variable.
|
| Constructor and Description |
|---|
LocalizationVar()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canResolve(VarResolverSession session)
Returns
|
String |
resolve(VarResolverSession session,
String[] args)
The interface that needs to be implemented for this interface.
|
resolveallowNested, allowRecurse, doResolve, getNamepublic static final String NAME
public LocalizationVar()
public String resolve(VarResolverSession session, String[] args)
MultipartVarresolve in class MultipartVarsession - The session object used for a single instance of a string resolution.args - The arguments inside the variable.public boolean canResolve(VarResolverSession session)
VarFor example, some variable cannot resolve unless specific context or session objects are available.
canResolve in class Varsession - The current session.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.