Package com.sun.faces.el
Class ResourceELResolver
- java.lang.Object
-
- jakarta.el.ELResolver
-
- com.sun.faces.el.ResourceELResolver
-
public class ResourceELResolver extends jakarta.el.ELResolverELResolver to resolve expressions like the following:- #{resource['library:resource']}
- #{resource['resource']}
-
-
Constructor Summary
Constructors Constructor Description ResourceELResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>getCommonPropertyType(jakarta.el.ELContext context, Object base)Iterator<FeatureDescriptor>getFeatureDescriptors(jakarta.el.ELContext context, Object base)Class<?>getType(jakarta.el.ELContext context, Object base, Object property)ObjectgetValue(jakarta.el.ELContext context, Object base, Object property)If base and property are notnulland base is an instance ofResourceHandler, perform the following: Ifpropertydoesn't contain:treatpropertyas the resource name and passpropertytoResourceHandler.createResource(String)Ifpropertycontains a single:treat the content before the:as the library name, and the content after the:to be the resource name and pass both toResourceHandler.createResource(String, String)Ifpropertycontains more than one:then throw aELExceptionIf one of the above steps resulted in the creation of aResourceinstance, callELContext.setPropertyResolved(true)and return the result ofResource.getRequestPath()booleanisReadOnly(jakarta.el.ELContext context, Object base, Object property)voidsetValue(jakarta.el.ELContext context, Object base, Object property, Object value)This is basically a no-op.
-
-
-
Method Detail
-
getValue
public Object getValue(jakarta.el.ELContext context, Object base, Object property)
If base and property are notnulland base is an instance ofResourceHandler, perform the following:- If
propertydoesn't contain:treatpropertyas the resource name and passpropertytoResourceHandler.createResource(String) - If
propertycontains a single:treat the content before the:as the library name, and the content after the:to be the resource name and pass both toResourceHandler.createResource(String, String) - If
propertycontains more than one:then throw aELException - If one of the above steps resulted in the creation of a
Resourceinstance, callELContext.setPropertyResolved(true)and return the result ofResource.getRequestPath()
- Specified by:
getValuein classjakarta.el.ELResolver- See Also:
ELResolver.getValue(jakarta.el.ELContext, Object, Object)
- If
-
getType
public Class<?> getType(jakarta.el.ELContext context, Object base, Object property)
- Specified by:
getTypein classjakarta.el.ELResolver- Returns:
nullas this resolver only performs lookups- Throws:
jakarta.el.PropertyNotFoundException- if base and property are null
-
setValue
public void setValue(jakarta.el.ELContext context, Object base, Object property, Object value)This is basically a no-op.- Specified by:
setValuein classjakarta.el.ELResolver- Throws:
jakarta.el.PropertyNotFoundException- if base and property are null
-
isReadOnly
public boolean isReadOnly(jakarta.el.ELContext context, Object base, Object property)- Specified by:
isReadOnlyin classjakarta.el.ELResolver- Returns:
false(basically ignored by the EL system)- Throws:
jakarta.el.PropertyNotFoundException- if base and property are null
-
getFeatureDescriptors
public Iterator<FeatureDescriptor> getFeatureDescriptors(jakarta.el.ELContext context, Object base)
- Overrides:
getFeatureDescriptorsin classjakarta.el.ELResolver- Returns:
null- there is no way to query theResourceManagerfor all known resources
-
-