ELResolver for Faces.-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.faces.el.FacesCompositeELResolver
FacesCompositeELResolver.ELResolverChainType -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoid_addPropertyELResolver(ELResolver elResolver) voidadd(ELResolver elResolver) Adds the given resolver to the list of component resolvers.voidaddPropertyELResolver(ELResolver elResolver) voidaddRootELResolver(ELResolver elResolver) Class<?> getCommonPropertyType(ELContext context, Object base) Returns the most general type that this resolver accepts for thepropertyargument, given abaseobject.Class<?> For a givenbaseandproperty, attempts to identify the most general type that is acceptable for an object to be passed as thevalueparameter in a future call to theCompositeELResolver.setValue(jakarta.el.ELContext, java.lang.Object, java.lang.Object, java.lang.Object)method.Attempts to resolve the givenpropertyobject on the givenbaseobject by querying all component resolvers.booleanisReadOnly(ELContext context, Object base, Object property) For a givenbaseandproperty, attempts to determine whether a call toCompositeELResolver.setValue(jakarta.el.ELContext, java.lang.Object, java.lang.Object, java.lang.Object)will always fail.voidAttempts to set the value of the givenpropertyobject on the givenbaseobject.Methods inherited from class jakarta.el.CompositeELResolver
convertToType, invoke
-
Constructor Details
-
DemuxCompositeELResolver
-
-
Method Details
-
getChainType
- Specified by:
getChainTypein classFacesCompositeELResolver
-
_addPropertyELResolver
-
addRootELResolver
- Specified by:
addRootELResolverin classFacesCompositeELResolver
-
addPropertyELResolver
- Specified by:
addPropertyELResolverin classFacesCompositeELResolver
-
add
Description copied from class:CompositeELResolverAdds the given resolver to the list of component resolvers.Resolvers are consulted in the order in which they are added.
- Overrides:
addin classCompositeELResolver- Parameters:
elResolver- The component resolver to add.
-
getValue
Description copied from class:CompositeELResolverAttempts to resolve the givenpropertyobject on the givenbaseobject by querying all component resolvers.If this resolver handles the given (base, property) pair, the
propertyResolvedproperty of theELContextobject must be set totrueby the resolver, before returning. If this property is nottrueafter this method is called, the caller should ignore the return value.First,
propertyResolvedis set tofalseon the providedELContext.Next, for each component resolver in this composite:
- The
getValue()method is called, passing in the providedcontext,baseandproperty. - If the
ELContext'spropertyResolvedflag isfalsethen iteration continues. - Otherwise, iteration stops and no more component resolvers are considered. The value returned by
getValue()is returned by this method.
If none of the component resolvers were able to perform this operation, the value
nullis returned and thepropertyResolvedflag remains set tofalse.Any exception thrown by component resolvers during the iteration is propagated to the caller of this method.
- Overrides:
getValuein classCompositeELResolver- Parameters:
context- The context of this evaluation.base- The base object whose property value is to be returned, ornullto resolve a top-level variable.property- The property or variable to be resolved.- Returns:
- If the
propertyResolvedproperty ofELContextwas set totrue, then the result of the variable or property resolution; otherwise undefined. - Throws:
ELException- if an exception was thrown while performing the property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.
- The
-
getType
Description copied from class:CompositeELResolverFor a givenbaseandproperty, attempts to identify the most general type that is acceptable for an object to be passed as thevalueparameter in a future call to theCompositeELResolver.setValue(jakarta.el.ELContext, java.lang.Object, java.lang.Object, java.lang.Object)method. The result is obtained by querying all component resolvers.If this resolver handles the given (base, property) pair, the
propertyResolvedproperty of theELContextobject must be set totrueby the resolver, before returning. If this property is nottrueafter this method is called, the caller should ignore the return value.First,
propertyResolvedis set tofalseon the providedELContext.Next, for each component resolver in this composite:
- The
getType()method is called, passing in the providedcontext,baseandproperty. - If the
ELContext'spropertyResolvedflag isfalsethen iteration continues. - Otherwise, iteration stops and no more component resolvers are considered. The value returned by
getType()is returned by this method.
If none of the component resolvers were able to perform this operation, the value
nullis returned and thepropertyResolvedflag remains set tofalse.Any exception thrown by component resolvers during the iteration is propagated to the caller of this method.
- Overrides:
getTypein classCompositeELResolver- Parameters:
context- The context of this evaluation.base- The base object whose property value is to be analyzed, ornullto analyze a top-level variable.property- The property or variable to return the acceptable type for.- Returns:
- If the
propertyResolvedproperty ofELContextwas set totrue, then the most general acceptable type which must benullif the either the property or the resolver is read-only; otherwise undefined - Throws:
ELException- if an exception was thrown while performing the property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.
- The
-
setValue
public void setValue(ELContext context, Object base, Object property, Object val) throws ELException Description copied from class:CompositeELResolverAttempts to set the value of the givenpropertyobject on the givenbaseobject. All component resolvers are asked to attempt to set the value.If this resolver handles the given (base, property) pair, the
propertyResolvedproperty of theELContextobject must be set totrueby the resolver, before returning. If this property is nottrueafter this method is called, the caller can safely assume no value has been set.First,
propertyResolvedis set tofalseon the providedELContext.Next, for each component resolver in this composite:
- The
setValue()method is called, passing in the providedcontext,base,propertyandvalue. - If the
ELContext'spropertyResolvedflag isfalsethen iteration continues. - Otherwise, iteration stops and no more component resolvers are considered.
If none of the component resolvers were able to perform this operation, the
propertyResolvedflag remains set tofalse.Any exception thrown by component resolvers during the iteration is propagated to the caller of this method.
- Overrides:
setValuein classCompositeELResolver- Parameters:
context- The context of this evaluation.base- The base object whose property value is to be set, ornullto set a top-level variable.property- The property or variable to be set.val- The value to set the property or variable to.- Throws:
ELException- if an exception was thrown while attempting to set the property or variable. The thrown exception must be included as the cause property of this exception, if available.
- The
-
isReadOnly
Description copied from class:CompositeELResolverFor a givenbaseandproperty, attempts to determine whether a call toCompositeELResolver.setValue(jakarta.el.ELContext, java.lang.Object, java.lang.Object, java.lang.Object)will always fail. The result is obtained by querying all component resolvers.If this resolver handles the given (base, property) pair, the
propertyResolvedproperty of theELContextobject must be set totrueby the resolver, before returning. If this property is nottrueafter this method is called, the caller should ignore the return value.First,
propertyResolvedis set tofalseon the providedELContext.Next, for each component resolver in this composite:
- The
isReadOnly()method is called, passing in the providedcontext,baseandproperty. - If the
ELContext'spropertyResolvedflag isfalsethen iteration continues. - Otherwise, iteration stops and no more component resolvers are considered. The value returned by
isReadOnly()is returned by this method.
If none of the component resolvers were able to perform this operation, the value
.falseis returned and thepropertyResolvedflag remains set tofalseAny exception thrown by component resolvers during the iteration is propagated to the caller of this method.
- Overrides:
isReadOnlyin classCompositeELResolver- Parameters:
context- The context of this evaluation.base- The base object whose property value is to be analyzed, ornullto analyze a top-level variable.property- The property or variable to return the read-only status for.- Returns:
- If the
propertyResolvedproperty ofELContextwas set totrue, thentrueif the property is read-only orfalseif not; otherwise undefined. - Throws:
ELException- if an exception was thrown while performing the property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.
- The
-
getCommonPropertyType
Description copied from class:CompositeELResolverReturns the most general type that this resolver accepts for thepropertyargument, given abaseobject. One use for this method is to assist tools in auto-completion. The result is obtained by querying all component resolvers.The
Classreturned is the most specific class that is a common superclass of all the classes returned by each component resolver'sgetCommonPropertyTypemethod. Ifnullis returned by a resolver, it is skipped.- Overrides:
getCommonPropertyTypein classCompositeELResolver- Parameters:
context- The context of this evaluation.base- The base object to return the most general property type for, ornullto enumerate the set of top-level variables that this resolver can evaluate.- Returns:
nullif thisELResolverdoes not know how to handle the givenbaseobject; otherwiseObject.classif any type ofpropertyis accepted; otherwise the most generalpropertytype accepted for the givenbase.
-