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/01/14 20:16:13 UTC
svn commit: r611893 -
/incubator/sling/whiteboard/fmeschbe/resource/api/src/main/java/org/apache/sling/api/resource/ResourceProvider.java
Author: fmeschbe
Date: Mon Jan 14 11:16:13 2008
New Revision: 611893
URL: http://svn.apache.org/viewvc?rev=611893&view=rev
Log:
Add constant for the ResourceProvider service name
Modified:
incubator/sling/whiteboard/fmeschbe/resource/api/src/main/java/org/apache/sling/api/resource/ResourceProvider.java
Modified: incubator/sling/whiteboard/fmeschbe/resource/api/src/main/java/org/apache/sling/api/resource/ResourceProvider.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/resource/api/src/main/java/org/apache/sling/api/resource/ResourceProvider.java?rev=611893&r1=611892&r2=611893&view=diff
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/resource/api/src/main/java/org/apache/sling/api/resource/ResourceProvider.java (original)
+++ incubator/sling/whiteboard/fmeschbe/resource/api/src/main/java/org/apache/sling/api/resource/ResourceProvider.java Mon Jan 14 11:16:13 2008
@@ -36,6 +36,13 @@
public interface ResourceProvider {
/**
+ * The service name to use when registering implementations of this
+ * interface as services (value is
+ * "org.apache.sling.api.resource.ResourceProvider").
+ */
+ static final String SERVICE_NAME = ResourceProvider.class.getName();
+
+ /**
* The name of the service registration property containing the root paths
* of the resources provided by this provider (value is "provider.roots").
*/
@@ -51,22 +58,22 @@
* parametrize the resource resolution. An example of such parametrization
* is support for a JSR-311 style resource provider to support the
* parametrized URL patterns.
- *
+ *
* @throws Exception may be thrown in case of any problem creating the
* <code>Resource</code> instance.
*/
Resource getResource(/* ResourceResolver resourceResolver, */
- HttpServletRequest request, String path) throws SlingException;
+ HttpServletRequest request, String path) throws SlingException;
/**
* Returns a resource from this resource provider or <code>null</code> if
* the resource provider cannot find it. The path should have one of the
* {@link #getRoots()} strings as its prefix.
- *
+ *
* @throws Exception may be thrown in case of any problem creating the
* <code>Resource</code> instance.
*/
- Resource getResource(/* ResourceResolver ResourceResolver, */ String path)
+ Resource getResource(/* ResourceResolver ResourceResolver, */String path)
throws SlingException;
/**
@@ -75,7 +82,7 @@
* <p>
* This method is only called for resource providers whose root path list
* contains an entry which is a prefix for the path of the parent resource.
- *
+ *
* @param parent The {@link Resource Resource} whose children are requested.
* @return An <code>Iterator</code> of {@link Resource} objects or
* <code>null</code> if the resource provider has no children for