incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r836370 - in /sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal: FsFolderServlet.java FsProviderConstants.java FsResource.java
Date Sun, 15 Nov 2009 15:07:01 GMT
Author: fmeschbe
Date: Sun Nov 15 15:07:00 2009
New Revision: 836370

URL: http://svn.apache.org/viewvc?rev=836370&view=rev
Log:
SLING-1187 Remove FsProviderConstants (moved constants to FsResource) and FsFolderServlet
(duplicate code from default GET Servlet)

Removed:
    sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsFolderServlet.java
    sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsProviderConstants.java
Modified:
    sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResource.java

Modified: sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResource.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResource.java?rev=836370&r1=836369&r2=836370&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResource.java
(original)
+++ sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResource.java
Sun Nov 15 15:07:00 2009
@@ -38,6 +38,26 @@
  */
 public class FsResource extends SlingAdaptable implements Resource {
 
+
+    /**
+     * The common resource super type for files and folders mapped into the
+     * resource tree by the {@link FsResourceProvider} (value is
+     * "sling/fs/resource").
+     */
+    private static final String RESOURCE_TYPE_ROOT = "sling/fs/resource";
+
+    /**
+     * The resource type for file system files mapped into the resource tree by
+     * the {@link FsResourceProvider} (value is "sling/fs/file").
+     */
+    private static final String RESOURCE_TYPE_FILE = "sling/fs/file";
+
+    /**
+     * The resource type for file system folders mapped into the resource tree
+     * by the {@link FsResourceProvider} (value is "sling/fs/folder").
+     */
+    private static final String RESOURCE_TYPE_FOLDER = "sling/fs/folder";
+
     // default log, assigned on demand
     private Logger log;
 
@@ -58,7 +78,7 @@
 
     /**
      * Creates an instance of this Filesystem resource.
-     * 
+     *
      * @param resolver The owning resource resolver
      * @param resourcePath The resource path in the resource tree
      * @param file The wrapped file
@@ -103,7 +123,7 @@
      * Returns {@link FsProviderConstants#RESOURCE_TYPE_ROOT}
      */
     public String getResourceSuperType() {
-        return FsProviderConstants.RESOURCE_TYPE_ROOT;
+        return RESOURCE_TYPE_ROOT;
     }
 
     /**
@@ -114,8 +134,8 @@
     public String getResourceType() {
         if (resourceType == null) {
             resourceType = file.isFile()
-                    ? FsProviderConstants.RESOURCE_TYPE_FILE
-                    : FsProviderConstants.RESOURCE_TYPE_FOLDER;
+                    ? RESOURCE_TYPE_FILE
+                    : RESOURCE_TYPE_FOLDER;
         }
 
         return resourceType;



Mime
View raw message