com.sun.faces.el
Class ResourceELResolver

java.lang.Object
  extended by javax.el.ELResolver
      extended by com.sun.faces.el.ResourceELResolver

public class ResourceELResolver
extends javax.el.ELResolver

ELResolver to resolve expressions like the following:


Field Summary
 
Fields inherited from class javax.el.ELResolver
RESOLVABLE_AT_DESIGN_TIME, TYPE
 
Constructor Summary
ResourceELResolver()
           
 
Method Summary
 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()
 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.
 
Methods inherited from class javax.el.ELResolver
invoke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceELResolver

public ResourceELResolver()
Method Detail

getValue

public 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:

Specified by:
getValue in class javax.el.ELResolver
See Also:
ELResolver.getValue(javax.el.ELContext, Object, Object)

getType

public java.lang.Class<?> getType(javax.el.ELContext context,
                                  java.lang.Object base,
                                  java.lang.Object property)
Specified by:
getType in class javax.el.ELResolver
Returns:
null as this resolver only performs lookups
Throws:
javax.el.PropertyNotFoundException - if base and property are null

setValue

public void setValue(javax.el.ELContext context,
                     java.lang.Object base,
                     java.lang.Object property,
                     java.lang.Object value)
This is basically a no-op.

Specified by:
setValue in class javax.el.ELResolver
Throws:
javax.el.PropertyNotFoundException - if base and property are null

isReadOnly

public boolean isReadOnly(javax.el.ELContext context,
                          java.lang.Object base,
                          java.lang.Object property)
Specified by:
isReadOnly in class javax.el.ELResolver
Returns:
false (basically ignored by the EL system)
Throws:
javax.el.PropertyNotFoundException - if base and property are null

getFeatureDescriptors

public java.util.Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(javax.el.ELContext context,
                                                                              java.lang.Object base)
Specified by:
getFeatureDescriptors in class javax.el.ELResolver
Returns:
null - there is no way to query the ResourceManager for all known resources

getCommonPropertyType

public java.lang.Class<?> getCommonPropertyType(javax.el.ELContext context,
                                                java.lang.Object base)
Specified by:
getCommonPropertyType in class javax.el.ELResolver
Returns:
String.class - getType() expects String properties


Copyright © 2011 Oracle America, Inc. All Rights Reserved.