org.apache.myfaces.extensions.validator.core.el
Interface ELHelper

All Known Implementing Classes:
DefaultELHelper

public interface ELHelper

Encapulates EL handling to isolate the dependency to the specific jsf version.

Since:
1.x.1

Method Summary
 Object getBean(String beanName)
          Resolves the bean instance for the specified name.
 Object getBindingOfComponent(javax.faces.component.UIComponent uiComponent, String name)
          Deprecated. 
 PropertyDetails getPropertyDetailsOfValueBinding(javax.faces.component.UIComponent uiComponent)
          Extracts the property details (expression, base object and property name) information of the value attribute of the given UIComponent value attribute.
 Class getTypeOfExpression(javax.faces.context.FacesContext facesContext, ValueBindingExpression valueBindingExpression)
          Evaluates the type returned by getValueOfExpression(javax.faces.context.FacesContext, org.apache.myfaces.extensions.validator.core.el.ValueBindingExpression)
 Object getValueOfExpression(javax.faces.context.FacesContext facesContext, ValueBindingExpression valueBindingExpression)
          Evaluates the given expression within the current FacesContext
 boolean isELTermValid(javax.faces.context.FacesContext facesContext, String valueBindingExpression)
          Determines if the expression is a valid expression, meaning that the expression can be evaluated without an exception.
 boolean isELTermWellFormed(Object o)
          A very basic check of the EL expression
 

Method Detail

getBean

Object getBean(String beanName)
Resolves the bean instance for the specified name.

Parameters:
beanName - The bean name we are interested in, no EL expression.
Returns:
instance for the bean name or null.

getValueOfExpression

Object getValueOfExpression(javax.faces.context.FacesContext facesContext,
                            ValueBindingExpression valueBindingExpression)
Evaluates the given expression within the current FacesContext

Parameters:
facesContext - FacesContext for the current request
valueBindingExpression - value-binding to evaluate
Returns:
result for the given expression

getTypeOfExpression

Class getTypeOfExpression(javax.faces.context.FacesContext facesContext,
                          ValueBindingExpression valueBindingExpression)
Evaluates the type returned by getValueOfExpression(javax.faces.context.FacesContext, org.apache.myfaces.extensions.validator.core.el.ValueBindingExpression)

Parameters:
facesContext - FacesContext for the current request
valueBindingExpression - value-binding to evaluate
Returns:
type of the result of the expression

getPropertyDetailsOfValueBinding

PropertyDetails getPropertyDetailsOfValueBinding(javax.faces.component.UIComponent uiComponent)
Extracts the property details (expression, base object and property name) information of the value attribute of the given UIComponent value attribute.

Parameters:
uiComponent - The UIComponent in question
Returns:
property details for the value of the given UIComponent

isELTermValid

boolean isELTermValid(javax.faces.context.FacesContext facesContext,
                      String valueBindingExpression)
Determines if the expression is a valid expression, meaning that the expression can be evaluated without an exception.

Parameters:
facesContext - The JSF Context
valueBindingExpression - The EL expression we want to evaluate.
Returns:
true if the expression is valid - false otherwise

isELTermWellFormed

boolean isELTermWellFormed(Object o)
A very basic check of the EL expression

Parameters:
o - Object in question
Returns:
true if the given object is a well formed string - false otherwise

getBindingOfComponent

@Deprecated
Object getBindingOfComponent(javax.faces.component.UIComponent uiComponent,
                                        String name)
Deprecated. 

Gets the value of the attribute specified by the parameter name for the UIComponent.

Parameters:
uiComponent - The UIComponent in question
name - The name of the attribute.
Returns:
The ValueExpression assigned to the attribute.


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