incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1199671 - in /sling/trunk/bundles/jcr/davex/src/main: java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java resources/OSGI-INF/metatype/metatype.properties
Date Wed, 09 Nov 2011 09:10:30 GMT
Author: fmeschbe
Date: Wed Nov  9 09:10:30 2011
New Revision: 1199671

URL: http://svn.apache.org/viewvc?rev=1199671&view=rev
Log:
SLING-2275 Consolidate property name for the servlet registration with the respective property
name of the SimpleWebDav servlet which uses dav.root

Modified:
    sling/trunk/bundles/jcr/davex/src/main/java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java
    sling/trunk/bundles/jcr/davex/src/main/resources/OSGI-INF/metatype/metatype.properties

Modified: sling/trunk/bundles/jcr/davex/src/main/java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/davex/src/main/java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java?rev=1199671&r1=1199670&r2=1199671&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/davex/src/main/java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java
(original)
+++ sling/trunk/bundles/jcr/davex/src/main/java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java
Wed Nov  9 09:10:30 2011
@@ -61,14 +61,14 @@ public class SlingDavExServlet extends J
     /**
      * Default value for the DavEx servlet registration.
      */
-    private static final String DEFAULT_ALIAS = "/server";
+    private static final String DEFAULT_DAV_ROOT = "/server";
 
     /**
      * Name of the property to configure the location for the DavEx servlet
-     * registration. Default for the property is {@link #DEFAULT_ALIAS}.
+     * registration. Default for the property is {@link #DEFAULT_DAV_ROOT}.
      */
-    @Property(value=DEFAULT_ALIAS)
-    private static final String PROP_ALIAS = "alias";
+    @Property(value=DEFAULT_DAV_ROOT)
+    private static final String PROP_DAV_ROOT = "dav.root";
 
     /**
      * The name of the service property of the registered dummy service to cause
@@ -109,13 +109,13 @@ public class SlingDavExServlet extends J
         final AuthHttpContext context = new AuthHttpContext();
         context.setAuthenticationSupport(authSupport);
 
-        final String alias = OsgiUtil.toString(config.get(PROP_ALIAS), DEFAULT_ALIAS);
+        final String davRoot = OsgiUtil.toString(config.get(PROP_DAV_ROOT), DEFAULT_DAV_ROOT);
 
         // prepare DavEx servlet config
         final Dictionary<String, String> initProps = new Hashtable<String, String>();
 
         // prefix to the servlet
-        initProps.put(INIT_PARAM_RESOURCE_PATH_PREFIX, alias);
+        initProps.put(INIT_PARAM_RESOURCE_PATH_PREFIX, davRoot);
 
         // put the tmp files into Sling home -- or configurable ???
         initProps.put(INIT_PARAM_HOME, slingSettings.getSlingHome() + "/jackrabbit");
@@ -126,17 +126,17 @@ public class SlingDavExServlet extends J
 
         // register and handle registration failure
         try {
-            this.httpService.registerServlet(alias, this, initProps, context);
-            this.servletAlias = alias;
+            this.httpService.registerServlet(davRoot, this, initProps, context);
+            this.servletAlias = davRoot;
 
             java.util.Properties dummyServiceProperties = new java.util.Properties();
             dummyServiceProperties.put(Constants.SERVICE_VENDOR, config.get(Constants.SERVICE_VENDOR));
             dummyServiceProperties.put(Constants.SERVICE_DESCRIPTION,
                 "Helper for " + config.get(Constants.SERVICE_DESCRIPTION));
-            dummyServiceProperties.put(PAR_AUTH_REQ, "-" + alias);
+            dummyServiceProperties.put(PAR_AUTH_REQ, "-" + davRoot);
             this.dummyService = bundleContext.registerService("java.lang.Object", new Object(),
dummyServiceProperties);
         } catch (Exception e) {
-            LoggerFactory.getLogger(getClass()).error("activate: Failed registering DavEx
Servlet at " + alias, e);
+            LoggerFactory.getLogger(getClass()).error("activate: Failed registering DavEx
Servlet at " + davRoot, e);
         }
     }
 

Modified: sling/trunk/bundles/jcr/davex/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/davex/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=1199671&r1=1199670&r2=1199671&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/davex/src/main/resources/OSGI-INF/metatype/metatype.properties
(original)
+++ sling/trunk/bundles/jcr/davex/src/main/resources/OSGI-INF/metatype/metatype.properties
Wed Nov  9 09:10:30 2011
@@ -33,6 +33,6 @@ dav.description = The DavEx Servlet allo
  requests to this servlet do not pass by the Sling Main Servlet and request \
  processing.
 
-alias.name = Root Path
-alias.description = The root path at which the DavEx Servlet is \
+dav.root.name = Root Path
+dav.root.description = The root path at which the DavEx Servlet is \
  accessible. The default value is "/server".



Mime
View raw message