public final class ConfigurationResourceWrapper
extends org.apache.sling.api.resource.AbstractResource
ResourceWrapper
because when adapting
to a Sling Model the replace valuemap would not take effect but the original value map.Constructor and Description |
---|
ConfigurationResourceWrapper(org.apache.sling.api.resource.Resource resource,
org.apache.sling.api.resource.ValueMap props) |
Modifier and Type | Method and Description |
---|---|
<AdapterType> |
adaptTo(Class<AdapterType> type) |
org.apache.sling.api.resource.Resource |
getChild(String relPath) |
Iterable<org.apache.sling.api.resource.Resource> |
getChildren() |
String |
getName() |
org.apache.sling.api.resource.Resource |
getParent() |
String |
getPath() |
org.apache.sling.api.resource.ResourceMetadata |
getResourceMetadata() |
org.apache.sling.api.resource.ResourceResolver |
getResourceResolver() |
String |
getResourceSuperType() |
String |
getResourceType() |
org.apache.sling.api.resource.ValueMap |
getValueMap() |
boolean |
hasChildren() |
boolean |
isResourceType(String resourceType) |
Iterator<org.apache.sling.api.resource.Resource> |
listChildren() |
String |
toString() |
public ConfigurationResourceWrapper(org.apache.sling.api.resource.Resource resource, org.apache.sling.api.resource.ValueMap props)
public <AdapterType> AdapterType adaptTo(Class<AdapterType> type)
adaptTo
in interface org.apache.sling.api.adapter.Adaptable
adaptTo
in class org.apache.sling.api.adapter.SlingAdaptable
public org.apache.sling.api.resource.ValueMap getValueMap()
getValueMap
in interface org.apache.sling.api.resource.Resource
getValueMap
in class org.apache.sling.api.resource.AbstractResource
public String getPath()
public String getName()
getName
in interface org.apache.sling.api.resource.Resource
getName
in class org.apache.sling.api.resource.AbstractResource
public org.apache.sling.api.resource.Resource getParent()
getParent
in interface org.apache.sling.api.resource.Resource
getParent
in class org.apache.sling.api.resource.AbstractResource
public Iterator<org.apache.sling.api.resource.Resource> listChildren()
listChildren
in interface org.apache.sling.api.resource.Resource
listChildren
in class org.apache.sling.api.resource.AbstractResource
public Iterable<org.apache.sling.api.resource.Resource> getChildren()
getChildren
in interface org.apache.sling.api.resource.Resource
getChildren
in class org.apache.sling.api.resource.AbstractResource
public org.apache.sling.api.resource.Resource getChild(String relPath)
getChild
in interface org.apache.sling.api.resource.Resource
getChild
in class org.apache.sling.api.resource.AbstractResource
public String getResourceType()
public String getResourceSuperType()
public boolean hasChildren()
hasChildren
in interface org.apache.sling.api.resource.Resource
hasChildren
in class org.apache.sling.api.resource.AbstractResource
public boolean isResourceType(String resourceType)
isResourceType
in interface org.apache.sling.api.resource.Resource
isResourceType
in class org.apache.sling.api.resource.AbstractResource
public org.apache.sling.api.resource.ResourceMetadata getResourceMetadata()
public org.apache.sling.api.resource.ResourceResolver getResourceResolver()
public String toString()
toString
in class Object
resource type
and
path
as well as the string representation of the wrapped resource}.Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.