SLING-2275 Consolidate property name for the servlet registration with the respective property name of the SimpleWebDav servlet which uses dav.root
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1199671 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java b/src/main/java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java
index 44664c0..8c19559 100644
--- a/src/main/java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java
+++ b/src/main/java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java
@@ -61,14 +61,14 @@
/**
* 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 @@
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 @@
// 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);
}
}
diff --git a/src/main/resources/OSGI-INF/metatype/metatype.properties b/src/main/resources/OSGI-INF/metatype/metatype.properties
index 1eee1cd..51f0e8e 100644
--- a/src/main/resources/OSGI-INF/metatype/metatype.properties
+++ b/src/main/resources/OSGI-INF/metatype/metatype.properties
@@ -33,6 +33,6 @@
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".