org.apache.myfaces.el.unified
Class ResolverBuilderBase

java.lang.Object
  extended by org.apache.myfaces.el.unified.ResolverBuilderBase
Direct Known Subclasses:
ResolverBuilderForFaces, ResolverBuilderForJSP

public class ResolverBuilderBase
extends Object

Version:
$Revision: 1296049 $ $Date: 2012-03-01 23:48:16 -0500 (Thu, 01 Mar 2012) $
Author:
Mathias Broekelmann (latest modification by $Author: lu4242 $)

Field Summary
static String EL_RESOLVER_COMPARATOR
          Define a custom comparator class used to sort the ELResolvers.
static String EL_RESOLVER_PREDICATE
           
 
Constructor Summary
ResolverBuilderBase(RuntimeConfig config)
           
 
Method Summary
protected  void addFromRuntimeConfig(List<javax.el.ELResolver> resolvers)
          add the el resolvers from the faces config, the el resolver wrapper for variable resolver, the el resolver wrapper for the property resolver and the el resolvers added by Application.addELResolver(ELResolver).
protected  javax.el.ELResolver createELResolver(PropertyResolver resolver)
           
protected  javax.el.ELResolver createELResolver(VariableResolver resolver)
           
protected  Iterable<javax.el.ELResolver> filterELResolvers(List<javax.el.ELResolver> resolvers, FacesCompositeELResolver.Scope scope)
          Filters the ELResolvers with a custom Predicate provided by the user.
protected  void sortELResolvers(List<javax.el.ELResolver> resolvers, FacesCompositeELResolver.Scope scope)
          Sort the ELResolvers with a custom Comparator provided by the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EL_RESOLVER_COMPARATOR

@JSFWebConfigParam(since="1.2.10, 2.0.2",
                   group="EL",
                   desc="The Class of an Comparator<ELResolver> implementation.")
public static final String EL_RESOLVER_COMPARATOR
Define a custom comparator class used to sort the ELResolvers.

This is useful when it is necessary to put an ELResolver on top of other resolvers. Note set this param override the default ordering described by JSF spec section 5.

See Also:
Constant Field Values

EL_RESOLVER_PREDICATE

@JSFWebConfigParam(since="2.1.0",
                   group="EL",
                   desc="The Class of an org.apache.commons.collections.Predicate<ELResolver> implementation.If used and returns true for a ELResolver instance, such resolver will not be installed in ELResolvers chain. Use with caution - can break functionality defined in JSF specification \'ELResolver Instances Provided by Faces\'")
public static final String EL_RESOLVER_PREDICATE
See Also:
Constant Field Values
Constructor Detail

ResolverBuilderBase

public ResolverBuilderBase(RuntimeConfig config)
Method Detail

addFromRuntimeConfig

protected void addFromRuntimeConfig(List<javax.el.ELResolver> resolvers)
add the el resolvers from the faces config, the el resolver wrapper for variable resolver, the el resolver wrapper for the property resolver and the el resolvers added by Application.addELResolver(ELResolver). The resolvers where only added if they are not null

Parameters:
resolvers -

sortELResolvers

protected void sortELResolvers(List<javax.el.ELResolver> resolvers,
                               FacesCompositeELResolver.Scope scope)
Sort the ELResolvers with a custom Comparator provided by the user.

Parameters:
resolvers -
scope - scope of ELResolvers (Faces,JSP)
Since:
1.2.10, 2.0.2

filterELResolvers

protected Iterable<javax.el.ELResolver> filterELResolvers(List<javax.el.ELResolver> resolvers,
                                                          FacesCompositeELResolver.Scope scope)
Filters the ELResolvers with a custom Predicate provided by the user.

Parameters:
resolvers - list of ELResolvers
scope - scope of ELResolvers (Faces,JSP)
Returns:
Iterable instance of Iterable containing filtered ELResolvers

createELResolver

protected javax.el.ELResolver createELResolver(VariableResolver resolver)

createELResolver

protected javax.el.ELResolver createELResolver(PropertyResolver resolver)


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.