Package com.adobe.acs.commons.mcp.form
Class AbstractResourceImpl
- java.lang.Object
-
- org.apache.sling.api.adapter.SlingAdaptable
-
- org.apache.sling.api.resource.AbstractResource
-
- com.adobe.acs.commons.mcp.form.AbstractResourceImpl
-
- All Implemented Interfaces:
org.apache.sling.api.adapter.Adaptable,org.apache.sling.api.resource.Resource
@ProviderType public class AbstractResourceImpl extends org.apache.sling.api.resource.AbstractResourceThis is a mock resource class used to pass values in to the granite UI components.
-
-
Constructor Summary
Constructors Constructor Description AbstractResourceImpl(String path, String resourceType, String resourceSuperType, org.apache.sling.api.resource.ResourceMetadata metadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TadaptTo(Class<T> clazz)voidaddChild(org.apache.sling.api.resource.Resource res)AbstractResourceImplcloneResource()Map<String,Object>convertTreeToMap()voiddisableMergeResourceProvider()org.apache.sling.api.resource.ResourcegetChild(String relPath)org.apache.sling.api.resource.ResourcegetChildNamed(String name)Iterable<org.apache.sling.api.resource.Resource>getChildren()StringgetName()org.apache.sling.api.resource.ResourcegetParent()StringgetPath()org.apache.sling.api.resource.ResourceMetadatagetResourceMetadata()org.apache.sling.api.resource.ResourceResolvergetResourceResolver()StringgetResourceSuperType()StringgetResourceType()org.apache.sling.api.resource.ValueMapgetValueMap()booleanhasChildren()booleanisResourceType(String type)Iterator<org.apache.sling.api.resource.Resource>listChildren()voidremoveChild(org.apache.sling.api.resource.Resource res)voidsetPath(String path)voidsetResourceResolver(org.apache.sling.api.resource.ResourceResolver rr)
-
-
-
Method Detail
-
adaptTo
public <T> T adaptTo(Class<T> clazz)
- Specified by:
adaptToin interfaceorg.apache.sling.api.adapter.Adaptable- Overrides:
adaptToin classorg.apache.sling.api.adapter.SlingAdaptable
-
setResourceResolver
public void setResourceResolver(org.apache.sling.api.resource.ResourceResolver rr)
-
addChild
public void addChild(org.apache.sling.api.resource.Resource res)
-
removeChild
public void removeChild(org.apache.sling.api.resource.Resource res)
-
getName
public String getName()
- Specified by:
getNamein interfaceorg.apache.sling.api.resource.Resource- Overrides:
getNamein classorg.apache.sling.api.resource.AbstractResource
-
getParent
public org.apache.sling.api.resource.Resource getParent()
- Specified by:
getParentin interfaceorg.apache.sling.api.resource.Resource- Overrides:
getParentin classorg.apache.sling.api.resource.AbstractResource
-
getChild
public org.apache.sling.api.resource.Resource getChild(String relPath)
- Specified by:
getChildin interfaceorg.apache.sling.api.resource.Resource- Overrides:
getChildin classorg.apache.sling.api.resource.AbstractResource
-
getChildNamed
public org.apache.sling.api.resource.Resource getChildNamed(String name)
-
getChildren
public Iterable<org.apache.sling.api.resource.Resource> getChildren()
- Specified by:
getChildrenin interfaceorg.apache.sling.api.resource.Resource- Overrides:
getChildrenin classorg.apache.sling.api.resource.AbstractResource
-
listChildren
public Iterator<org.apache.sling.api.resource.Resource> listChildren()
- Specified by:
listChildrenin interfaceorg.apache.sling.api.resource.Resource- Overrides:
listChildrenin classorg.apache.sling.api.resource.AbstractResource
-
hasChildren
public boolean hasChildren()
- Specified by:
hasChildrenin interfaceorg.apache.sling.api.resource.Resource- Overrides:
hasChildrenin classorg.apache.sling.api.resource.AbstractResource
-
isResourceType
public boolean isResourceType(String type)
- Specified by:
isResourceTypein interfaceorg.apache.sling.api.resource.Resource- Overrides:
isResourceTypein classorg.apache.sling.api.resource.AbstractResource
-
setPath
public void setPath(String path)
-
getPath
public String getPath()
-
getResourceType
public String getResourceType()
-
getResourceSuperType
public String getResourceSuperType()
-
getResourceMetadata
public org.apache.sling.api.resource.ResourceMetadata getResourceMetadata()
-
getValueMap
public org.apache.sling.api.resource.ValueMap getValueMap()
- Specified by:
getValueMapin interfaceorg.apache.sling.api.resource.Resource- Overrides:
getValueMapin classorg.apache.sling.api.resource.AbstractResource
-
getResourceResolver
public org.apache.sling.api.resource.ResourceResolver getResourceResolver()
-
cloneResource
public AbstractResourceImpl cloneResource()
-
disableMergeResourceProvider
public void disableMergeResourceProvider()
-
-