Class RedirectResource
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.RedirectResource
@Adaptable(adaptableClass=Resource.class,
adapters=@Adapter({java.util.Map.class,ValueMap.class}))
public final class RedirectResource
extends SyntheticResource
-
Field Summary
Fields inherited from interface org.apache.sling.api.resource.Resource
RESOURCE_TYPE_NON_EXISTING
-
Constructor Summary
ConstructorsConstructorDescriptionRedirectResource
(ResourceResolver resolver, String path, String target, int status) -
Method Summary
Modifier and TypeMethodDescription<AdapterType>
AdapterTypeCalls into the registeredAdapterManager
to adapt this object to the desiredtype
.toString()
Methods inherited from class org.apache.sling.api.resource.SyntheticResource
getPath, getResourceMetadata, getResourceResolver, getResourceSuperType, getResourceType
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
-
Constructor Details
-
RedirectResource
-
-
Method Details
-
adaptTo
Description copied from class:SlingAdaptable
Calls into the registeredAdapterManager
to adapt this object to the desiredtype
.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.
- Specified by:
adaptTo
in interfaceAdaptable
- Overrides:
adaptTo
in classSlingAdaptable
- Type Parameters:
AdapterType
- The generic type to which this resource is adapted to- Parameters:
type
- The Class object of the target type, such asjavax.jcr.Node.class
orjava.io.File.class
- Returns:
- The adapter target or
null
if the resource cannot adapt to the requested type - See Also:
-
toString
- Overrides:
toString
in classSyntheticResource
-