Package com.sun.faces.el
Class ResourceELResolver
- java.lang.Object
-
- jakarta.el.ELResolver
-
- com.sun.faces.el.ResourceELResolver
-
public class ResourceELResolver extends jakarta.el.ELResolver
ELResolver 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)
Object
getValue(jakarta.el.ELContext context, Object base, Object property)
If base and property are notnull
and base is an instance ofResourceHandler
, perform the following: Ifproperty
doesn't contain:
treatproperty
as the resource name and passproperty
toResourceHandler.createResource(String)
Ifproperty
contains 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)
Ifproperty
contains more than one:
then throw aELException
If one of the above steps resulted in the creation of aResource
instance, callELContext.setPropertyResolved(true)
and return the result ofResource.getRequestPath()
boolean
isReadOnly(jakarta.el.ELContext context, Object base, Object property)
void
setValue(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 notnull
and base is an instance ofResourceHandler
, perform the following:- If
property
doesn't contain:
treatproperty
as the resource name and passproperty
toResourceHandler.createResource(String)
- If
property
contains 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
property
contains more than one:
then throw aELException
- If one of the above steps resulted in the creation of a
Resource
instance, callELContext.setPropertyResolved(true)
and return the result ofResource.getRequestPath()
- Specified by:
getValue
in 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:
getType
in classjakarta.el.ELResolver
- Returns:
null
as 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:
setValue
in 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:
isReadOnly
in 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:
getFeatureDescriptors
in classjakarta.el.ELResolver
- Returns:
null
- there is no way to query theResourceManager
for all known resources
-
-