public class ResourceELResolver
extends javax.el.ELResolver
Constructor and Description |
---|
ResourceELResolver() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getCommonPropertyType(javax.el.ELContext context,
java.lang.Object base) |
java.util.Iterator<java.beans.FeatureDescriptor> |
getFeatureDescriptors(javax.el.ELContext context,
java.lang.Object base) |
java.lang.Class<?> |
getType(javax.el.ELContext context,
java.lang.Object base,
java.lang.Object property) |
java.lang.Object |
getValue(javax.el.ELContext context,
java.lang.Object base,
java.lang.Object property)
If base and property are not
null and base is
an instance of ResourceHandler , perform the following:
If property doesn't contain : treat property
as the resource name and pass property to ResourceHandler.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 to ResourceHandler.createResource(String, String)
If property contains more than one : then throw
a ELException
If one of the above steps resulted in the creation of a Resource
instance, call ELContext.setPropertyResolved(true) and return
the result of Resource.getRequestPath()
|
private boolean |
isPropertyValid(java.lang.String property) |
boolean |
isReadOnly(javax.el.ELContext context,
java.lang.Object base,
java.lang.Object property) |
void |
setValue(javax.el.ELContext context,
java.lang.Object base,
java.lang.Object property,
java.lang.Object value)
This is basically a no-op.
|
public java.lang.Object getValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)
null
and base is
an instance of ResourceHandler
, perform the following:
property
doesn't contain :
treat property
as the resource name and pass property
to ResourceHandler.createResource(String)
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 to ResourceHandler.createResource(String, String)
property
contains more than one :
then throw
a ELException
Resource
instance, call ELContext.setPropertyResolved(true)
and return
the result of Resource.getRequestPath()
getValue
in class javax.el.ELResolver
ELResolver.getValue(javax.el.ELContext, Object, Object)
public java.lang.Class<?> getType(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)
getType
in class javax.el.ELResolver
null
as this resolver only performs lookupsjavax.el.PropertyNotFoundException
- if base and property are nullpublic void setValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property, java.lang.Object value)
setValue
in class javax.el.ELResolver
javax.el.PropertyNotFoundException
- if base and property are nullpublic boolean isReadOnly(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)
isReadOnly
in class javax.el.ELResolver
false
(basically ignored by the EL system)javax.el.PropertyNotFoundException
- if base and property are nullpublic java.util.Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(javax.el.ELContext context, java.lang.Object base)
getFeatureDescriptors
in class javax.el.ELResolver
null
- there is no way to query the
ResourceManager
for all known resourcespublic java.lang.Class<?> getCommonPropertyType(javax.el.ELContext context, java.lang.Object base)
getCommonPropertyType
in class javax.el.ELResolver
String.class
- getType() expects String propertiesprivate boolean isPropertyValid(java.lang.String property)
Copyright © 2002-2013 Oracle America, Inc. All Rights Reserved.