Class BaseCachedBuilder
java.lang.Object
com.webmethods.caf.faces.view.cache.BaseCachedBuilder
- Direct Known Subclasses:
CachedActionListenerBuilder
,CachedControlBuilder
,CachedConverterBuilder
,CachedValidatorBuilder
,CachedValueChangeListenerBuilder
Base cached builder.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Property prepared for setting. -
Field Summary
FieldsModifier and TypeFieldDescriptionList of attributesprotected Map<String,
ValueExpression> Map ofString
name,ValueExpression
value pairs.protected List<BaseCachedBuilder.Property>
List ofBaseCachedBuilder.Property
s.Map ofString
name, {link @PropertyDescriptor} or {link @List} ofPropertyDescriptor
pairs for the built class.protected static final Class<?>[]
protected static final Pattern
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(Object name, Object value) protected void
addProperty
(FacesContext ctx, PropertyDescriptor descriptor, Object value, String signature) Add the specified property to the object to be built.void
addProperty
(FacesContext ctx, String name, Object value) Add the specified property to the object to be built.void
addProperty
(FacesContext ctx, String name, Object value, String signature) Add the specified property to the object to be built.protected Object
convertToType
(Class<?> originalType, Object originalValue, Class<?> convertedType) Convert the originalValue to the convertedType.static IBindingExpressionReWriter
Returns the IBindingExpressionReWriter for the current threadprotected abstract Class<?>
protected Class<?>[]
getMethodBindingArgTypes
(String propertyName) Some method bindings require parameters, this method returns the param types for specific well-known propertiesprotected Object
getPropertyDescriptor
(FacesContext ctx, String property) protected boolean
static void
setBindingExpressionReWriter
(IBindingExpressionReWriter bindingExpressionRewriter) Sets the IBindingExpressionReWriter for the current threadprotected void
setProperties
(FacesContext ctx, Object o) Set the pre-configured properties of the built object.protected void
setProperty
(FacesContext ctx, Object o, PropertyDescriptor descriptor, Object value) Sets the specified property on the specified object.
-
Field Details
-
NO_ARGS
-
SIGNATURE_PATTERN
-
m_properties
List ofBaseCachedBuilder.Property
s. -
m_attributes
List of attributes -
m_bindings
Map ofString
name,ValueExpression
value pairs. -
m_propertyDescriptors
Map ofString
name, {link @PropertyDescriptor} or {link @List} ofPropertyDescriptor
pairs for the built class.
-
-
Constructor Details
-
BaseCachedBuilder
public BaseCachedBuilder()
-
-
Method Details
-
setBindingExpressionReWriter
public static void setBindingExpressionReWriter(IBindingExpressionReWriter bindingExpressionRewriter) Sets the IBindingExpressionReWriter for the current thread- Parameters:
bindingExpressionRewriter
- the binding expression rewriter for the current thread
-
getBindingExpressionReWriter
Returns the IBindingExpressionReWriter for the current thread- Returns:
- the binding expression rewriter for the current thread
-
addProperty
Add the specified property to the object to be built. -
addProperty
Add the specified property to the object to be built. -
getClassToBuild
- Returns:
- Class that this builder builds.
-
isExpression
- Returns:
- True if the specified value is a JSF expression.
-
setProperties
Set the pre-configured properties of the built object.- Throws:
Exception
-
setProperty
protected void setProperty(FacesContext ctx, Object o, PropertyDescriptor descriptor, Object value) throws Exception Sets the specified property on the specified object.- Throws:
Exception
-
getMethodBindingArgTypes
Some method bindings require parameters, this method returns the param types for specific well-known properties- Parameters:
propertyName
-- Returns:
- arg types for the method binding
-
addProperty
protected void addProperty(FacesContext ctx, PropertyDescriptor descriptor, Object value, String signature) throws Exception Add the specified property to the object to be built.- Throws:
Exception
-
addAttribute
-
getPropertyDescriptor
- Returns:
PropertyDescriptor
orList
ofPropertyDescriptor
s for the specified property of the class this builder builds.- Throws:
FacesException
-
convertToType
protected Object convertToType(Class<?> originalType, Object originalValue, Class<?> convertedType) throws Exception Convert the originalValue to the convertedType.- Throws:
Exception
-