You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by fm...@apache.org on 2008/05/27 12:42:24 UTC

svn commit: r660460 - in /incubator/sling/trunk: commons/mime/src/main/java/org/apache/sling/commons/mime/internal/ commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/ commons/threads/src/main/java/org/apache/sling/commons/threads/...

Author: fmeschbe
Date: Tue May 27 03:42:20 2008
New Revision: 660460

URL: http://svn.apache.org/viewvc?rev=660460&view=rev
Log:
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

Added:
    incubator/sling/trunk/jcr/webdav/src/main/resources/OSGI-INF/
    incubator/sling/trunk/jcr/webdav/src/main/resources/OSGI-INF/metatype/
    incubator/sling/trunk/jcr/webdav/src/main/resources/OSGI-INF/metatype/metatype.properties
    incubator/sling/trunk/servlets/post/src/main/resources/OSGI-INF/
    incubator/sling/trunk/servlets/post/src/main/resources/OSGI-INF/metatype/
    incubator/sling/trunk/servlets/post/src/main/resources/OSGI-INF/metatype/metatype.properties
    incubator/sling/trunk/servlets/resolver/src/main/resources/
    incubator/sling/trunk/servlets/resolver/src/main/resources/OSGI-INF/
    incubator/sling/trunk/servlets/resolver/src/main/resources/OSGI-INF/metatype/
    incubator/sling/trunk/servlets/resolver/src/main/resources/OSGI-INF/metatype/metatype.properties
Modified:
    incubator/sling/trunk/commons/mime/src/main/java/org/apache/sling/commons/mime/internal/MimeTypeServiceImpl.java
    incubator/sling/trunk/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java
    incubator/sling/trunk/commons/threads/src/main/java/org/apache/sling/commons/threads/impl/DefaultThreadPoolManager.java
    incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java
    incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/debug/RequestProgressTrackerLogFilter.java
    incubator/sling/trunk/engine/src/main/resources/OSGI-INF/metatype/metatype.properties
    incubator/sling/trunk/extensions/apt/parser/src/main/java/org/apache/sling/apt/parser/internal/SlingAptParserImpl.java
    incubator/sling/trunk/extensions/apt/servlet/src/main/java/org/apache/sling/apt/servlet/SlingAptServlet.java
    incubator/sling/trunk/extensions/httpauth/src/main/java/org/apache/sling/httpauth/impl/AuthorizationHeaderAuthenticationHandler.java
    incubator/sling/trunk/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/I18NFilter.java
    incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
    incubator/sling/trunk/jcr/classloader/src/main/java/org/apache/sling/jcr/classloader/internal/RepositoryClassLoaderProviderImpl.java
    incubator/sling/trunk/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java
    incubator/sling/trunk/jcr/jackrabbit-client/src/main/resources/OSGI-INF/metatype/metatype.properties
    incubator/sling/trunk/jcr/jackrabbit-server/src/main/resources/OSGI-INF/metatype/metatype.properties
    incubator/sling/trunk/jcr/ocm/src/main/java/org/apache/sling/jcr/ocm/impl/ObjectContentManagerFactoryImpl.java
    incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
    incubator/sling/trunk/jcr/resource/src/main/resources/OSGI-INF/metatype/metatype.properties
    incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/AbstractSlingWebDavServlet.java
    incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SimpleWebDavServlet.java
    incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SlingWebDavServlet.java
    incubator/sling/trunk/samples/simple-demo/src/main/java/org/apache/sling/sample/Navigation.java
    incubator/sling/trunk/samples/webloader/service/src/main/java/org/apache/sling/samples/webloader/internal/WebLoaderImpl.java
    incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java
    incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/DefaultGetServlet.java
    incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/JsonQueryServlet.java
    incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/RedirectServlet.java
    incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/info/SlingInfoServlet.java
    incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
    incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/SlingServletResolver.java

