Class AuthorizableResource

All Implemented Interfaces:
Adaptable, Resource
Direct Known Subclasses:
NestedAuthorizableResource

@Adaptable(adaptableClass=Resource.class,adapters={@Adapter({java.util.Map.class,ValueMap.class,org.apache.jackrabbit.api.security.user.Authorizable.class}),@Adapter(condition="If the resource is an AuthorizableResource and represents a JCR User",value=org.apache.jackrabbit.api.security.user.User.class),@Adapter(condition="If the resource is an AuthorizableResource and represents a JCR Group",value=org.apache.jackrabbit.api.security.user.Group.class)}) public class AuthorizableResource extends BaseResource
Resource implementation for Authorizable
  • Field Details

    • authorizable

      protected final org.apache.jackrabbit.api.security.user.Authorizable authorizable
    • systemUserManagerPaths

      protected final SystemUserManagerPaths systemUserManagerPaths
  • Constructor Details

  • Method Details

    • toResourceType

      protected String toResourceType(org.apache.jackrabbit.api.security.user.Authorizable authorizable)
      determine the resource type for the authorizable.
      Parameters:
      authorizable - the authorizable to consider
      Returns:
      the resource type
    • getResourceType

      public String getResourceType()
      Description copied from interface: Resource
      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.

      Returns:
      The resource type
    • adaptTo

      public <T> T adaptTo(Class<T> type)
      Description copied from class: SlingAdaptable
      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
      Overrides:
      adaptTo in class SlingAdaptable
      Type Parameters:
      T - The generic type to which this resource is adapted to
      Parameters:
      type - The Class object of the target type, such as javax.jcr.Node.class or java.io.File.class
      Returns:
      The adapter target or null if the resource cannot adapt to the requested type
    • toString

      public String toString()
      Overrides:
      toString in class Object