public class SocialPropertyResourceImpl extends AbstractResource implements SocialResource
RESOURCE_TYPE_NON_EXISTING
Constructor and Description |
---|
SocialPropertyResourceImpl(java.lang.String path,
java.lang.String parentResourceType,
SocialResourceProvider provider,
ResourceResolver resourceResolver,
java.lang.String propertyName,
java.lang.Object propertyValue)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
<AdapterType> |
adaptTo(java.lang.Class<AdapterType> type)
Calls into the registered
AdapterManager to adapt this object to
the desired type . |
boolean |
checkPermissions(java.lang.String permission) |
java.lang.String |
getPath()
Returns the absolute path of this resource in the resource tree.
|
ResourceMetadata |
getResourceMetadata()
Returns the meta data of this resource.
|
SocialResourceProvider |
getResourceProvider() |
ResourceResolver |
getResourceResolver()
Returns the
ResourceResolver from which this resource has been
retrieved. |
java.lang.String |
getResourceSuperType()
Returns the super type of the resource if the resource defines its
own super type.
|
java.lang.String |
getResourceType()
The resource type is meant to point to rendering/processing scripts,
editing dialogs, etc.
|
Resource |
getRootJCRNode() |
getChild, getChildren, getName, getParent, getValueMap, hasChildren, isResourceType, listChildren
setAdapterManager, unsetAdapterManager
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChild, getChildren, getName, getParent, getValueMap, hasChildren, isResourceType, listChildren
public SocialPropertyResourceImpl(java.lang.String path, java.lang.String parentResourceType, SocialResourceProvider provider, ResourceResolver resourceResolver, java.lang.String propertyName, java.lang.Object propertyValue)
path
- the resource pathparentResourceType
- the parent resource typeprovider
- the providerresourceResolver
- the resource resolverpropertyName
- the property namepropertyValue
- the property valuepublic java.lang.String getPath()
Resource
public java.lang.String getResourceType()
Resource
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
.
getResourceType
in interface Resource
public java.lang.String getResourceSuperType()
Resource
null
is returned.
A resource might return a resource super type to overwrite the
resource type hierarchy.
If a client is interested in the effective resource super type
of a resource, it should call ResourceResolver.getParentResourceType(Resource)
.getResourceSuperType
in interface Resource
null
.public ResourceMetadata getResourceMetadata()
Resource
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.getResourceMetadata
in interface Resource
ResourceMetadata
public ResourceResolver getResourceResolver()
Resource
ResourceResolver
from which this resource has been
retrieved.getResourceResolver
in interface Resource
public SocialResourceProvider getResourceProvider()
getResourceProvider
in interface SocialResource
public Resource getRootJCRNode()
getRootJCRNode
in interface SocialResource
public <AdapterType> AdapterType adaptTo(java.lang.Class<AdapterType> type)
SlingAdaptable
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.
adaptTo
in interface Adaptable
adaptTo
in class SlingAdaptable
AdapterType
- The generic type to which this resource is adapted
totype
- The Class object of the target type, such as
javax.jcr.Node.class
or
java.io.File.class
null
if the resource cannot
adapt to the requested typepublic boolean checkPermissions(java.lang.String permission)
checkPermissions
in interface SocialResource
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"