|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.xsp.util.ValueBindingUtil
public class ValueBindingUtil
The utility used for parsing ValueBinding
s and MethodBinding
s. Generally users should use Application.createValueBinding(String)
instead. This util is used by BindingFactory
implementors,
contributing new binding language engines (current languages are
"javascript", "el", and "xpath"). It should be used whenever splitting a
binding string like "Hello #{javascript: @UserName()}" to find the engine
prefix(es) and expression to pass to the engine, instead of trying to
implement your own code to find the #{ and : delimiters. The implementation
is complicated by special handling for loadtime bindings that return runtime
bindings, so that strings like "${javascript: '#{'+compositeData.var+'}' }" do not give
invalid EL syntax errors.
Field Summary | |
---|---|
static char |
CHAR_DELIM
|
static java.lang.String |
LANG_EL
|
static int |
LOADTIME_EXPRESSION
|
static int |
RUNTIME_EXPRESSION
|
static java.lang.String |
STR_DELIM
|
static java.lang.String |
VBL_END
|
static java.lang.String |
VBL_START
|
static java.lang.String |
VBLX_END
|
static java.lang.String |
VBLX_START
|
Constructor Summary | |
---|---|
ValueBindingUtil()
|
Method Summary | |
---|---|
static java.lang.String |
convertLoadtimeExpression(java.lang.String expression)
Convert a load time expression to the equivalent runtime expression |
static java.lang.String |
getExpressionString(java.lang.String prefix,
java.lang.String expression,
int type)
|
static java.lang.String[] |
getMultiPartExpressionParts(java.lang.String expression)
|
static java.lang.String |
getPrefix(java.lang.String expression)
Return the prefix for a expression |
static boolean |
isExpression(java.lang.String value,
java.lang.String startDelim,
java.lang.String endDelim)
Return true if the string is a valid expression using the specified delimiters |
static boolean |
isLoadtimeExpression(java.lang.String value)
Return true if the string is a valid load time expression |
static boolean |
isMultiPartExpression(java.lang.String expression)
Return true if this is a multi-part VBL expression i.e. |
static boolean |
isRuntimeExpression(java.lang.String value)
Return true if the string is a valid run time expression |
static boolean |
isSimpleExpression(java.lang.String expression)
Return true if this is a valid expression |
static boolean |
isSimpleLoadtimeExpression(java.lang.String expression)
Return true if this is a VBL expression using the extended delimiters |
static boolean |
isSimpleRuntimeExpression(java.lang.String expression)
Return true if this is a standard VBL expression |
static boolean |
isValueBindingExpression(java.lang.String expression)
Return true if the specified string is a value binding expression. |
static java.lang.String[] |
parseMultiPartExpression(java.lang.String expression)
Parse a multipart value binding expression into it's individual parts |
static java.lang.String |
parseSimpleExpression(java.lang.String expression)
Return the expression for a expression |
static java.lang.String[] |
splitFormula(java.lang.String prefix,
java.lang.String formula)
Split a value binding expression which is optionally prefixed with a value binding type |
static java.lang.String |
stripDelimiters(java.lang.String expression)
Strip the delimiters off a expression |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LANG_EL
public static final java.lang.String VBL_START
public static final java.lang.String VBL_END
public static final java.lang.String VBLX_START
public static final java.lang.String VBLX_END
public static final java.lang.String STR_DELIM
public static final char CHAR_DELIM
public static final int RUNTIME_EXPRESSION
public static final int LOADTIME_EXPRESSION
Constructor Detail |
---|
public ValueBindingUtil()
Method Detail |
---|
public static java.lang.String getExpressionString(java.lang.String prefix, java.lang.String expression, int type)
prefix
- expression
- type
- specify the type of expression this is. valid values are:
ValudBindingUtil.RUNTIME_EXPRESSION,
ValudBindingUtil.LOADTIME_EXPRESSION
public static boolean isValueBindingExpression(java.lang.String expression)
public static boolean isLoadtimeExpression(java.lang.String value)
public static boolean isRuntimeExpression(java.lang.String value)
public static boolean isExpression(java.lang.String value, java.lang.String startDelim, java.lang.String endDelim)
public static java.lang.String convertLoadtimeExpression(java.lang.String expression)
public static java.lang.String getPrefix(java.lang.String expression)
public static java.lang.String parseSimpleExpression(java.lang.String expression)
public static java.lang.String stripDelimiters(java.lang.String expression)
public static boolean isSimpleExpression(java.lang.String expression)
public static boolean isSimpleRuntimeExpression(java.lang.String expression)
public static boolean isSimpleLoadtimeExpression(java.lang.String expression)
public static boolean isMultiPartExpression(java.lang.String expression)
public static java.lang.String[] getMultiPartExpressionParts(java.lang.String expression)
public static java.lang.String[] parseMultiPartExpression(java.lang.String expression)
public static java.lang.String[] splitFormula(java.lang.String prefix, java.lang.String formula)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |