Class BaseCachedBuilder

java.lang.Object
com.webmethods.caf.faces.view.cache.BaseCachedBuilder
Direct Known Subclasses:
CachedActionListenerBuilder, CachedControlBuilder, CachedConverterBuilder, CachedValidatorBuilder, CachedValueChangeListenerBuilder

public abstract class BaseCachedBuilder extends Object
Base cached builder.
  • Field Details

  • 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

      public static IBindingExpressionReWriter getBindingExpressionReWriter()
      Returns the IBindingExpressionReWriter for the current thread
      Returns:
      the binding expression rewriter for the current thread
    • addProperty

      public void addProperty(FacesContext ctx, String name, Object value)
      Add the specified property to the object to be built.
    • addProperty

      public void addProperty(FacesContext ctx, String name, Object value, String signature)
      Add the specified property to the object to be built.
    • getClassToBuild

      protected abstract Class<?> getClassToBuild(FacesContext ctx)
      Returns:
      Class that this builder builds.
    • isExpression

      protected boolean isExpression(Object o)
      Returns:
      True if the specified value is a JSF expression.
    • setProperties

      protected void setProperties(FacesContext ctx, Object o) throws Exception
      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

      protected Class<?>[] getMethodBindingArgTypes(String propertyName)
      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

      public void addAttribute(Object name, Object value)
    • getPropertyDescriptor

      protected Object getPropertyDescriptor(FacesContext ctx, String property) throws FacesException
      Returns:
      PropertyDescriptor or List of PropertyDescriptors 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