Class ResourceELResolver


  • public class ResourceELResolver
    extends jakarta.el.ELResolver
    ELResolver to resolve expressions like the following:
    • #{resource['library:resource']}
    • #{resource['resource']}
    • Constructor Detail

      • ResourceELResolver

        public ResourceELResolver()
    • Method Detail

      • getValue

        public Object getValue​(jakarta.el.ELContext context,
                               Object base,
                               Object property)
        If base and property are not null and base is an instance of ResourceHandler, perform the following:
        Specified by:
        getValue in class jakarta.el.ELResolver
        See Also:
        ELResolver.getValue(jakarta.el.ELContext, Object, Object)
      • getType

        public Class<?> getType​(jakarta.el.ELContext context,
                                Object base,
                                Object property)
        Specified by:
        getType in class jakarta.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 class jakarta.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 class jakarta.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 class jakarta.el.ELResolver
        Returns:
        null - there is no way to query the ResourceManager for all known resources
      • getCommonPropertyType

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