incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r947111 - /sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/NonExistingResource.java
Date Fri, 21 May 2010 18:19:39 GMT
Author: cziegeler
Date: Fri May 21 18:19:39 2010
New Revision: 947111

URL: http://svn.apache.org/viewvc?rev=947111&view=rev
Log:
Clarify javadocs

Modified:
    sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/NonExistingResource.java

Modified: sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/NonExistingResource.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/NonExistingResource.java?rev=947111&r1=947110&r2=947111&view=diff
==============================================================================
--- sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/NonExistingResource.java
(original)
+++ sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/NonExistingResource.java
Fri May 21 18:19:39 2010
@@ -20,14 +20,29 @@ package org.apache.sling.api.resource;
 
 /**
  * Simple helper class representing nonexisting resources.
+ *
+ * This is an utility class to <em>create</em> non existing resources.
+ * It is not meant to be used to check if a resource is a non existing
+ * resource. Use the {@link 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.
  */
 public final class NonExistingResource extends SyntheticResource {
 
-    public NonExistingResource(ResourceResolver resourceResolver,
-            String resourceURI) {
+    /**
+     * Create a new non existing resource.
+     * @param resourceResolver The resource resolver.
+     * @param resourceURI The path of the resource.
+     */
+    public NonExistingResource(final ResourceResolver resourceResolver,
+            final String resourceURI) {
         super(resourceResolver, resourceURI, RESOURCE_TYPE_NON_EXISTING);
     }
 
+    /**
+     * @see org.apache.sling.api.resource.SyntheticResource#getResourceType()
+     */
     public final String getResourceType() {
         // overwrite to prevent overwriting of this method in extensions of
         // this class because the specific resource type is the marker of a



Mime
View raw message