org.apache.sling.resourceresolver.impl.helper
Class StarResource
java.lang.Object
org.apache.sling.api.adapter.SlingAdaptable
org.apache.sling.api.resource.AbstractResource
org.apache.sling.api.resource.SyntheticResource
org.apache.sling.resourceresolver.impl.helper.StarResource
- 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(value=java.lang.String.class))
public class StarResource- extends org.apache.sling.api.resource.SyntheticResource
Used to provide the equivalent of an empty Node for GET requests to
*.something (SLING-344)
| Fields inherited from interface org.apache.sling.api.resource.Resource |
RESOURCE_TYPE_NON_EXISTING |
|
Constructor Summary |
StarResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String path)
|
|
Method Summary |
|
adaptTo(Class<Type> type)
|
static boolean |
appliesTo(String path)
True if a StarResource should be used for the given request, if a real
Resource was not found |
String |
getResourceSuperType()
Calls ResourceUtil.getResourceSuperType(ResourceResolver, String)
method to dynamically resolve the resource super type of this star
resource. |
static boolean |
isStarResource(org.apache.sling.api.resource.Resource res)
Returns true if the path of the resource ends with the
SLASH_STAR and therefore should be considered a star resource. |
| Methods inherited from class org.apache.sling.api.resource.SyntheticResource |
getPath, getResourceMetadata, getResourceResolver, getResourceType, toString |
| 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 |
DEFAULT_RESOURCE_TYPE
public static final String DEFAULT_RESOURCE_TYPE
- See Also:
- Constant Field Values
StarResource
public StarResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String path)
appliesTo
public static boolean appliesTo(String path)
- True if a StarResource should be used for the given request, if a real
Resource was not found
isStarResource
public static boolean isStarResource(org.apache.sling.api.resource.Resource res)
- Returns true if the path of the resource ends with the
SLASH_STAR and therefore should be considered a star resource.
getResourceSuperType
public String getResourceSuperType()
- Calls
ResourceUtil.getResourceSuperType(ResourceResolver, String)
method to dynamically resolve the resource super type of this star
resource.
- Specified by:
getResourceSuperType in interface org.apache.sling.api.resource.Resource- Overrides:
getResourceSuperType in class org.apache.sling.api.resource.SyntheticResource
adaptTo
public <Type> Type adaptTo(Class<Type> type)
- Specified by:
adaptTo in interface org.apache.sling.api.adapter.Adaptable- Overrides:
adaptTo in class org.apache.sling.api.adapter.SlingAdaptable
Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.