Package org.zkoss.xel.util
Class SimpleXelContext
java.lang.Object
org.zkoss.xel.util.SimpleXelContext
- All Implemented Interfaces:
XelContext
A simple implementation of
XelContext.- Since:
- 3.0.0
- Author:
- tomyeh
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleXelContext(VariableResolver resolver) SimpleXelContext(VariableResolver resolver, FunctionMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) Returns the value of the specified attribute, or null if not available.Returns all attributesReturns the function mapper, or null if not available.Returns the variable resolver, or null if not available.booleanhasAttribute(String name) Returns if the attribute is available.removeAttribute(String name) Removes the attribute.setAttribute(String name, Object value) Sets the value of the specified attributevoidsetFunctionMapper(FunctionMapper mapper) Sets the function mapper, or null if not available.voidsetVariableResolver(VariableResolver resolver) Sets the variable resolver, or null if not available.
-
Constructor Details
-
SimpleXelContext
-
SimpleXelContext
-
SimpleXelContext
public SimpleXelContext()
-
-
Method Details
-
setVariableResolver
Sets the variable resolver, or null if not available. -
setFunctionMapper
Sets the function mapper, or null if not available. -
getVariableResolver
Description copied from interface:XelContextReturns the variable resolver, or null if not available.- Specified by:
getVariableResolverin interfaceXelContext
-
getFunctionMapper
Description copied from interface:XelContextReturns the function mapper, or null if not available.- Specified by:
getFunctionMapperin interfaceXelContext
-
getAttribute
Description copied from interface:XelContextReturns the value of the specified attribute, or null if not available.- Specified by:
getAttributein interfaceXelContext- Parameters:
name- the name of the attribute to retrieve- Returns:
- the value
-
setAttribute
Description copied from interface:XelContextSets the value of the specified attribute- Specified by:
setAttributein interfaceXelContext- Parameters:
name- the name of the attribute to setvalue- the value of the attribute to set- Returns:
- the previous value
-
hasAttribute
Description copied from interface:XelContextReturns if the attribute is available.Notice that
nullis a valid value, so you can tell if an attribute is associated by examining the return value ofXelContext.getAttribute(java.lang.String).- Specified by:
hasAttributein interfaceXelContext- Parameters:
name- the name of the attribute to test
-
removeAttribute
Description copied from interface:XelContextRemoves the attribute.- Specified by:
removeAttributein interfaceXelContext- Parameters:
name- the name of the attribute to remove.- Returns:
- the previous value associated with the attribute, if any,
-
getAttributes
Description copied from interface:XelContextReturns all attributes- Specified by:
getAttributesin interfaceXelContext
-