This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.jcr.webdav-2.0.2-incubator in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-webdav.git
commit 6d6a706024df420a76be0f44fd9e2b11c0de0476 Author: Felix Meschberger <fmesc...@apache.org> AuthorDate: Tue May 27 10:42:20 2008 +0000 SLING-479 Fix @scr.tags: - normalize metadata attribute settings to "no" - ensure proper metadata and ds attributes are set - create metatype.properties files where required - fix metatype.properties files git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/jcr/webdav@660460 13f79535-47bb-0310-9956-ffa450edef68 --- .../impl/servlets/AbstractSlingWebDavServlet.java | 2 +- .../webdav/impl/servlets/SimpleWebDavServlet.java | 19 +++++----- .../webdav/impl/servlets/SlingWebDavServlet.java | 2 +- .../OSGI-INF/metatype/metatype.properties | 41 ++++++++++++++++++++++ 4 files changed, 54 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/AbstractSlingWebDavServlet.java b/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/AbstractSlingWebDavServlet.java index 08fb63d..a5145d1 100644 --- a/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/AbstractSlingWebDavServlet.java +++ b/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/AbstractSlingWebDavServlet.java @@ -33,7 +33,7 @@ import org.apache.sling.jcr.api.SlingRepository; * * @scr.component * immediate="true" - * metatype="false" + * metatype="no" */ abstract class AbstractSlingWebDavServlet extends SimpleWebdavServlet { diff --git a/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SimpleWebDavServlet.java b/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SimpleWebDavServlet.java index 9fd0577..4cd1947 100644 --- a/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SimpleWebDavServlet.java +++ b/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SimpleWebDavServlet.java @@ -34,18 +34,23 @@ import org.osgi.service.http.NamespaceException; /** * The <code>SimpleWebDavServlet</code> * - * @scr.component + * @scr.component label="%dav.name" description="%dav.description" + * @scr.property name="service.description" + * value="Sling JcrResourceResolverFactory Implementation" + * @scr.property name="service.vendor" value="The Apache Software Foundation" */ public class SimpleWebDavServlet extends AbstractSlingWebDavServlet { - /** @scr.property value="/dav" */ + /** @scr.property valueRef="DEFAULT_CONTEXT" */ private static final String PROP_CONTEXT = "dav.root"; - /** @scr.property value="Sling WebDAV" */ + /** @scr.property valueRef="DEFAULT_REALM" */ private static final String PROP_REALM = "dav.realm"; private static final String DEFAULT_CONTEXT = "/dav"; + private static final String DEFAULT_REALM = "Sling WebDAV"; + /** @scr.reference */ private HttpService httpService; @@ -98,11 +103,9 @@ public class SimpleWebDavServlet extends AbstractSlingWebDavServlet { initparams.put(INIT_PARAM_RESOURCE_PATH_PREFIX, context); - String value = getString(props, PROP_REALM, null); - if (value != null) { - initparams.put(INIT_PARAM_AUTHENTICATE_HEADER, "Basic Realm=\"" - + value + "\""); - } + String value = getString(props, PROP_REALM, DEFAULT_REALM); + initparams.put(INIT_PARAM_AUTHENTICATE_HEADER, "Basic Realm=\"" + value + + "\""); // Register servlet, and set the contextPath field to signal successful // registration diff --git a/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SlingWebDavServlet.java b/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SlingWebDavServlet.java index 403cfe3..e68cba3 100644 --- a/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SlingWebDavServlet.java +++ b/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SlingWebDavServlet.java @@ -32,7 +32,7 @@ import org.apache.sling.jcr.webdav.impl.helper.SlingSessionProvider; * * @scr.component * immediate="true" - * metatype="false" + * metatype="no" * * @scr.service * interface="javax.servlet.Servlet" diff --git a/src/main/resources/OSGI-INF/metatype/metatype.properties b/src/main/resources/OSGI-INF/metatype/metatype.properties new file mode 100644 index 0000000..1d6bd0e --- /dev/null +++ b/src/main/resources/OSGI-INF/metatype/metatype.properties @@ -0,0 +1,41 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + + +# +# This file contains localization strings for configuration labels and +# descriptions as used in the metatype.xml descriptor generated by the +# the SCR plugin + +# +# SimpleWebDavServlet +# (This servlet is directly registered with the HttpService besides the +# SlingMainServlet. Requests to this servlet do not pass by Sling) +dav.name = Simple WebDAV Servlet +dav.description = The Simple WebDAV Servlet allows direct access to the \ + complete Repository. It is directly accessible in its own URL space and \ + requests to this servlet do not pass by the Sling Main Servlet and request \ + processing. +dav.root.name = Root Path +dav.root.description = The root path at which the Simple WebDAV Servlet is \ + accessible. The default value is "/dav". +dav.realm.name = Authentication Realm +dav.realm.description = The name of the HTTP Basic Authentication Realm \ + presented to the client to ask for authentication credentials to access the \ + repository. -- To stop receiving notification emails like this one, please contact "commits@sling.apache.org" <commits@sling.apache.org>.