incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r585995 - in /incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/api: Resource.java ResourceResolver.java
Date Thu, 18 Oct 2007 14:58:04 GMT
Author: bdelacretaz
Date: Thu Oct 18 07:58:03 2007
New Revision: 585995

URL: http://svn.apache.org/viewvc?rev=585995&view=rev
Log:
SLING-60, API changes to introduce the ResourceResolver

Added:
    incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/api/ResourceResolver.java
  (with props)
Modified:
    incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/api/Resource.java

Modified: incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/api/Resource.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/api/Resource.java?rev=585995&r1=585994&r2=585995&view=diff
==============================================================================
--- incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/api/Resource.java
(original)
+++ incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/api/Resource.java
Thu Oct 18 07:58:03 2007
@@ -20,9 +20,11 @@
 
 /** Resources are pieces of content on which Sling acts  */
 public interface Resource {
-    /** This resource's URI - for now that could be a JCR path, but having
-     *  an URI makes it possible to use other data sources (not sure if we
-     *  really need that though).
+    /** The canonical URI that the ResourceResolver used to load this
+     *  Resource. As microsling currently access content over JCR only,
+     *  URIs without a prefix indicate a JCR path in our Repository.
+     *  Microsling uses "/content/xyz" for this URI instead of "jcr:///content/xyz",
+     *  for example.    
      */
     String getURI();
 

Added: incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/api/ResourceResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/api/ResourceResolver.java?rev=585995&view=auto
==============================================================================
--- incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/api/ResourceResolver.java
(added)
+++ incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/api/ResourceResolver.java
Thu Oct 18 07:58:03 2007
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+package org.apache.sling.microsling.api;
+
+import javax.servlet.http.HttpServletRequest;
+
+/** Locates the Resource that the current request must process */
+public interface ResourceResolver {
+    
+    /** Find the Resource that request must process. The
+     *  Resource.getURI() method will indicate the actual URI
+     *  (which is by default the Resource node's JCR path) that
+     *  was used to load the Resource
+     */
+    Resource getResource(HttpServletRequest request) throws Exception;
+}

Propchange: incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/api/ResourceResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/api/ResourceResolver.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL



Mime
View raw message