Class PrincipalResource
java.lang.Object
org.apache.sling.api.adapter.SlingAdaptable
org.apache.sling.api.resource.AbstractResource
org.apache.sling.jackrabbit.usermanager.impl.resource.BaseResource
org.apache.sling.jackrabbit.usermanager.impl.resource.PrincipalResource
- All Implemented Interfaces:
org.apache.sling.api.adapter.Adaptable
,org.apache.sling.api.resource.Resource
@Adaptable(adaptableClass=org.apache.sling.api.resource.Resource.class,adapters={@Adapter({java.util.Map.class,org.apache.sling.api.resource.ValueMap.class,java.security.Principal.class}),@Adapter(condition="If the resource is an PrincipalResource and represents a JCR principal",value=java.security.Principal.class)})
public class PrincipalResource
extends BaseResource
Resource implementation for Principal (SLING-11098)
-
Field Summary
FieldsFields inherited from class org.apache.sling.jackrabbit.usermanager.impl.resource.BaseResource
resourceResolver
Fields inherited from interface org.apache.sling.api.resource.Resource
RESOURCE_TYPE_NON_EXISTING
-
Constructor Summary
ConstructorsConstructorDescriptionPrincipalResource
(Principal principal, org.apache.sling.api.resource.ResourceResolver resourceResolver, String path) -
Method Summary
Modifier and TypeMethodDescription<T> T
protected String
toResourceType
(Principal principal) determine the resource type for the principal.toString()
Methods inherited from class org.apache.sling.jackrabbit.usermanager.impl.resource.BaseResource
getPath, getResourceMetadata, getResourceResolver, getResourceSuperType
Methods inherited from class org.apache.sling.api.resource.AbstractResource
getChild, getChildren, getName, getParent, getValueMap, hasChildren, isResourceType, listChildren
Methods inherited from class org.apache.sling.api.adapter.SlingAdaptable
setAdapterManager, unsetAdapterManager
-
Field Details
-
principal
-
-
Constructor Details
-
PrincipalResource
-
-
Method Details
-
toResourceType
determine the resource type for the principal.- Parameters:
principal
- the principal to consider- Returns:
- the resource type
-
getResourceType
-
adaptTo
- Specified by:
adaptTo
in interfaceorg.apache.sling.api.adapter.Adaptable
- Overrides:
adaptTo
in classorg.apache.sling.api.adapter.SlingAdaptable
-
toString
-