public final class NonExistingResource extends SyntheticResource
ResourceUtil.isNonExistingResource(Resource)
method instead (or check the resource type yourself). The reason
for this is that this resource might be wrapped by other resource
implementations like resource decorators etc.RESOURCE_TYPE_NON_EXISTING
Constructor and Description |
---|
NonExistingResource(ResourceResolver resourceResolver,
String resourceURI)
Create a new non existing resource.
|
Modifier and Type | Method and Description |
---|---|
String |
getResourceType()
The resource type is meant to point to rendering/processing scripts,
editing dialogs, etc.
|
String |
toString() |
getPath, getResourceMetadata, getResourceResolver, getResourceSuperType
getChild, getChildren, getName, getParent, getValueMap, hasChildren, isResourceType, listChildren
adaptTo, setAdapterManager, unsetAdapterManager
public NonExistingResource(ResourceResolver resourceResolver, String resourceURI)
resourceResolver
- The resource resolver.resourceURI
- The path of the resource.public final 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
getResourceType
in class SyntheticResource
SyntheticResource.getResourceType()
public String toString()
toString
in class SyntheticResource
Copyright © 2015 The Apache Software Foundation. All rights reserved.