public class PortalFunctionMapper extends Object implements IExtendedFunctionMapper
Resolves EL functions to be available in any portal context.
Constructor and Description |
---|
PortalFunctionMapper() |
Modifier and Type | Method and Description |
---|---|
void |
afterEvaluation()
Performs any needed operations after the evaluation happens.
|
void |
beforeEvaluation()
Performs any initialization needed before the evaluation is performed.
|
static String |
concat(Object[] objects)
Concatenates the strings.
|
static String |
encodeURL(String[] args)
Encodes the given string to be used in URLs. |
static String |
escapeJs(String stringToEscape)
Escape a string to be used in JavaScript.
|
static String |
escapeXml(String stringToEscape)
Escape a string to be used in XML
|
protected static String |
localize(IResource baseResource,
PageWebResource pwr,
String[] args)
Resolves the string.
|
protected static String |
localize(IResource baseResource,
String[] args)
Resolves the string.
|
static String |
localize(String[] args)
Resolves the string.
|
protected static String |
processLocalizationParameters(String[] args)
Adds all parameters to the localization string
|
Method |
resolveFunction(String prefix,
String methodName) |
public static String localize(String[] args) throws PortalException
args
- the localize function parameters.PortalException
- if an error occur localizing the string.protected static String localize(IResource baseResource, String[] args) throws PortalException
baseResource
- The IResource
to useargs
- the localize function parameters.PortalException
- if an error occur localizing the string.protected static String localize(IResource baseResource, PageWebResource pwr, String[] args) throws PortalException
baseResource
- The IResource
to useargs
- the localize function parameters.PortalException
- if an error occur localizing the string.protected static String processLocalizationParameters(String[] args)
args
- the array with the localization string, resource and parametersILocalizationManager.localize(String, IResource)
public Method resolveFunction(String prefix, String methodName)
resolveFunction
in interface FunctionMapper
public void beforeEvaluation()
public void afterEvaluation()
finally
.public static String escapeJs(String stringToEscape)
stringToEscape
- The string to escape.public static String escapeXml(String stringToEscape)
stringToEscape
- The string to escape.public static String concat(Object[] objects) throws PortalException
objects
- the objects to get the string value and concatenate, in order.PortalException
public static String encodeURL(String[] args) throws UnsupportedEncodingException
Encodes
the given string to be used in URLs.
The String to be encoded is the first position of args
.
The parameter args
must have one or two positions.
If it has one position, then UTF-8
will be used as the charset when encoding.
If it has two positions, then the string in the second position will be used as charset when encoding.args
- the arguments.UnsupportedEncodingException
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.