Class NonExistingResource

  extended by
      extended by
          extended by
              extended by
All Implemented Interfaces:
Adaptable, Resource

public final class NonExistingResource
extends SyntheticResource

Simple helper class representing nonexisting resources. This is an utility class to create non existing resources. It is not meant to be used to check if a resource is a non existing resource. Use the 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.

Field Summary
Fields inherited from interface
Constructor Summary
NonExistingResource(ResourceResolver resourceResolver, String resourceURI)
          Create a new non existing resource.
Method Summary
 String getResourceType()
          The resource type is meant to point to rendering/processing scripts, editing dialogs, etc.
 String toString()
Methods inherited from class
getPath, getResourceMetadata, getResourceResolver, getResourceSuperType
Methods inherited from class
getChild, getName, getParent, isResourceType, listChildren
Methods inherited from class
adaptTo, setAdapterManager, unsetAdapterManager
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface

Constructor Detail


public NonExistingResource(ResourceResolver resourceResolver,
                           String resourceURI)
Create a new non existing resource.

resourceResolver - The resource resolver.
resourceURI - The path of the resource.
Method Detail


public final String getResourceType()
Description copied from interface: Resource
The resource type is meant to point to rendering/processing scripts, editing dialogs, etc. It is usually a path in the repository, where scripts and other tools definitions are found, but the 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.

Specified by:
getResourceType in interface Resource
getResourceType in class SyntheticResource
See Also:


public String toString()
toString in class SyntheticResource

Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.