Modified: incubator/sling/trunk/commons/mime/src/main/java/org/apache/sling/commons/mime/internal/MimeTypeServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/commons/mime/src/main/java/org/apache/sling/commons/mime/internal/MimeTypeServiceImpl.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/commons/mime/src/main/java/org/apache/sling/commons/mime/internal/MimeTypeServiceImpl.java (original)
+++ incubator/sling/trunk/commons/mime/src/main/java/org/apache/sling/commons/mime/internal/MimeTypeServiceImpl.java Tue May 27 03:42:20 2008
@@ -38,7 +38,7 @@
 /**
  * The <code>MimeTypeServiceImpl</code> TODO
  *
- * @scr.component immediate="false" metatype="false"
+ * @scr.component immediate="false" metatype="no"
  * @scr.property name="service.vendor" value="The Apache Software Foundation"
  * @scr.property name="service.description" value="Sling Servlet"
  * @scr.reference name="MimeTypeProvider"

Modified: incubator/sling/trunk/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java (original)
+++ incubator/sling/trunk/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java Tue May 27 03:42:20 2008
@@ -48,7 +48,7 @@
 /**
  * The quartz based implementation of the scheduler.
  *
- * @scr.component
+ * @scr.component metatype="no"
  * @scr.service interface="org.apache.sling.commons.scheduler.Scheduler"
  * @scr.reference name="job" interface="org.apache.sling.commons.scheduler.Job" cardinality="0..n" policy="dynamic"
  * @scr.reference name="task" interface="java.lang.Runnable" cardinality="0..n" policy="dynamic"

Modified: incubator/sling/trunk/commons/threads/src/main/java/org/apache/sling/commons/threads/impl/DefaultThreadPoolManager.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/commons/threads/src/main/java/org/apache/sling/commons/threads/impl/DefaultThreadPoolManager.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/commons/threads/src/main/java/org/apache/sling/commons/threads/impl/DefaultThreadPoolManager.java (original)
+++ incubator/sling/trunk/commons/threads/src/main/java/org/apache/sling/commons/threads/impl/DefaultThreadPoolManager.java Tue May 27 03:42:20 2008
@@ -30,7 +30,7 @@
  * The DefaultThreadPoolManager implements the {@link ThreadPoolManager} interface
  * and is responsible to manage {@link ThreadPool}s.
  *
- * @scr.component metatype="false"
+ * @scr.component metatype="no"
  * @scr.service interface="org.apache.sling.commons.threads.ThreadPoolManager"
  *
  * @version $Id$

Modified: incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java (original)
+++ incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java Tue May 27 03:42:20 2008
@@ -81,8 +81,7 @@
 /**
  * The <code>SlingMainServlet</code> TODO
  *
- * @scr.component immediate="true" label="%sling.name"
- *                description="%sling.description"
+ * @scr.component immediate="true" metatype="no"
  * @scr.property name="sling.root" value="/" private="true"
  * @scr.property name="service.vendor" value="The Apache Software Foundation"
  * @scr.property name="service.description" value="Sling Servlet"

Modified: incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/debug/RequestProgressTrackerLogFilter.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/debug/RequestProgressTrackerLogFilter.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/debug/RequestProgressTrackerLogFilter.java (original)
+++ incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/debug/RequestProgressTrackerLogFilter.java Tue May 27 03:42:20 2008
@@ -33,39 +33,42 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Filter that dumps the output of the RequestProgressTracker to the log
- *  after processing the request.
- *  
- *  @scr.component immediate="true" metatype="false"
- *  @scr.property name="service.description" value="RequestProgressTracker dump filter"
- *  @scr.property name="service.vendor" value="The Apache Software Foundation"
- *  @scr.property name="filter.scope" value="request" private="true"
- *  @scr.service
+/**
+ * Filter that dumps the output of the RequestProgressTracker to the log after
+ * processing the request.
+ * 
+ * @scr.component immediate="true" metatype="no"
+ * @scr.property name="service.description" value="RequestProgressTracker dump
+ *               filter"
+ * @scr.property name="service.vendor" value="The Apache Software Foundation"
+ * @scr.property name="filter.scope" value="request" private="true"
+ * @scr.service
  */
 public class RequestProgressTrackerLogFilter implements Filter {
-        
+
     private static final Logger log = LoggerFactory.getLogger(RequestProgressTrackerLogFilter.class);
+
     private int requestCounter;
-    
+
     public void init(FilterConfig filterConfig) throws ServletException {
     }
-    
-    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 
-    throws IOException, ServletException {
-        
+
+    public void doFilter(ServletRequest request, ServletResponse response,
+            FilterChain chain) throws IOException, ServletException {
+
         chain.doFilter(request, response);
-        
-        if(request instanceof SlingHttpServletRequest) {
-            final RequestProgressTracker t = ((SlingHttpServletRequest)request).getRequestProgressTracker();
+
+        if (request instanceof SlingHttpServletRequest) {
+            final RequestProgressTracker t = ((SlingHttpServletRequest) request).getRequestProgressTracker();
             t.done();
-            
-            if(log.isDebugEnabled()) {
+
+            if (log.isDebugEnabled()) {
                 int requestId = 0;
                 synchronized (getClass()) {
                     requestId = ++requestCounter;
                 }
                 final Iterator<String> it = t.getMessages();
-                while(it.hasNext()) {
+                while (it.hasNext()) {
                     log.debug("REQUEST_{} - " + it.next(), requestId);
                 }
             }

Modified: incubator/sling/trunk/engine/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/engine/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/engine/src/main/resources/OSGI-INF/metatype/metatype.properties (original)
+++ incubator/sling/trunk/engine/src/main/resources/OSGI-INF/metatype/metatype.properties Tue May 27 03:42:20 2008
@@ -24,13 +24,6 @@
 # the Sling SCR plugin
 
 #
-# Default Error Handler Component
-errhandler.default.name = Default Error Handler Component
-errhandler.default.description = This component is used to render error and \
- exception messages if no other registered error handler component claimed \
- responsibility. This handler has no configurable properties.
-
-#
 # Request Authenticator. Uses AuthenticationHandlers for the
 # actual work of extracting user details from the request.
 auth.name = Request Authenticator
@@ -53,84 +46,9 @@
  "true" to allow access without credentials. When set to "false" access to the \
  repository is only allowed if valid credentials are presented.
  
-#
-# The main sling part controlling the request processing (ComponentRequestHandler)
-sling.name = Sling Request Processor
-sling.description = The central request processor of request to sling. This \
- component has no configurable properties.
- 
-#
-# Component Level Component Resolver
-resolver.name = Component Resolver Filter
-resolver.description = This component level filter is called for each Content \
- object to resolve the Component which is responsible to handle the action \
- and/or render the response. This filter has no configurable properties.
-
-resolver.path.name = Path
-resolver.path.description = Path prefix to apply to component IDs in case of \
- relative path names used as Component ID.
-
 
 #
-# Error Handler Filter
-errhandler.name = Error Handler Filter
-errhandler.description = This request level filter wraps the complete request \
- handled by the Sling Request Processor catching any exceptions to render a \
- useful message to the client. This filter also handles the sendError  and \
- sendRedirect methods on behalf of the Component Framework. This filter has \
- no configurable properties.
-
-#
-# Component Action Filter
-action.name = Component Action Filter
-action.description = Component level filter, which calls the performAction \
- method on the component addressed by the client request. This filter has no \
- configurable properties.
-
-#
-# Repository based Component Registry 
-registry.name = Repository Component Registry
-registry.description = This component registers Components defined in the JCR \
- repository with the OSGi service registry and makes the available for use \
- to handle component requests. The component also registers as an OSGi \
- EventListener to receive events from the Content Manager. This component has \
- no configurable properties.
-
-#
-# Localizations for ContentResolverFilter configuration
-resolver.name = Content Resolver
-resolver.description =  Configures the Content Resolver for request URL and \
- content path rewriting.
-resolver.allowDirect.name = Allow Direct Mapping
-resolver.allowDirect.description = Whether to add a direct URL mapping to the front \
- of the mapping list.
-resolver.fake.name = Internal Redirections
-resolver.fake.description = List of direct URL mappings used for simple internal \
- redirections. Format is <externalURL>-<internalURL>. Mappings are applied on \
- the complete request URL only.
-resolver.mapping.name = URL Mappings
-resolver.mapping.description = List of mappings to apply to URLs. Incoming mappings \
- are applied to request URLs to map to Content paths, outgoing mappings are \
- applied to map Content paths to URLs used on subsequent requests. Form ist \
- <externalURLPrefix><op><internalURLPrefix> where <op> is ">" for incoming \
- mappings, "<" for outgoing mappings and "-" for mappings applied in both \
- directions. Mappings are applied in configuration order by comparing and \
- replacing URL prefixes.
-
-#
-# Properties for completeness. Yet these properties should never be used and configurable
-service.description.name = Service Description
-service.description.description = Description of the Service (do not change !)
-service.vendor.name = Service Vendor
-service.vendor.name.description = Name of the Service Vendor (do not change !)
-
-#
-# Common properties for Request Filters
-filter.scope.name = Filter Scope
-filter.scope.description = Scope of the Render Filter: "component" for per-Component Filters, "request" for per-request filters.
-filter.order.name = Filter Order
-filter.order.description = Integer value, the lower the value to earlier the filter is called.
-
+# Request Loggger Filter
 request.log.name = Request Logger
 request.log.description = Configures the main loggers of the request logger, \
  namely the request log and the access log. Further loggers may be configured \
@@ -163,6 +81,8 @@
 access.log.enabled.description = Whether to enable Access logging or not.
 
 
+#
+# RequestLoggerService (factory)
 request.log.service.name = Customizable Request Data Logger
 request.log.service.description = This configuration creates customizable \
  loggers for request content. Each configuration results in a logger writing \

Modified: incubator/sling/trunk/extensions/apt/parser/src/main/java/org/apache/sling/apt/parser/internal/SlingAptParserImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/extensions/apt/parser/src/main/java/org/apache/sling/apt/parser/internal/SlingAptParserImpl.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/extensions/apt/parser/src/main/java/org/apache/sling/apt/parser/internal/SlingAptParserImpl.java (original)
+++ incubator/sling/trunk/extensions/apt/parser/src/main/java/org/apache/sling/apt/parser/internal/SlingAptParserImpl.java Tue May 27 03:42:20 2008
@@ -31,7 +31,7 @@
 
 /** SlingAptParser implementation, provided as an SCR service
  * 
-*   @scr.component label="Sling APT parser" 
+*   @scr.component metatype="no" 
 *       description="Converts APT documents to HTML format"
 *   @scr.property name="service.vendor" value="The Apache Software Foundation"
 *   @scr.property name="service.description"

Modified: incubator/sling/trunk/extensions/apt/servlet/src/main/java/org/apache/sling/apt/servlet/SlingAptServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/extensions/apt/servlet/src/main/java/org/apache/sling/apt/servlet/SlingAptServlet.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/extensions/apt/servlet/src/main/java/org/apache/sling/apt/servlet/SlingAptServlet.java (original)
+++ incubator/sling/trunk/extensions/apt/servlet/src/main/java/org/apache/sling/apt/servlet/SlingAptServlet.java Tue May 27 03:42:20 2008
@@ -22,7 +22,7 @@
 *
 * @scr.component
 *  immediate="true"
-*  metatype="false"
+*  metatype="no"
 *
 * @scr.property
 *  name="service.description"

Modified: incubator/sling/trunk/extensions/httpauth/src/main/java/org/apache/sling/httpauth/impl/AuthorizationHeaderAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/extensions/httpauth/src/main/java/org/apache/sling/httpauth/impl/AuthorizationHeaderAuthenticationHandler.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/extensions/httpauth/src/main/java/org/apache/sling/httpauth/impl/AuthorizationHeaderAuthenticationHandler.java (original)
+++ incubator/sling/trunk/extensions/httpauth/src/main/java/org/apache/sling/httpauth/impl/AuthorizationHeaderAuthenticationHandler.java Tue May 27 03:42:20 2008
@@ -49,7 +49,7 @@
         AuthenticationHandler {
 
     /**
-     * @scr.property value="Sling (Development)"
+     * @scr.property valueRef="DEFAULT_REALM"
      */
     public static final String PAR_REALM_NAME = "auth.http.realm";
 

Modified: incubator/sling/trunk/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/I18NFilter.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/I18NFilter.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/I18NFilter.java (original)
+++ incubator/sling/trunk/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/I18NFilter.java Tue May 27 03:42:20 2008
@@ -45,9 +45,8 @@
  * The <code>I18NFilter</code> class is a request level filter, which provides
  * the resource bundle for the current request.
  * 
- * @scr.component immediate="true" metatype="false"
- * @scr.property name="service.description" value="Internationalization Support
- *               Filter"
+ * @scr.component immediate="true" metatype="no"
+ * @scr.property name="service.description" value="Internationalization Support Filter"
  * @scr.property name="service.vendor" value="The Apache Software Foundation"
  * @scr.property name="filter.scope" value="request" private="true"
  * @scr.property name="filter.order" value="-700" type="Integer" private="true"

Modified: incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java (original)
+++ incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java Tue May 27 03:42:20 2008
@@ -53,7 +53,7 @@
  * <code>scr.property</code> tags to have them declared automatically in the
  * respective component and metatype definitions by the maven-sling-plugin:
  * 
- * @scr.component
+ * @scr.component metatype="no"
  */
 public abstract class AbstractSlingRepository implements SlingRepository,
         SynchronousBundleListener, Runnable {

Modified: incubator/sling/trunk/jcr/classloader/src/main/java/org/apache/sling/jcr/classloader/internal/RepositoryClassLoaderProviderImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/classloader/src/main/java/org/apache/sling/jcr/classloader/internal/RepositoryClassLoaderProviderImpl.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/classloader/src/main/java/org/apache/sling/jcr/classloader/internal/RepositoryClassLoaderProviderImpl.java (original)
+++ incubator/sling/trunk/jcr/classloader/src/main/java/org/apache/sling/jcr/classloader/internal/RepositoryClassLoaderProviderImpl.java Tue May 27 03:42:20 2008
@@ -51,7 +51,7 @@
     public static final String CLASS_PATH_PROP = "classpath";
 
     /**
-     * @scr.property value="admin"
+     * @scr.property valueRef="OWNER_DEFAULT"
      */
     public static final String OWNER_PROP = "owner";
 

Modified: incubator/sling/trunk/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java (original)
+++ incubator/sling/trunk/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java Tue May 27 03:42:20 2008
@@ -48,7 +48,7 @@
  * <li>Fires OSGi EventAdmin events on behalf of internal helper objects
  * </ul>
  *
- * @scr.component metatype="false"
+ * @scr.component metatype="no"
  * @scr.property name="service.description" value="Sling
  *               Content Loader Implementation"
  * @scr.property name="service.vendor" value="The Apache Software Foundation"

Modified: incubator/sling/trunk/jcr/jackrabbit-client/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/jackrabbit-client/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/jackrabbit-client/src/main/resources/OSGI-INF/metatype/metatype.properties (original)
+++ incubator/sling/trunk/jcr/jackrabbit-client/src/main/resources/OSGI-INF/metatype/metatype.properties Tue May 27 03:42:20 2008
@@ -60,6 +60,19 @@
 home.description = Name of a filesystem directory in which to launch the \
  embedded JCR Repository.
  
+poll.active.name = Poll Intervall Active 	
+poll.active.description = The interval in seconds between two consecutive \
+ checks whether the repository is still accessbible, once it has been acquired.\
+ The default value is 10 seconds, the minimum allowed value is 2 seconds, \
+ smaller values are corected to the minimum. 
+ 
+poll.inactive.name = Poll Intervall Inactive
+poll.inactive.description = The interval in seconds between two consecutive \
+ checks whether the repository has become accessbible if the repository is \
+ not immediately accessible or connection to the repository has been lost. \
+ The default value is 10 seconds, the minimum allowed value is 2 seconds, \
+ smaller values are corected to the minimum.
+ 
 pool.maxActive.name = Maximum Sessions	
 pool.maxActive.description = The maximum number of sessions which may be logged \
  in through the Sling Repository. This number limits the number of sessions \

Modified: incubator/sling/trunk/jcr/jackrabbit-server/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/jackrabbit-server/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/jackrabbit-server/src/main/resources/OSGI-INF/metatype/metatype.properties (original)
+++ incubator/sling/trunk/jcr/jackrabbit-server/src/main/resources/OSGI-INF/metatype/metatype.properties Tue May 27 03:42:20 2008
@@ -66,6 +66,19 @@
 home.name = Repository Home	
 home.description = Name of a filesystem directory in which to launch the \
  embedded JCR Repository.
+
+poll.active.name = Poll Intervall Active        
+poll.active.description = The interval in seconds between two consecutive \
+ checks whether the repository is still accessbible, once it has been acquired.\
+ The default value is 10 seconds, the minimum allowed value is 2 seconds, \
+ smaller values are corected to the minimum. 
+ 
+poll.inactive.name = Poll Intervall Inactive
+poll.inactive.description = The interval in seconds between two consecutive \
+ checks whether the repository has become accessbible if the repository is \
+ not immediately accessible or connection to the repository has been lost. \
+ The default value is 10 seconds, the minimum allowed value is 2 seconds, \
+ smaller values are corected to the minimum.
  
 pool.maxActive.name = Maximum Sessions	
 pool.maxActive.description = The maximum number of sessions which may be logged \
@@ -87,20 +100,22 @@
  round trips may be saved. On the other hand, each session requires a certain \
  amount of memory. Default if negative or not set is 10 idle sessions.
  
-rmi.name = Embedded JCR Repository RMI Registrar
-rmi.description = The RMI Registrar listens for CRX embedded repositories \
- to be registered as services and registers them in an RMI registry under the \
- name specified in the "name" service property.
-
-rmi.port.name = Port Number
-rmi.port.description = Port number of the RMI registry to use. The RMI Registrar \
- first tries to create a private RMI registry at this port. If this fails, an \
- existing registry is tried to connect at this port on local host. If this \
- number is negative, the RMI Registrar is disabled. If this number is higher \
- than 65535, an error message is logged and the RMI Registrar is also \
- disabled. If this number is zero, the system default RMI Registry port 1099 \
- is used.
+name.name = Embedded JCR Repository Name
+name.description = The name under which the embedded repository will be \
+ registered JNDI and RMI registries. The respective registry services listen \
+ for embedded CRX repositories to be launched and register each under the name \
+ configured. If no name is configured, the repository will not be registered.
+ 
+repository.url.override.property.name = Repository URL override property
+repository.url.override.property.description = Name of the system or \
+ configuration Property that provides a repository connection URL to replace \
+ the embedded JCR Repository. \
+ If the corresponding System Property value is not empty, it is used to acquire \
+ a Repository via JNDI or RMI, instead of using the embedded one. \
+ Leave this value empty to force the use of the embedded Repository. 
 
+#
+# JNDI Registration Support
 jndi.name = Embedded JCR Repository JNDI Registrar
 jndi.description = The JNDI Registrar listens for CRX embedded repositories \
  to be registered as services and registers them in the JNDI context under the \
@@ -114,15 +129,18 @@
 jndi.providerurl.description =  An URL string for the service provider (e.g. \
  "ldap://somehost:389").
      
-name.name = Embedded JCR Repository Name
-name.description = The name under which the embedded repository will be \
- registered JNDI and RMI registries. The respective registry services listen \
- for embedded CRX repositories to be launched and register each under the name \
- configured. If no name is configured, the repository will not be registered.
- 
- repository.url.override.property.name = Repository URL override property
- repository.url.override.property.description = Name of a System Property that \
- provides a repository connection URL to replace the embedded JCR Repository. \
- If the corresponding System Property value is not empty, it is used to acquire \
- a Repository via JNDI or RMI, instead of using the embedded one. \
- Leave this value empty to force the use of the embedded Repository. 
+#
+# RMI Registration Support
+rmi.name = Embedded JCR Repository RMI Registrar
+rmi.description = The RMI Registrar listens for CRX embedded repositories \
+ to be registered as services and registers them in an RMI registry under the \
+ name specified in the "name" service property.
+
+rmi.port.name = Port Number
+rmi.port.description = Port number of the RMI registry to use. The RMI Registrar \
+ first tries to create a private RMI registry at this port. If this fails, an \
+ existing registry is tried to connect at this port on local host. If this \
+ number is negative, the RMI Registrar is disabled. If this number is higher \
+ than 65535, an error message is logged and the RMI Registrar is also \
+ disabled. If this number is zero, the system default RMI Registry port 1099 \
+ is used.

Modified: incubator/sling/trunk/jcr/ocm/src/main/java/org/apache/sling/jcr/ocm/impl/ObjectContentManagerFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/ocm/src/main/java/org/apache/sling/jcr/ocm/impl/ObjectContentManagerFactoryImpl.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/ocm/src/main/java/org/apache/sling/jcr/ocm/impl/ObjectContentManagerFactoryImpl.java (original)
+++ incubator/sling/trunk/jcr/ocm/src/main/java/org/apache/sling/jcr/ocm/impl/ObjectContentManagerFactoryImpl.java Tue May 27 03:42:20 2008
@@ -65,7 +65,7 @@
 /**
  * The <code>ObjectContentManagerFactory</code> TODO
  *
- * @scr.component metadata="no"
+ * @scr.component metatype="no"
  * @scr.service name="org.apache.sling.jcr.ocm.ObjectContentManagerFactory"
  * @scr.property name="service.description"
  *               value="Sling Object Content Manager Factory"

Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java Tue May 27 03:42:20 2008
@@ -64,8 +64,8 @@
  *
  * @scr.component immediate="true" label="%resource.resolver.name"
  *                description="%resource.resolver.description"
- * @scr.property name="service.description" value="Sling
- *               JcrResourceResolverFactory Implementation"
+ * @scr.property name="service.description"
+ *                value="Sling JcrResourceResolverFactory Implementation"
  * @scr.property name="service.vendor" value="The Apache Software Foundation"
  * @scr.service interface="org.apache.sling.jcr.resource.JcrResourceResolverFactory"
  * @scr.reference name="ResourceProvider"
@@ -104,8 +104,6 @@
 
     /**
      * @scr.property values.1="/apps" values.2="/libs"
-     *               label="%resolver.path.name"
-     *               description="%resolver.path.description"
      */
     public static final String PROP_PATH = "resource.resolver.searchpath";
 

Modified: incubator/sling/trunk/jcr/resource/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/resources/OSGI-INF/metatype/metatype.properties (original)
+++ incubator/sling/trunk/jcr/resource/src/main/resources/OSGI-INF/metatype/metatype.properties Tue May 27 03:42:20 2008
@@ -25,9 +25,9 @@
 
 #
 # Localizations for JcrResourceResolverFactoryImpl configuration
-resource.resolver.name = Content Resolver
-resource.resolver.description =  Configures the Content Resolver for request \
- URL and content path rewriting.
+resource.resolver.name = Resource Resolver
+resource.resolver.description =  Configures the Resource Resolver for request \
+ URL and resource path rewriting.
 resource.resolver.allowDirect.name = Allow Direct Mapping
 resource.resolver.allowDirect.description = Whether to add a direct URL \
  mapping to the front of the mapping list.
@@ -43,3 +43,8 @@
  ">" for incoming mappings, "<" for outgoing mappings and "-" for mappings \
  applied in both directions. Mappings are applied in configuration order by \
  comparing and replacing URL prefixes.
+resource.resolver.searchpath.name = Resource Search Path
+resource.resolver.searchpath.description = The list of absolute path prefixes \
+ applied to find resources whose path is just specified with a relative path. \
+ The default value is [ "/apps", "/libs" ]. If an empty path is specified a \
+ single entry path of [ "/" ] is assumed.

Modified: incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/AbstractSlingWebDavServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/AbstractSlingWebDavServlet.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/AbstractSlingWebDavServlet.java (original)
+++ incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/AbstractSlingWebDavServlet.java Tue May 27 03:42:20 2008
@@ -33,7 +33,7 @@
  * 
  * @scr.component
  *  immediate="true"
- *  metatype="false"
+ *  metatype="no"
  */
 abstract class AbstractSlingWebDavServlet extends SimpleWebdavServlet {
 

Modified: incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SimpleWebDavServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SimpleWebDavServlet.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SimpleWebDavServlet.java (original)
+++ incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SimpleWebDavServlet.java Tue May 27 03:42:20 2008
@@ -34,18 +34,23 @@
 /**
  * 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 @@
 
         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

Modified: incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SlingWebDavServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SlingWebDavServlet.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SlingWebDavServlet.java (original)
+++ incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/servlets/SlingWebDavServlet.java Tue May 27 03:42:20 2008
@@ -32,7 +32,7 @@
  * 
  * @scr.component
  *  immediate="true"
- *  metatype="false"
+ *  metatype="no"
  *
  * @scr.service
  *  interface="javax.servlet.Servlet"

Added: incubator/sling/trunk/jcr/webdav/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/webdav/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=660460&view=auto
==============================================================================
--- incubator/sling/trunk/jcr/webdav/src/main/resources/OSGI-INF/metatype/metatype.properties (added)
+++ incubator/sling/trunk/jcr/webdav/src/main/resources/OSGI-INF/metatype/metatype.properties Tue May 27 03:42:20 2008
@@ -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.

Modified: incubator/sling/trunk/samples/simple-demo/src/main/java/org/apache/sling/sample/Navigation.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/samples/simple-demo/src/main/java/org/apache/sling/sample/Navigation.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/samples/simple-demo/src/main/java/org/apache/sling/sample/Navigation.java (original)
+++ incubator/sling/trunk/samples/simple-demo/src/main/java/org/apache/sling/sample/Navigation.java Tue May 27 03:42:20 2008
@@ -36,7 +36,7 @@
  * considered a "page" if the Content object is an instance of the
  * {@link SamplePage} class.
  *
- * @scr.component immediate="true" metatype="false"
+ * @scr.component immediate="true" metatype="no"
  * @scr.property name="service.description" value="Sample Navigation Component"
  * @scr.property name="service.vendor" value="The Apache Software Foundation"
  * @scr.property name="sling.servlet.resourceTypes" value="sling/sample.navigation"

Modified: incubator/sling/trunk/samples/webloader/service/src/main/java/org/apache/sling/samples/webloader/internal/WebLoaderImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/samples/webloader/service/src/main/java/org/apache/sling/samples/webloader/internal/WebLoaderImpl.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/samples/webloader/service/src/main/java/org/apache/sling/samples/webloader/internal/WebLoaderImpl.java (original)
+++ incubator/sling/trunk/samples/webloader/service/src/main/java/org/apache/sling/samples/webloader/internal/WebLoaderImpl.java Tue May 27 03:42:20 2008
@@ -34,7 +34,7 @@
  *
  * @scr.component
  *  immediate="true"
- *  metatype="false"
+ *  metatype="no"
  *
  * @scr.property
  *  name="service.description"

Modified: incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java (original)
+++ incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java Tue May 27 03:42:20 2008
@@ -49,7 +49,7 @@
 /**
  * The JSP engine (a.k.a Jasper).
  *
- * @scr.component scr="no" label="%jsphandler.name"
+ * @scr.component ds="no" label="%jsphandler.name"
  *                description="%jsphandler.description"
  * @scr.property name="service.description" value="JSP Script Handler"
  * @scr.property name="service.vendor" value="The Apache Software Foundation" *
@@ -241,7 +241,11 @@
         // a ClassCastException may be caused after this component is recreated
         // because the class loader of the JspApplicationContextImpl class
         // object is different from the one stored in the servlet context
-        slingServletContext.removeAttribute(JspApplicationContextImpl.class.getName());
+        try {
+            slingServletContext.removeAttribute(JspApplicationContextImpl.class.getName());
+        } catch (NullPointerException npe) {
+            log.error("deactivate: Caught NullPointerException ! Just logging", npe);
+        }
     }
 
     protected void bindRepositoryClassLoaderProvider(

Modified: incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/DefaultGetServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/DefaultGetServlet.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/DefaultGetServlet.java (original)
+++ incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/DefaultGetServlet.java Tue May 27 03:42:20 2008
@@ -37,7 +37,7 @@
 /**
  * A SlingSafeMethodsServlet that renders the current Resource as simple HTML
  * 
- * @scr.component immediate="true" metatype="false"
+ * @scr.component immediate="true" metatype="no"
  * @scr.service interface="javax.servlet.Servlet"
  * 
  * @scr.property name="service.description" value="Default GET Servlet"

Modified: incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/JsonQueryServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/JsonQueryServlet.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/JsonQueryServlet.java (original)
+++ incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/JsonQueryServlet.java Tue May 27 03:42:20 2008
@@ -46,7 +46,7 @@
 /**
  * A SlingSafeMethodsServlet that renders the search results as JSON data
  *
- * @scr.component immediate="true" metatype="false"
+ * @scr.component immediate="true" metatype="no"
  * @scr.service interface="javax.servlet.Servlet"
  * 
  * @scr.property name="service.description" value="Default Query Servlet"

Modified: incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/RedirectServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/RedirectServlet.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/RedirectServlet.java (original)
+++ incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/RedirectServlet.java Tue May 27 03:42:20 2008
@@ -54,7 +54,7 @@
  * target resource. Selectors, extension, suffix and query string are also
  * appended to the redirect URL.
  * 
- * @scr.component immediate="true" metatype="false"
+ * @scr.component immediate="true" metatype="no"
  * @scr.service interface="javax.servlet.Servlet"
  * 
  * @scr.property name="service.description" value="Request Redirect Servlet"

Modified: incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/info/SlingInfoServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/info/SlingInfoServlet.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/info/SlingInfoServlet.java (original)
+++ incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/info/SlingInfoServlet.java Tue May 27 03:42:20 2008
@@ -37,7 +37,7 @@
  * The <code>SlingInfoServlet</code> TODO
  *
  * @scr.service interface="javax.servlet.Servlet"
- * @scr.component immediate="true" metatype="false"
+ * @scr.component immediate="true" metatype="no"
  * @scr.property name="service.description" value="Sling Info Servlet"
  * @scr.property name="service.vendor" value="The Apache Software Foundation"
  * @scr.property name="sling.servlet.paths" value="/system/sling/info"

Modified: incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java (original)
+++ incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java Tue May 27 03:42:20 2008
@@ -46,11 +46,13 @@
 /**
  * POST servlet that implements the sling client library "protocol"
  * 
- * @scr.component immediate="true"
+ * @scr.component immediate="true" label="%servlet.post.name"
+ *                description="%servlet.post.description"
  * @scr.service interface="javax.servlet.Servlet"
  * @scr.property name="service.description" value="Sling Post Servlet"
  * @scr.property name="service.vendor" value="The Apache Software Foundation"
- *               Use this as the default servlet for POST requests for Sling
+ * 
+ * Use this as the default servlet for POST requests for Sling
  * @scr.property name="sling.servlet.resourceTypes"
  *               value="sling/servlet/default" private="true"
  * @scr.property name="sling.servlet.methods" value="POST" private="true"
@@ -70,19 +72,19 @@
      *               values.2="yyyy-MM-dd'T'HH:mm:ss" values.3="yyyy-MM-dd"
      *               values.4="dd.MM.yyyy HH:mm:ss" values.5="dd.MM.yyyy"
      */
-    private static final String PROP_DATE_FORMAT = "dateFormats";
+    private static final String PROP_DATE_FORMAT = "servlet.post.dateFormats";
 
     /**
      * @scr.property values.0="title" values.1="jcr:title" values.2="name"
      *               values.3="description" values.4="jcr:description"
      *               values.5="abstract"
      */
-    private static final String PROP_NODE_NAME_HINT_PROPERTIES = "nodeNameHints";
+    private static final String PROP_NODE_NAME_HINT_PROPERTIES = "servlet.post.nodeNameHints";
 
     /**
      * @scr.property value="20" type="Integer"
      */
-    private static final String PROP_NODE_NAME_MAX_LENGTH = "nodeNameMaxLength";
+    private static final String PROP_NODE_NAME_MAX_LENGTH = "servlet.post.nodeNameMaxLength";
 
     /**
      * utility class for generating node names
@@ -155,7 +157,7 @@
                 return;
             }
         }
-        
+
         // create a html response and send if unsuccessful or no redirect
         htmlResponse.send(response, isSetStatus(request));
     }
@@ -203,9 +205,10 @@
 
                 // use the created path as the redirect result
                 result = buf.toString();
-                
+
             } else if (result.endsWith(SlingPostConstants.DEFAULT_CREATE_SUFFIX)) {
-                // if the redirect has a trailing slash, append modified node name
+                // if the redirect has a trailing slash, append modified node
+                // name
                 result = result.concat(ResourceUtil.getName(ctx.getPath()));
             }
 

Added: incubator/sling/trunk/servlets/post/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/post/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=660460&view=auto
==============================================================================
--- incubator/sling/trunk/servlets/post/src/main/resources/OSGI-INF/metatype/metatype.properties (added)
+++ incubator/sling/trunk/servlets/post/src/main/resources/OSGI-INF/metatype/metatype.properties Tue May 27 03:42:20 2008
@@ -0,0 +1,46 @@
+#
+#  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 Sling SCR plugin
+
+servlet.post.name = Sling POST Servlet
+servlet.post.description = The Sling POST Servlet is registered as the default \
+ servlet to handle POST requests in Sling.
+servlet.post.dateFormats.name = Date Format
+servlet.post.dateFormats.description = List SimpleDateFormat strings for date \
+ formats supported for parsing from request input to data fields. The default \
+ value is [ "EEE MMM dd yyyy HH:mm:ss 'GMT'Z", "yyyy-MM-dd'T'HH:mm:ss.SSSZ", \
+ "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd", "dd.MM.yyyy HH:mm:ss", "dd.MM.yyyy" ].
+servlet.post.nodeNameHints.name = Node Name Hint Properties
+servlet.post.nodeNameHints.description = The list of properties whose values \
+ may be used to derive a name for newly created nodes. When handling a request \
+ to create a new node, the name of the node is automatically generated if the \
+ request URL ends with a star ("*") or a slash ("/"). In this case the request \
+ parameters listed in this configuration value may be used to create the name. \
+ Default value is [ "title", "jcr:title", "name", "description", \
+ "jcr:description", "abstract" ].
+servlet.post.nodeNameMaxLength.name = Maximum Node Name Length 
+servlet.post.nodeNameMaxLength.description = Maximum number of characters to \
+ use for automatically generated node names. The default value is 20. Note, \
+ that actual node names may be generated with at most 4 more characters if the \
+ numeric suffixes must be appended to make the name unique.
\ No newline at end of file

Modified: incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/SlingServletResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/SlingServletResolver.java?rev=660460&r1=660459&r2=660460&view=diff
==============================================================================
--- incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/SlingServletResolver.java (original)
+++ incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/SlingServletResolver.java Tue May 27 03:42:20 2008
@@ -73,8 +73,8 @@
  * 
  * @scr.component label="%servletresolver.name"
  *                description="%servletresolver.description"
- * @scr.property name="service.description" value="Sling Servlet Resolver and
- *               Error Handler"
+ * @scr.property name="service.description"
+ *                value="Sling Servlet Resolver and Error Handler"
  * @scr.property name="service.vendor" value="The Apache Software Foundation"
  * @scr.service
  * @scr.reference name="Servlet" interface="javax.servlet.Servlet"
@@ -87,17 +87,11 @@
     private final Logger log = LoggerFactory.getLogger(getClass());
 
     /**
-     * @scr.property values.1="/apps" values.2="/libs"
-     *               label="%resolver.path.name"
-     *               description="%resolver.path.description"
+     * @scr.property valueRef="DEFAULT_SERVLET_ROOT"
      */
-    public static final String PROP_PATH = "path";
+    public static final String PROP_SERVLET_ROOT = "servletresolver.servletRoot";
 
-    /**
-     * @scr.property value="/apps" label="%resolver.servletRoot.name"
-     *               description="%resolver.servletRoot.description"
-     */
-    public static final String PROP_SERVLET_ROOT = "servletRoot";
+    public static final String DEFAULT_SERVLET_ROOT = "/apps";
 
     private static final String REF_SERVLET = "Servlet";
 
@@ -110,8 +104,6 @@
 
     private ComponentContext context;
 
-    private String[] path;
-
     private String servletRoot;
 
     // the default servlet if no other servlet applies for a request. This
@@ -127,12 +119,12 @@
     public Servlet resolveServlet(SlingHttpServletRequest request) {
 
         Resource resource = request.getResource();
-        
+
         // start tracking servlet resolution
         RequestProgressTracker tracker = request.getRequestProgressTracker();
-        String timerName = "resolverServlet(" + resource +")";
+        String timerName = "resolverServlet(" + resource + ")";
         tracker.startTimer(timerName);
-        
+
         Servlet servlet = null;
 
         // first check whether the type of a resource is the absolute
@@ -144,7 +136,7 @@
                 servlet = res.adaptTo(Servlet.class);
             }
         }
-        
+
         // the resource type is not absolute, so lets go for the deep search
         if (servlet == null) {
             ResourceCollector locationUtil = ResourceCollector.create(request);
@@ -164,7 +156,7 @@
             tracker.logTimer(timerName, "Using Servlet {0}",
                 RequestUtil.getServletName(servlet));
         }
-        
+
         // log the servlet found
         if (log.isDebugEnabled()) {
             if (servlet != null) {
@@ -196,6 +188,7 @@
         } else {
 
             // relative script resolution against search path
+            String[] path = resourceResolver.getSearchPath();
             for (int i = 0; script == null && i < path.length; i++) {
                 String scriptPath = path[i] + name;
                 Resource resource = resourceResolver.getResource(scriptPath);
@@ -221,8 +214,8 @@
     // ---------- ErrorHandler interface --------------------------------------
 
     /**
-     * @see org.apache.sling.engine.servlets.ErrorHandler#handleError(int, String,
-     *      SlingHttpServletRequest, SlingHttpServletResponse)
+     * @see org.apache.sling.engine.servlets.ErrorHandler#handleError(int,
+     *      String, SlingHttpServletRequest, SlingHttpServletResponse)
      */
     public void handleError(int status, String message,
             SlingHttpServletRequest request, SlingHttpServletResponse response)
@@ -239,9 +232,9 @@
         RequestProgressTracker tracker = request.getRequestProgressTracker();
         String timerName = "handleError:status=" + status;
         tracker.startTimer(timerName);
-        
+
         try {
-            
+
             // find the error handler component
             Resource resource = getErrorResource(request);
 
@@ -272,11 +265,11 @@
                 RequestUtil.getServletName(servlet));
 
             handleError(servlet, request, response);
-            
+
         } finally {
-            
+
             tracker.logTimer(timerName, "Error handler finished");
-            
+
         }
     }
 
@@ -297,9 +290,9 @@
         String timerName = "handleError:throwable="
             + throwable.getClass().getName();
         tracker.startTimer(timerName);
-        
+
         try {
-            
+
             // find the error handler component
             Servlet servlet = null;
             Resource resource = getErrorResource(request);
@@ -330,13 +323,13 @@
             // log a track entry after resolution before calling the handler
             tracker.logTimer(timerName, "Using handler {0}",
                 RequestUtil.getServletName(servlet));
-            
+
             handleError(servlet, request, response);
-            
+
         } finally {
-            
+
             tracker.logTimer(timerName, "Error handler finished");
-            
+
         }
     }
 
@@ -360,7 +353,7 @@
         }
         return res;
     }
-    
+
     /**
      * Returns a servlet suitable for handling a request. The
      * <code>locationUtil</code> is used find any servlets or scripts usable
@@ -395,11 +388,11 @@
                 }
             }
         }
-        
+
         // exhausted all candidates, we don't have a servlet
         return null;
     }
-    
+
     /**
      * Returns the internal default servlet which is called in case no other
      * servlet applies for handling a request. This servlet should really only
@@ -420,7 +413,6 @@
         return defaultServlet;
     }
 
-
     /**
      * Returns the default error handler servlet, which is called in case there
      * is no other - better matching - servlet registered to handle an error or
@@ -466,7 +458,7 @@
             log.error(
                 "Original error "
                     + request.getAttribute(SlingConstants.ERROR_EXCEPTION_TYPE),
-                (Exception) request.getAttribute(SlingConstants.ERROR_EXCEPTION));
+                (Throwable) request.getAttribute(SlingConstants.ERROR_EXCEPTION));
         }
     }
 
@@ -474,43 +466,15 @@
 
     protected void activate(ComponentContext context) {
 
-        // empty path to begin with
-        path = null;
-
         // from configuration if available
         Dictionary<?, ?> properties = context.getProperties();
-        if (properties != null) {
-            String[] tmpPath = OsgiUtil.toStringArray(properties.get(PROP_PATH));
-            if (tmpPath != null && tmpPath.length > 0) {
-                for (int i = 0; i < tmpPath.length; i++) {
-                    // ensure leading slash
-                    if (!tmpPath[i].startsWith("/")) {
-                        tmpPath[i] = "/" + tmpPath;
-                    }
-                    // ensure trailing slash
-                    if (!tmpPath[i].endsWith("/")) {
-                        tmpPath[i] += "/";
-                    }
-                }
-            }
-            path = tmpPath;
-        }
-
-        if (path == null) {
-            path = new String[] { "/" };
-        }
-
         String tmpRoot = OsgiUtil.toString(properties.get(PROP_SERVLET_ROOT),
-            null);
-        if (tmpRoot == null) {
-            tmpRoot = path[0];
-        } else {
-            if (!tmpRoot.startsWith("/")) {
-                tmpRoot = "/" + tmpRoot;
-            }
-            if (!tmpRoot.endsWith("/")) {
-                tmpRoot += "/";
-            }
+            DEFAULT_SERVLET_ROOT);
+        if (!tmpRoot.startsWith("/")) {
+            tmpRoot = "/" + tmpRoot;
+        }
+        if (!tmpRoot.endsWith("/")) {
+            tmpRoot += "/";
         }
         servletRoot = tmpRoot;
 

Added: incubator/sling/trunk/servlets/resolver/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/resolver/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=660460&view=auto
==============================================================================
--- incubator/sling/trunk/servlets/resolver/src/main/resources/OSGI-INF/metatype/metatype.properties (added)
+++ incubator/sling/trunk/servlets/resolver/src/main/resources/OSGI-INF/metatype/metatype.properties Tue May 27 03:42:20 2008
@@ -0,0 +1,40 @@
+#
+#  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 Sling SCR plugin
+
+servletresolver.name = Sling Servlet/Script Resolver and Error Handler
+servletresolver.description = The Sling Servlet and Script Resolver has \
+ multiple tasks: One it is used as the ServletResolver to select the Servlet \
+ or Script to call to handle the request. Second it acts as the \
+ SlingScriptResolver and finally it manages error handling by implementing \
+ the ErrorHandler interface using the same algorithm to select error handling \
+ servlets and scripts as is used to resolve request processing servlets and \
+ scripts.
+
+servletresolver.servletRoot.name = Servlet Registration Root Path
+servletresolver.servletRoot.description = The default root path assumed when \
+ registering a Servlet whose Servlet registration properties define a relative \
+ path. The default value is "/apps". This path should be part of the search \
+ path configured in the Resource Resolver Factory otherwise a thus registered \
+ servlet may not be found.
\ No newline at end of file