Class AuthorizableResource

    • Method Detail

      • getPath

        public String getPath()
        Returns the absolute path of this resource in the resource tree.
        The resource path
      • getResourceType

        public String getResourceType()
        The resource type is meant to point to rendering/processing scripts, editing dialogs, etc. It is usually a path in the repository, where scripts and other tools definitions are found, but the ResourceResolver is free to set this to any suitable value such as the primary node type of the JCR node from which the resource is created.

        If the resource instance represents a resource which is not actually existing, this method returns Resource.RESOURCE_TYPE_NON_EXISTING.

        The resource type
      • getResourceMetadata

        public ResourceMetadata getResourceMetadata()
        Returns the meta data of this resource. The concrete data contained in the ResourceMetadata object returned is implementation specific except for the ResourceMetadata.RESOLUTION_PATH property which is required to be set to the part of the request URI used to resolve the resource.
        The resource meta data
        See Also:
      • getResourceResolver

        public ResourceResolver getResourceResolver()
        Returns the ResourceResolver from which this resource has been retrieved.
        The resource resolver
      • adaptTo

        public <AdapterType> AdapterType adaptTo​(Class<AdapterType> type)
        Calls into the registered AdapterManager to adapt this object to the desired type.

        This method implements a cache of adapters to improve performance. That is repeated calls to this method with the same class will result in the same object to be returned.

        Specified by:
        adaptTo in interface Adaptable
        adaptTo in class SlingAdaptable
        Type Parameters:
        AdapterType - The generic type to which this resource is adapted to
        type - The Class object of the target type, such as javax.jcr.Node.class or
        The adapter target or null if the resource cannot adapt to the requested type