incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r610330 - in /incubator/sling/trunk: api/src/main/java/org/apache/sling/api/request/ api/src/main/java/org/apache/sling/api/resource/ jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/ jcr/resource/src/main/java/org/apache/s...
Date Wed, 09 Jan 2008 10:05:29 GMT
Author: cziegeler
Date: Wed Jan  9 02:05:24 2008
New Revision: 610330

URL: http://svn.apache.org/viewvc?rev=610330&view=rev
Log:
issue SLING-146: Replace Resource.getURI() by Resource.getPath() 
https://issues.apache.org/jira/browse/SLING-146

Modified:
    incubator/sling/trunk/api/src/main/java/org/apache/sling/api/request/RequestPathInfo.java
    incubator/sling/trunk/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
    incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
    incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/bundle/BundleResourceIterator.java
    incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
    incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java
    incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/helper/JcrNodeResourceIteratorTest.java
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/experimental/JstScriptEngine.java
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/request/helpers/MicroslingRequestPathInfo.java
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/MicroslingResourceResolver.java
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptResolver.java
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptServlet.java
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/helpers/ScriptSearchPathsBuilder.java
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/DefaultSlingServlet.java
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/StreamServlet.java
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/renderers/DefaultHtmlRendererServlet.java
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/javascript.html
    incubator/sling/trunk/microsling/microsling-core/src/test/resources/integration-test/include-test.esp
    incubator/sling/trunk/osgi/obr/src/main/java/org/apache/sling/osgi/obr/Resource.java
    incubator/sling/trunk/scripting/freemarker/src/main/java/org/apache/sling/scripting/freemarker/FreemarkerScriptEngine.java
    incubator/sling/trunk/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/RhinoJavaScriptEngine.java
    incubator/sling/trunk/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/wrapper/ScriptableResource.java
    incubator/sling/trunk/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/IncludeTagHandler.java
    incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java
    incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/SlingIOProvider.java
    incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/impl/DefaultSlingScript.java
    incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/impl/DefaultSlingScriptResolver.java
    incubator/sling/trunk/scripting/velocity/src/main/java/org/apache/sling/scripting/velocity/VelocityTemplatesScriptEngine.java
    incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingHttpServletResponseImpl.java
    incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/log/CustomLogFormat.java
    incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestDispatcher.java
    incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestPathInfo.java
    incubator/sling/trunk/sling/sample/src/main/java/org/apache/sling/sample/Navigation.java
    incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/defaults/DefaultServlet.java
    incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/helper/SlingScriptServlet.java
    incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FileServlet.java
    incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FolderServlet.java

Modified: incubator/sling/trunk/api/src/main/java/org/apache/sling/api/request/RequestPathInfo.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/api/src/main/java/org/apache/sling/api/request/RequestPathInfo.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/api/src/main/java/org/apache/sling/api/request/RequestPathInfo.java (original)
+++ incubator/sling/trunk/api/src/main/java/org/apache/sling/api/request/RequestPathInfo.java Wed Jan  9 02:05:24 2008
@@ -148,7 +148,7 @@
     /**
      * Return the "resource path" part of the URL, what comes before selectors,
      * extension and suffix. This string is part of the request URL and need not
-     * be equal to the {@link org.apache.sling.api.resource.Resource#getURI()}.
+     * be equal to the {@link org.apache.sling.api.resource.Resource#getPath()}.
      * Rather it is equal to the
      * {@link org.apache.sling.api.resource.ResourceMetadata#RESOLUTION_PATH resolution path metadata property}
      * of the resource.

Modified: incubator/sling/trunk/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java (original)
+++ incubator/sling/trunk/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java Wed Jan  9 02:05:24 2008
@@ -41,10 +41,10 @@
      * {@link Resource} object is returned whose
      * {@link Resource#getResourceType() resource type} is set to
      * {@link Resource#RESOURCE_TYPE_NON_EXISTING} and the
-     * {@link Resource#getURI() resource URI} set to the request URI.
+     * {@link Resource#getPath() resource path} set to the request URI.
      * {@link Resource#adaptTo(Class) object} returns <code>null</code> for
      * all classes.
-     * 
+     *
      * @param request The http servlet request object used to resolve the
      *            resource for.
      * @return The {@link Resource} for the request.
@@ -60,7 +60,7 @@
      * a Java Content Repository, the path could be a
      * <code>javax.jcr.Item</code> path from which the resource object is
      * loaded.
-     * 
+     *
      * @param path The absolute path to the resource object to be loaded. The
      *            path may contain relative path specifiers like <code>.</code>
      *            (current location) and <code>..</code> (parent location),
@@ -86,7 +86,7 @@
      * a Java Content Repository, the path could be a
      * <code>javax.jcr.Item</code> path from which the resource object is
      * loaded.
-     * 
+     *
      * @param base The base {@link Resource} against which a relative path
      *            argument given by <code>path</code> is resolved. This
      *            parameter may be <code>null</code> if the <code>path</code>
@@ -118,7 +118,7 @@
      * reading content from a Java Content Repository, the children could be the
      * {@link Resource} objects loaded from child items of the <code>Item</code>
      * of the given <code>Resource</code>.
-     * 
+     *
      * @param parent The {@link Resource Resource} whose children are requested.
      *            If <code>null</code> the children of this request's Resource
      *            are returned.
@@ -140,7 +140,7 @@
      * create a JCR <code>Query</code> through the <code>QueryManager</code>.
      * The result returned is then based on the <code>NodeIterator</code>
      * provided by the query result.
-     * 
+     *
      * @param query The query string to use to find the resources.
      * @param language The language in which the query is formulated.
      * @return An <code>Iterator</code> of {@link Resource} objects matching
@@ -163,7 +163,7 @@
      * the column name and the column value is the JCR <code>Value</code>
      * object converted into the respective Java object, such as
      * <code>Boolean</code> for a value of property type <em>Boolean</em>.
-     * 
+     *
      * @param query The query string to use to find the resources.
      * @param language The language in which the query is formulated.
      * @return An <code>Iterator</code> of <code>Map</code> instances
@@ -177,7 +177,7 @@
      * Adapts this resource resolver to another type. A JCR based resource
      * resolver might support adapting to the JCR Session used by the resolver
      * to access the JCR Repository.
-     * 
+     *
      * @param <AdapterType> The generic type to which this resource is adapted
      *            to
      * @param type The Class object of the target type, such as

Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java Wed Jan  9 02:05:24 2008
@@ -132,7 +132,7 @@
         }
 
         // try (again) with absolute resource path
-        path = base.getURI() + "/" + path;
+        path = base.getPath() + "/" + path;
         return getResource(path);
     }
 
@@ -142,13 +142,13 @@
         }
 
         try {
-            parent = getResource(parent.getURI());
+            parent = getResource(parent.getPath());
             if (parent instanceof Descendable) {
                 return ((Descendable) parent).listChildren();
             }
         } catch (SlingException se) {
             log.warn("listChildren: Error trying to resolve parent resource "
-                + parent.getURI(), se);
+                + parent.getPath(), se);
         }
 
         // return an empty iterator if parent has no node
@@ -215,11 +215,11 @@
         } else if (type == PathResolver.class) {
             return (AdapterType) this;
         }
-        
+
         // no adapter available
         return null;
     }
-    
+
     // ---------- PathResolver interface --------------------------------------
 
     /**
@@ -311,7 +311,7 @@
      *             permisssions to store the resource's object.
      */
     public void store(Resource resource) throws SlingException {
-        String path = resource.getURI();
+        String path = resource.getPath();
         Object data = resource.adaptTo(Object.class);
         if (data != null) {
             try {
@@ -355,7 +355,7 @@
     }
 
     public void delete(Resource resource) throws SlingException {
-        String path = resource.getURI();
+        String path = resource.getPath();
         try {
             checkPermission(path, ACTION_REMOVE);
             getObjectContentManager().remove(path);
@@ -370,7 +370,7 @@
     public void copy(Resource resource, String destination, boolean deep)
             throws SlingException {
 
-        String source = resource.getURI();
+        String source = resource.getPath();
         try {
 
             checkPermission(destination, ACTION_CREATE);
@@ -396,7 +396,7 @@
 
     public void move(Resource resource, String destination)
             throws SlingException {
-        String source = resource.getURI();
+        String source = resource.getPath();
 
         try {
             checkPermission(source, ACTION_REMOVE);
@@ -416,7 +416,7 @@
     public void orderBefore(Resource resource, String afterName)
             throws SlingException {
 
-        String path = resource.getURI();
+        String path = resource.getPath();
         Node node = resource.adaptTo(Node.class);
         if (node == null) {
             log.info("orderBefore: Resource {} is not based on a JCR", path);
@@ -544,7 +544,7 @@
 
             Resource resource = scanPath(mappedUri);
             if (resource != null) {
-                
+
                 ResourceMetadata rm = resource.getResourceMetadata();
                 String path = (String) rm.get(ResourceMetadata.RESOLUTION_PATH);
                 String uriPath = mappings[i].mapHandle(path);

Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/bundle/BundleResourceIterator.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/bundle/BundleResourceIterator.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/bundle/BundleResourceIterator.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/bundle/BundleResourceIterator.java Wed Jan  9 02:05:24 2008
@@ -65,7 +65,7 @@
 
         } else {
             // trailing slash to enumerate children
-            String parentPath = parent.getURI() + "/";
+            String parentPath = parent.getPath() + "/";
 
             this.bundle = parent.getBundle();
             // unchecked cast

Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java Wed Jan  9 02:05:24 2008
@@ -164,7 +164,7 @@
     private Object getObject() {
         if (object == UNDEFINED) {
             // lazy loaded object
-            object = resourceResolver.getObject(getURI(), objectType);
+            object = resourceResolver.getObject(getPath(), objectType);
         }
 
         return object;
@@ -194,7 +194,7 @@
             }
 
             log.error("getResource: There is no node at {} below {}", path,
-                getURI());
+                    getPath());
             return null;
         } catch (RepositoryException re) {
             log.error("getResource: Problem accessing relative resource at "

Modified: incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java (original)
+++ incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java Wed Jan  9 02:05:24 2008
@@ -105,7 +105,7 @@
         // existing resource
         Resource res = resResolver.getResource(root);
         assertNotNull(res);
-        assertEquals(root, res.getURI());
+        assertEquals(root, res.getPath());
         assertEquals(rootNode.getPrimaryNodeType().getName(),
             res.getResourceType());
 
@@ -122,7 +122,7 @@
         // existing resource
         Resource res = resResolver.resolve(new ResourceResolverTestRequest(root));
         assertNotNull(res);
-        assertEquals(root, res.getURI());
+        assertEquals(root, res.getPath());
         assertEquals(rootNode.getPrimaryNodeType().getName(),
             res.getResourceType());
 
@@ -133,7 +133,7 @@
         String path = root + "/missing";
         res = resResolver.resolve(new ResourceResolverTestRequest(path));
         assertNotNull(res);
-        assertEquals(root, res.getURI());
+        assertEquals(root, res.getPath());
         assertEquals(rootNode.getPrimaryNodeType().getName(),
             res.getResourceType());
 
@@ -144,7 +144,7 @@
         path = root + ".print.a4.html";
         res = resResolver.resolve(new ResourceResolverTestRequest(path));
         assertNotNull(res);
-        assertEquals(root, res.getURI());
+        assertEquals(root, res.getPath());
         assertEquals(rootNode.getPrimaryNodeType().getName(),
             res.getResourceType());
 
@@ -156,7 +156,7 @@
         res = resResolver.resolve(new ResourceResolverTestRequest(path));
         assertNotNull(res);
         assertTrue(res instanceof NonExistingResource);
-        assertEquals(path, res.getURI());
+        assertEquals(path, res.getPath());
         assertEquals(Resource.RESOURCE_TYPE_NON_EXISTING, res.getResourceType());
     }
 

Modified: incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/helper/JcrNodeResourceIteratorTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/helper/JcrNodeResourceIteratorTest.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/helper/JcrNodeResourceIteratorTest.java (original)
+++ incubator/sling/trunk/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/helper/JcrNodeResourceIteratorTest.java Wed Jan  9 02:05:24 2008
@@ -55,7 +55,7 @@
 
         assertTrue(ri.hasNext());
         Resource res = ri.next();
-        assertEquals(path, res.getURI());
+        assertEquals(path, res.getPath());
         assertEquals(node.getPrimaryNodeType().getName(), res.getResourceType());
 
         assertFalse(ri.hasNext());
@@ -81,7 +81,7 @@
         for (int i=0; i < nodes.length; i++) {
             assertTrue(ri.hasNext());
             Resource res = ri.next();
-            assertEquals(pathBase + i, res.getURI());
+            assertEquals(pathBase + i, res.getPath());
             assertEquals(nodes[i].getPrimaryNodeType().getName(), res.getResourceType());
         }
 

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/experimental/JstScriptEngine.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/experimental/JstScriptEngine.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/experimental/JstScriptEngine.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/experimental/JstScriptEngine.java Wed Jan  9 02:05:24 2008
@@ -35,7 +35,6 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.sling.api.HttpStatusCodeException;
-import org.apache.sling.api.SlingException;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceMetadata;
@@ -49,7 +48,7 @@
 import org.apache.sling.scripting.api.AbstractSlingScriptEngine;
 import org.apache.sling.scripting.javascript.helper.EspReader;
 
-/** Experimental JST script engine: converts a JST template (using the 
+/** Experimental JST script engine: converts a JST template (using the
  *  same templating syntax as ESP) to client-side javascript code
  *  that renders the page.
  */
@@ -58,31 +57,31 @@
     private final List<String> libraryScripts = new LinkedList<String>();
     private final DefaultHtmlRenderer htmlRenderer;
     private final ScriptFilteredCopy copier = new ScriptFilteredCopy();
-    
+
     JstScriptEngine(ScriptEngineFactory scriptEngineFactory) {
         super(scriptEngineFactory);
-        
+
         // TODO hardcoded for now...
         libraryScripts.add("/ujax/ujax.js");
         htmlRenderer = new DefaultHtmlRenderer();
     }
-    
+
     public Object eval(Reader script, ScriptContext context) throws ScriptException {
-        
+
         // This engine does not really run the script, we simply dump it
         // to the client inside a skeleton HTML document, and let the
         // client run the script
         Bindings props = context.getBindings(ScriptContext.ENGINE_SCOPE);
-        
+
         final SlingScriptHelper helper = (SlingScriptHelper) props.get(SlingBindings.SLING);
-        
+
         try {
             final PrintWriter w = helper.getResponse().getWriter();
             final Reader er = getReader(helper.getScript().getScriptResource());
 
             // access our data (need a Node)
             final Resource r = helper.getRequest().getResource();
-            
+
             // to render we must have either a Node or a SyntheticResourceData
             final Node n = r.adaptTo(Node.class);
             final SyntheticResourceData srd = r.adaptTo(SyntheticResourceData.class);
@@ -91,30 +90,30 @@
                         HttpServletResponse.SC_NOT_FOUND,
                         "Resource does not provide a Node or a SyntheticResourceData, cannot render");
             }
-            
+
             // output HEAD with javascript initializations
             // TODO we should instead parse (at least minimally) the template file, and inject our
             // stuff in the right places
             w.println("<html><head><title id=\"JstPageTitle\">");
-            w.println("JST rendering of " + r.getURI());
+            w.println("JST rendering of " + r.getPath());
             w.println("</title>");
-            
+
             // library scripts
-            final SlingHttpServletRequest request = helper.getRequest(); 
+            final SlingHttpServletRequest request = helper.getRequest();
             for(String lib : libraryScripts) {
-                final String fullScriptPath =             
+                final String fullScriptPath =
                     SlingRequestPaths.getContextPath(request)
                     + SlingRequestPaths.getServletPath(request)
                     + lib
                 ;
-                w.println("<script src=\"" + fullScriptPath + "\"></script>");  
+                w.println("<script src=\"" + fullScriptPath + "\"></script>");
             }
-            
+
             // onLoad method
             w.println("<script language=\"javascript\">");
             w.println("function jstOnLoad() { if(typeof onLoad == \"function\") { onLoad(); } }");
             w.println("</script>");
-            
+
             // data in JSON format
             final JsonItemWriter j = new JsonItemWriter(null);
             final int maxRecursionLevels = 1;
@@ -128,13 +127,13 @@
             w.println(";");
             w.println("</script>");
             w.println("</head><body onLoad=\"jstOnLoad()\">");
-            
+
             // output our parsed script, first in body
             w.println("<div id=\"JstRenderingScript\">\n<script language='javascript'>");
             copier.copy(er,w);
             w.println("</script>\n</div>");
-            
-            // default rendering, turned off automatically from the javascript that 
+
+            // default rendering, turned off automatically from the javascript that
             // follows, if javascript is enabled
             w.println("<div id=\"JstDefaultRendering\">");
             if(n!=null) {
@@ -146,21 +145,21 @@
             w.println("<script language=\"javascript\">");
             w.println("document.getElementById(\"JstDefaultRendering\").setAttribute(\"style\",\"display:none\");");
             w.println("</script>");
-            
+
             // all done
             w.println("</body></html>");
-            
+
         } catch (IOException ioe) {
             throw new ScriptException(ioe);
-            
+
         } catch(RepositoryException re) {
             throw new ScriptException(re);
-            
+
         } catch(JSONException je) {
             throw new ScriptException(je);
-            
+
         }
-        
+
         return null;
     }
 
@@ -171,14 +170,14 @@
             if (enc == null) {
                 enc = "UTF-8";
             }
-            
+
             Reader r = new InputStreamReader(ins, enc);
             EspReader er = new EspReader(r);
             er.setOutInitStatement("out=document;\n");
-            
+
             return er;
         }
-        
+
         return null;
     }
 }

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/request/helpers/MicroslingRequestPathInfo.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/request/helpers/MicroslingRequestPathInfo.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/request/helpers/MicroslingRequestPathInfo.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/request/helpers/MicroslingRequestPathInfo.java Wed Jan  9 02:05:24 2008
@@ -23,7 +23,7 @@
 /**
  * microsling request URI parser that provides SlingRequestPathInfo for the
  * current request, based on the path of the Resource. The values provided by
- * this depend on the Resource.getURI() value, as the ResourceResolver might use
+ * this depend on the Resource.getPath() value, as the ResourceResolver might use
  * all or only part of the request URI path to locate the resource (see also
  * SLING-60 ). What we're after is the remainder of the path, the part that was
  * not used to locate the Resource, and we split that part in different

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/JcrNodeResource.java Wed Jan  9 02:05:24 2008
@@ -119,7 +119,7 @@
             }
         } catch (RepositoryException re) {
             throw (IOException) new IOException("Cannot get InputStream for "
-                + getURI()).initCause(re);
+                + getPath()).initCause(re);
         }
 
         // fallback to non-streamable resource

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/MicroslingResourceResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/MicroslingResourceResolver.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/MicroslingResourceResolver.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/resource/MicroslingResourceResolver.java Wed Jan  9 02:05:24 2008
@@ -163,7 +163,7 @@
 
                     log.error(
                         "getResource: There is no node at {} below {}",
-                        path, base.getURI());
+                        path, base.getPath());
                     return null;
                 } catch (RepositoryException re) {
                     log.error(
@@ -175,7 +175,7 @@
         }
 
         // try (again) with absolute resource path
-        path = base.getURI() + "/" + path;
+        path = base.getPath() + "/" + path;
         return getResource(path);
     }
 
@@ -219,7 +219,7 @@
                         } catch (RepositoryException re) {
                             log.warn(
                                 "Problem while trying to create a resource", re);
-                            return new NonExistingResource(parent.getURI()
+                            return new NonExistingResource(parent.getPath()
                                 + "/?");
                         }
                     }
@@ -315,10 +315,10 @@
                 log.warn("Cannot get Session", se);
             }
         }
-        
+
         return null;
     }
-    
+
     /** Returns the session used by this resolver */
     protected Session getSession() throws SlingException {
         if (session != null && session.isLive()) {

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptResolver.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptResolver.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptResolver.java Wed Jan  9 02:05:24 2008
@@ -29,8 +29,6 @@
 import javax.jcr.Property;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
-import javax.naming.Context;
-import javax.script.Bindings;
 import javax.script.ScriptContext;
 import javax.script.ScriptEngine;
 import javax.script.ScriptEngineManager;
@@ -47,7 +45,6 @@
 import org.apache.sling.api.scripting.SlingBindings;
 import org.apache.sling.api.scripting.SlingScript;
 import org.apache.sling.api.scripting.SlingScriptResolver;
-import org.apache.sling.api.wrappers.SlingHttpServletRequestWrapper;
 import org.apache.sling.microsling.resource.JcrNodeResource;
 import org.apache.sling.microsling.scripting.helpers.ScriptFilenameBuilder;
 import org.apache.sling.microsling.scripting.helpers.ScriptHelper;
@@ -65,9 +62,9 @@
  * <pre>
  *      /sling/scripts/some/type/get.html.js
  * </pre>
- * 
+ *
  * in the repository. In the above example, "/sling/scripts" is a script search path,
- * which is provided by {#ScriptSearchPathsBuilder} 
+ * which is provided by {#ScriptSearchPathsBuilder}
  */
 public class MicroslingScriptResolver implements SlingScriptResolver {
 
@@ -82,13 +79,13 @@
     private final ScriptSearchPathsBuilder scriptSearchPathsBuilder = new ScriptSearchPathsBuilder();
 
     private final ScriptEngineManager scriptEngineManager;
-    
+
     public MicroslingScriptResolver() throws SlingException {
         ClassLoader loader = Thread.currentThread().getContextClassLoader();
         if (loader == null) {
             loader = getClass().getClassLoader();
         }
-        
+
         scriptEngineManager = new ScriptEngineManager(loader);
     }
 
@@ -119,7 +116,7 @@
         final Resource r = request.getResource();
         final Session s = (Session)request.getAttribute(Session.class.getName());
         MicroslingScript result = null;
-        
+
         // SLING-133: do not resolve scripts for Properties, we want to use our default
         // renderers for them (TODO: having that test here is really a temp fix)
         if(r.adaptTo(Property.class) != null) {
@@ -146,7 +143,7 @@
                 log.debug("Looking for script with filename=" + scriptFilename
                     + " under " + currentPath);
             }
-            
+
             // do not throw exceptions if path is invalid, that might happen
             // depending on the resource type / search path values
             boolean pathExists = false;
@@ -189,7 +186,7 @@
 
         if (result != null) {
             log.info("Found nt:file script node {} for Resource={}",
-                result.getScriptResource().getURI(), r);
+                result.getScriptResource().getPath(), r);
         } else {
             log.debug(
                 "nt:file script node not found under path={} for Resource={}",
@@ -247,26 +244,26 @@
             // the default encoding used
             return new BufferedReader(new InputStreamReader(stream, encoding));
         }
-        
+
         public void eval(SlingBindings props) throws IOException,
                 ServletException {
             try {
-                
+
                 SlingHttpServletRequest req = (SlingHttpServletRequest) props.get(SlingBindings.REQUEST);
                 SlingHttpServletResponse res = (SlingHttpServletResponse) props.get(SlingBindings.RESPONSE);
-                
+
                 // the script helper
                 ScriptHelper helper = new ScriptHelper(req, res, this);
 
                 // prepare the properties for the script
                 SimpleBindings bindings = new SimpleBindings(); // getScriptEngine().createBindings();
-                
+
                 bindings.put(SlingBindings.SLING, helper);
                 bindings.put(SlingBindings.RESOURCE, helper.getRequest().getResource());
                 bindings.put(SlingBindings.REQUEST, helper.getRequest());
                 bindings.put(SlingBindings.RESPONSE, helper.getResponse());
                 bindings.put(SlingBindings.OUT, helper.getResponse().getWriter());
-                bindings.put(SlingBindings.LOG, LoggerFactory.getLogger(getScriptResource().getURI()));
+                bindings.put(SlingBindings.LOG, LoggerFactory.getLogger(getScriptResource().getPath()));
 
                 res.setContentType(req.getResponseContentType()
                     + "; charset=UTF-8");
@@ -276,7 +273,7 @@
                 context.setWriter(helper.getResponse().getWriter());
 //                context.setReader();
 //                context.setErrorWriter(arg0);
-                
+
                 // evaluate the script now using the ScriptEngine
                 getScriptEngine().eval(getScriptReader(), context);
 

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptServlet.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptServlet.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptServlet.java Wed Jan  9 02:05:24 2008
@@ -51,7 +51,7 @@
     }
 
     public String getServletInfo() {
-        return "Servlet for script " + script.getScriptResource().getURI();
+        return "Servlet for script " + script.getScriptResource().getPath();
     }
 
     public void init(ServletConfig config) {

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/helpers/ScriptSearchPathsBuilder.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/helpers/ScriptSearchPathsBuilder.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/helpers/ScriptSearchPathsBuilder.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/helpers/ScriptSearchPathsBuilder.java Wed Jan  9 02:05:24 2008
@@ -31,14 +31,14 @@
  */
 public class ScriptSearchPathsBuilder {
 
-    /** hardcoded for now, these could be configurable */ 
+    /** hardcoded for now, these could be configurable */
     public static final String [] DEFAULT_SCRIPT_SEARCH_PATHS = { "/sling/scripts", "/apps" };
 
-    /** Returns the list of paths where scripts can be found, in order, 
+    /** Returns the list of paths where scripts can be found, in order,
      *  for the given request.
-     *  The paths are based on the Request's Resource type, and if the 
+     *  The paths are based on the Request's Resource type, and if the
      *  request contains selectors, they are used to build subpaths of
-     *  the main path, which are searched first. 
+     *  the main path, which are searched first.
      */
     public List<String> getScriptSearchPaths(Resource resource, String [] selectors) throws SlingException {
         if(resource==null) {
@@ -47,10 +47,10 @@
         if(resource.getResourceType() == null) {
             throw new SlingException("resource.getResourceType()==null, cannot build script path");
         }
-        
+
         final String typePath = resource.getResourceType().replaceAll("\\:","/");
         final List<String> result = new LinkedList<String> ();
-        
+
         // use the default script search paths + the path provided by getDynamicDefaultScriptPath
         final List<String> paths = new ArrayList<String>();
         for(String defaultPath : DEFAULT_SCRIPT_SEARCH_PATHS) {
@@ -61,7 +61,7 @@
 
         // and add selector-based paths, which take precedence over the default ones
         for(String basePath : paths) {
-            
+
             // if there are selectors A and B, look for a script first under
             // basePath/A/B, then basePath/A, then basePath
             if(selectors!=null) {
@@ -76,12 +76,12 @@
                 }
             }
             result.add(basePath);
-            
+
         }
-        
+
         return result;
     }
-    
+
     /** Transform the Resource URI into a search path for scripts.
      *  For example, a resource with URI=/content/blog/a/b/c returns
      *  /apps/blog - this allows for simple path-based mapping of
@@ -89,8 +89,8 @@
      */
     protected String getDynamicDefaultScriptPath(Resource r) {
         String result = null;
-        if(r!=null && r.getURI() != null) {
-            final String [] pathFolders = r.getURI().split("/");
+        if(r!=null && r.getPath() != null) {
+            final String [] pathFolders = r.getPath().split("/");
             if(pathFolders.length >= 3) {
                 result ="/apps/" + pathFolders[2];
             }

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/DefaultSlingServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/DefaultSlingServlet.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/DefaultSlingServlet.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/DefaultSlingServlet.java Wed Jan  9 02:05:24 2008
@@ -83,7 +83,7 @@
         final Resource  r = req.getResource();
         if (Resource.RESOURCE_TYPE_NON_EXISTING.equals(r.getResourceType())) {
 
-            String path = r.getURI();
+            String path = r.getPath();
             if (path.startsWith(MicrojaxGetServlet.URI_PREFIX)) {
                 microjaxGetServlet.service(req, resp);
                 return;
@@ -98,9 +98,9 @@
                 spool(url, resp);
             } else {
                 throw new HttpStatusCodeException(HttpServletResponse.SC_NOT_FOUND,
-                        "Resource not found: " + r.getURI());
+                        "Resource not found: " + r.getPath());
             }
-            
+
         } else if(canRender(r)) {
             final String contentType = req.getResponseContentType();
             final Servlet s = renderingServlets.get(contentType);
@@ -116,17 +116,17 @@
 
         } else {
             throw new HttpStatusCodeException(HttpServletResponse.SC_NOT_IMPLEMENTED,
-                "Not implemented: resource " + req.getResource().getURI()
+                "Not implemented: resource " + req.getResource().getPath()
                 + " cannot be dumped by " + getClass().getSimpleName());
         }
     }
-    
+
     /** True if our rendering servlets can render Resource r */
     protected boolean canRender(Resource r) {
-        return 
-            r!=null && 
+        return
+            r!=null &&
             (
-                    r.adaptTo(Node.class) != null 
+                    r.adaptTo(Node.class) != null
                     || r.adaptTo(Property.class) != null
                     || r.adaptTo(SyntheticResourceData.class) != null
             );
@@ -139,17 +139,17 @@
     {
         postServlet.service(request, response);
     }
-    
-    /** SLING-135, find Content-Type for given URL, in a safe way 
+
+    /** SLING-135, find Content-Type for given URL, in a safe way
      *  TODO: use the MimeTypeService from sling-commons?
      * */
     protected String getContentType(URL url) {
         String result = null;
-        
+
         // get the filename from the URL
         String filename = url.getPath();
         filename = new File(filename).getName();
-        
+
         // get content-type, avoid null
         // previously used conn.getContentType(), but see SLING-112
         if(filename!=null) {
@@ -158,7 +158,7 @@
         if(result==null) {
             result = "application/octet-stream";
         }
-        
+
         return result;
     }
 

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/StreamServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/StreamServlet.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/StreamServlet.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/StreamServlet.java Wed Jan  9 02:05:24 2008
@@ -70,7 +70,7 @@
         Node node = request.getResource().adaptTo(Node.class);
         if (node == null) {
             throw new HttpStatusCodeException(HttpServletResponse.SC_NOT_FOUND,
-                "Resource " + request.getResource().getURI()
+                "Resource " + request.getResource().getPath()
                     + " must be a Node");
         }
 

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/renderers/DefaultHtmlRendererServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/renderers/DefaultHtmlRendererServlet.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/renderers/DefaultHtmlRendererServlet.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/renderers/DefaultHtmlRendererServlet.java Wed Jan  9 02:05:24 2008
@@ -49,14 +49,14 @@
     throws ServletException,IOException
     {
         final Resource  r = req.getResource();
-        
+
         resp.setContentType(responseContentType);
         final PrintWriter pw = resp.getWriter();
-        
+
         final Node node = r.adaptTo(Node.class);
         final SyntheticResourceData srd = r.adaptTo(SyntheticResourceData.class);
         final Property p = r.adaptTo(Property.class);
-        
+
         try {
             if(srd != null) {
                 renderer.render(pw, r, srd);
@@ -68,10 +68,10 @@
                 // for properties, we just output the String value
                 renderer.render(pw, r, p);
             }
-        
+
         } catch (RepositoryException re) {
             throw new ServletException("Cannot dump contents of "
-                + req.getResource().getURI(), re);
+                + req.getResource().getPath(), re);
         }
     }
 }

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/webapp/javascript.html
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/webapp/javascript.html?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/webapp/javascript.html (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/webapp/javascript.html Wed Jan  9 02:05:24 2008
@@ -62,7 +62,7 @@
 &lt;html>
 &lt;body>
 &lt;p>This page is generated from an ESP template!&lt;/p>
-&lt;h1>&lt;%= resource.getURI() %>&lt;/h1>
+&lt;h1>&lt;%= resource.getPath() %>&lt;/h1>
 &lt;%
   for (var prop in resource.node) {
     %>
@@ -113,7 +113,7 @@
 // TODO this is not very useful, rewrite this example
 out.println("&lt;html>&lt;body>");
 out.println("&lt;p>This page is generated from a rhino script&lt;/p>");
-out.println("&lt;h1>" + resource.getURI() + "&lt;/h1>");
+out.println("&lt;h1>" + resource.getPath() + "&lt;/h1>");
 out.println("&lt;p>Title: " + resource.getNode().getProperty('title').getString() + "&lt;/p>");
 out.println("&lt;p>Text: " + resource.getNode().getProperty('text').getString() + "&lt;/p>");
 out.println("&lt;/body>&lt;/html>");</pre>

Modified: incubator/sling/trunk/microsling/microsling-core/src/test/resources/integration-test/include-test.esp
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/test/resources/integration-test/include-test.esp?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/test/resources/integration-test/include-test.esp (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/test/resources/integration-test/include-test.esp Wed Jan  9 02:05:24 2008
@@ -20,7 +20,7 @@
 			  <p>testInfiniteLoop = <%= resource.node.testInfiniteLoop %></p>
 			  <%
 			  // try to include the item itself, to cause an infinite loop
-			  sling.include(resource.getURI() + ".html");
+			  sling.include(resource.getPath() + ".html");
 			}
 		%>
 	</body>

Modified: incubator/sling/trunk/osgi/obr/src/main/java/org/apache/sling/osgi/obr/Resource.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/osgi/obr/src/main/java/org/apache/sling/osgi/obr/Resource.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/osgi/obr/src/main/java/org/apache/sling/osgi/obr/Resource.java (original)
+++ incubator/sling/trunk/osgi/obr/src/main/java/org/apache/sling/osgi/obr/Resource.java Wed Jan  9 02:05:24 2008
@@ -263,7 +263,7 @@
     /**
      * @return the uri
      */
-    public String getUri() {
+    public String getPath() {
         return this.uri;
     }
 

Modified: incubator/sling/trunk/scripting/freemarker/src/main/java/org/apache/sling/scripting/freemarker/FreemarkerScriptEngine.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/freemarker/src/main/java/org/apache/sling/scripting/freemarker/FreemarkerScriptEngine.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/scripting/freemarker/src/main/java/org/apache/sling/scripting/freemarker/FreemarkerScriptEngine.java (original)
+++ incubator/sling/trunk/scripting/freemarker/src/main/java/org/apache/sling/scripting/freemarker/FreemarkerScriptEngine.java Wed Jan  9 02:05:24 2008
@@ -60,7 +60,7 @@
                 "FreeMarker templates only support GET requests");
         }
 
-        String scriptName = helper.getScript().getScriptResource().getURI();
+        String scriptName = helper.getScript().getScriptResource().getPath();
 
         try {
             Template tmpl = new Template(scriptName, reader, configuration);

Modified: incubator/sling/trunk/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/RhinoJavaScriptEngine.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/RhinoJavaScriptEngine.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/RhinoJavaScriptEngine.java (original)
+++ incubator/sling/trunk/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/RhinoJavaScriptEngine.java Wed Jan  9 02:05:24 2008
@@ -42,7 +42,7 @@
 public class RhinoJavaScriptEngine extends AbstractSlingScriptEngine {
 
     private Scriptable rootScope;
-    
+
     public RhinoJavaScriptEngine(ScriptEngineFactory factory, Scriptable rootScope) {
         super(factory);
         this.rootScope = rootScope;
@@ -53,7 +53,7 @@
         Bindings bindings = scriptContext.getBindings(ScriptContext.ENGINE_SCOPE);
 
         SlingScriptHelper helper = (SlingScriptHelper) bindings.get(SlingBindings.SLING);
-        String scriptName = helper.getScript().getScriptResource().getURI();
+        String scriptName = helper.getScript().getScriptResource().getPath();
 
         // wrap the reader in an EspReader for ESP scripts
         if (scriptName.endsWith(RhinoJavaScriptEngineFactory.ESP_SCRIPT_EXTENSION)) {
@@ -64,7 +64,7 @@
         try {
             final Context rhinoContext = Context.enter();
             final ScriptableObject scope = new NativeObject();
-            
+
             // Set the global scope to be our prototype
             scope.setPrototype(rootScope);
 

Modified: incubator/sling/trunk/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/wrapper/ScriptableResource.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/wrapper/ScriptableResource.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/wrapper/ScriptableResource.java (original)
+++ incubator/sling/trunk/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/wrapper/ScriptableResource.java Wed Jan  9 02:05:24 2008
@@ -26,17 +26,17 @@
 /**
  * Resource in JavaScript has following signature: [Object] getData(); [Object]
  * data [Item] getItem(); [Item] item [String] getResourceType(); [String] type
- * [String] getURI(); [String] uri
+ * [String] getPath(); [String] path
  */
 public class ScriptableResource extends ScriptableObject {
-    
+
     public static final String CLASSNAME = "Resource";
-    
+
     private Resource resource;
 
     public ScriptableResource() {
     }
-    
+
     public ScriptableResource(Resource resource) {
         this.resource = resource;
     }
@@ -73,25 +73,25 @@
         return this.jsFunction_getResourceType();
     }
 
-    public Object jsFunction_getURI() {
-        return Context.javaToJS(resource.getURI(), this);
+    public Object jsFunction_getPath() {
+        return Context.javaToJS(resource.getPath(), this);
     }
 
-    public Object jsGet_uri() {
-        return this.jsFunction_getURI();
+    public Object jsGet_path() {
+        return this.jsFunction_getPath();
     }
 
     public Object jsFunction_getMetadata() {
         return resource.getResourceMetadata();
     }
-    
+
     public Object jsGet_meta() {
         return resource.getResourceMetadata();
     }
 
     @Override
     public Object getDefaultValue(Class typeHint) {
-        return resource.getURI();
+        return resource.getPath();
     }
 
     public void setResource(Resource entry) {

Modified: incubator/sling/trunk/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/IncludeTagHandler.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/IncludeTagHandler.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/IncludeTagHandler.java (original)
+++ incubator/sling/trunk/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/IncludeTagHandler.java Wed Jan  9 02:05:24 2008
@@ -71,12 +71,12 @@
         if (resource != null) {
             // get the request dispatcher for the content object
             dispatcher = request.getRequestDispatcher(resource);
-            path = resource.getURI();
+            path = resource.getPath();
 
         } else if (path != null) {
             // ensure the child path is absolute and assign the result to path
             if (!path.startsWith("/")) {
-                path = request.getResource().getURI() + "/" + path;
+                path = request.getResource().getPath() + "/" + path;
             }
 
             // if the resourceType is set, try to resolve the path, if no

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=610330&r1=610329&r2=610330&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 Wed Jan  9 02:05:24 2008
@@ -46,7 +46,7 @@
 
 /**
  * The JSP engine (a.k.a Jasper).
- * 
+ *
  * @scr.component scr="no" label="%jsphandler.name"
  *                description="%jsphandler.description"
  * @scr.property name="service.description" value="JSP Script Handler"
@@ -66,7 +66,7 @@
  * @scr.property name="jasper.trimSpaces" value="false" type="Boolean"
  * @scr.property name="jasper.displaySourceFragments" value="true"
  *               type="Boolean"
- * @scr.service              
+ * @scr.service
  */
 public class JspScriptEngineFactory extends AbstractScriptEngineFactory {
 
@@ -135,7 +135,7 @@
         JspRuntimeContext rctxt = jspRuntimeContext;
 
         SlingScript script = scriptHelper.getScript();
-        String scriptName = script.getScriptResource().getURI();
+        String scriptName = script.getScriptResource().getPath();
         JspServletWrapperAdapter wrapper = (JspServletWrapperAdapter) rctxt.getWrapper(scriptName);
         if (wrapper != null) {
             return wrapper;

Modified: incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/SlingIOProvider.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/SlingIOProvider.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/SlingIOProvider.java (original)
+++ incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/SlingIOProvider.java Wed Jan  9 02:05:24 2008
@@ -247,7 +247,7 @@
                 if (resource != null) {
                     Iterator<Resource> entries = resolver.listChildren(resource);
                     while (entries.hasNext()) {
-                        paths.add(entries.next().getURI());
+                        paths.add(entries.next().getPath());
                     }
                 }
             } catch (SlingException se) {

Modified: incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/impl/DefaultSlingScript.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/impl/DefaultSlingScript.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/impl/DefaultSlingScript.java (original)
+++ incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/impl/DefaultSlingScript.java Wed Jan  9 02:05:24 2008
@@ -83,16 +83,16 @@
         try {
             // evaluate the script
             scriptEngine.eval(reader, ctx);
-            
+
             // optionall flush the output channel
             Object flushObject = bindings.get(SlingBindings.FLUSH);
             if (flushObject instanceof Boolean && ((Boolean) flushObject).booleanValue()) {
                 ctx.getWriter().flush();
             }
-            
+
             // allways flush the error channel
             ctx.getErrorWriter().flush();
-            
+
         } catch (ScriptException se) {
             throw new ServletException(se.getMessage(), se);
         }
@@ -208,7 +208,7 @@
                 bindings.put(entry.getKey(), entry.getValue());
             }
         }
-        
+
         return bindings;
     }
 
@@ -217,7 +217,7 @@
     }
 
     private String getLoggerName() {
-        String name = getScriptResource().getURI();
+        String name = getScriptResource().getPath();
         name = name.replace('.', '$');
         name = name.replace('/', '.');
         return name;

Modified: incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/impl/DefaultSlingScriptResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/impl/DefaultSlingScriptResolver.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/impl/DefaultSlingScriptResolver.java (original)
+++ incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/impl/DefaultSlingScriptResolver.java Wed Jan  9 02:05:24 2008
@@ -112,7 +112,7 @@
             if (scriptRoot != null) {
 
                 log.debug("Looking for script with filename={} under {}",
-                    baseName, scriptRoot.getURI());
+                    baseName, scriptRoot.getPath());
 
                 // get the item and ensure it is a node
                 Iterator<Resource> children = resolver.listChildren(scriptRoot);
@@ -125,7 +125,7 @@
 
         if (result != null) {
             log.info("Script {} found for Resource={}",
-                result.getScriptResource().getURI(), request.getResource());
+                result.getScriptResource().getPath(), request.getResource());
         } else {
             log.debug("No script found for Resource={}", request.getResource());
         }
@@ -150,10 +150,10 @@
             SlingScript script = getScript(scriptResource, null);
             if (script == null) {
                 log.error("Cannot handle script {} for path {}",
-                    scriptResource.getURI(), path);
+                    scriptResource.getPath(), path);
             } else {
                 log.debug("Returning script {} for path {}",
-                    scriptResource.getURI(), path);
+                    scriptResource.getPath(), path);
             }
         } else {
             log.error("No resource found at " + path);
@@ -303,7 +303,7 @@
     // ---------- inner class --------------------------------------------------
 
     private SlingScript getScript(Resource resource, String baseName) {
-        String path = resource.getURI();
+        String path = resource.getPath();
         String name = path.substring(path.lastIndexOf('/') + 1);
 
         if (baseName == null || name.startsWith(baseName)) {

Modified: incubator/sling/trunk/scripting/velocity/src/main/java/org/apache/sling/scripting/velocity/VelocityTemplatesScriptEngine.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/velocity/src/main/java/org/apache/sling/scripting/velocity/VelocityTemplatesScriptEngine.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/scripting/velocity/src/main/java/org/apache/sling/scripting/velocity/VelocityTemplatesScriptEngine.java (original)
+++ incubator/sling/trunk/scripting/velocity/src/main/java/org/apache/sling/scripting/velocity/VelocityTemplatesScriptEngine.java Wed Jan  9 02:05:24 2008
@@ -64,7 +64,7 @@
                 "FreeMarker templates only support GET requests");
         }
 
-        String scriptName = helper.getScript().getScriptResource().getURI();
+        String scriptName = helper.getScript().getScriptResource().getPath();
 
         // initialize the Velocity context
         final VelocityContext c = new VelocityContext();

Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingHttpServletResponseImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingHttpServletResponseImpl.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingHttpServletResponseImpl.java (original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingHttpServletResponseImpl.java Wed Jan  9 02:05:24 2008
@@ -218,7 +218,7 @@
             return path;
         }
 
-        String base = getRequestData().getContentData().getResource().getURI();
+        String base = getRequestData().getContentData().getResource().getPath();
         int lastSlash = base.lastIndexOf('/');
         if (lastSlash >= 0) {
             path = base.substring(0, lastSlash+1) + path;
@@ -228,7 +228,7 @@
 
         return path;
     }
-    
+
     private String pathToURL(String url) {
         PathResolver pr = getRequestData().getResourceResolver().adaptTo(PathResolver.class);
         return (pr != null) ? pr.pathToURL(url) : url;

Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/log/CustomLogFormat.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/log/CustomLogFormat.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/log/CustomLogFormat.java (original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/log/CustomLogFormat.java Wed Jan  9 02:05:24 2008
@@ -727,7 +727,7 @@
 
         protected String getValue(SlingHttpServletRequest request) {
             Resource resource = request.getResource();
-            return (resource != null) ? resource.getURI() : null;
+            return (resource != null) ? resource.getPath() : null;
         }
 
         protected String getValue(LoggerResponse response) {

Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestDispatcher.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestDispatcher.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestDispatcher.java (original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestDispatcher.java Wed Jan  9 02:05:24 2008
@@ -49,7 +49,7 @@
     public SlingRequestDispatcher(Resource resource, RequestDispatcherOptions options) {
         this.resource = resource;
         this.options = options;
-        this.path = resource.getURI();
+        this.path = resource.getPath();
     }
 
     public void include(ServletRequest request, ServletResponse response)
@@ -105,7 +105,7 @@
         }
 
         // get parent of current request
-        String uri = request.getResource().getURI();
+        String uri = request.getResource().getPath();
         int lastSlash = uri.lastIndexOf('/');
         if (lastSlash >= 0) {
             uri = uri.substring(0, lastSlash);

Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestPathInfo.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestPathInfo.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestPathInfo.java (original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestPathInfo.java Wed Jan  9 02:05:24 2008
@@ -24,7 +24,7 @@
 /**
  * microsling request URI parser that provides SlingRequestPathInfo for the
  * current request, based on the path of the Resource. The values provided by
- * this depend on the Resource.getURI() value, as the ResourceResolver might use
+ * this depend on the Resource.getPath() value, as the ResourceResolver might use
  * all or only part of the request URI path to locate the resource (see also
  * SLING-60 ). What we're after is the remainder of the path, the part that was
  * not used to locate the Resource, and we split that part in different

Modified: incubator/sling/trunk/sling/sample/src/main/java/org/apache/sling/sample/Navigation.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/sample/src/main/java/org/apache/sling/sample/Navigation.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/sling/sample/src/main/java/org/apache/sling/sample/Navigation.java (original)
+++ incubator/sling/trunk/sling/sample/src/main/java/org/apache/sling/sample/Navigation.java Wed Jan  9 02:05:24 2008
@@ -67,7 +67,7 @@
         // to not draw the link to the content of the current page, we
         // retrieve the path of the page level content
         Resource requestContent = (Resource) request.getAttribute(SlingConstants.ATTR_REQUEST_CONTENT);
-        String requestPath = requestContent.getURI();
+        String requestPath = requestContent.getPath();
 
         PrintWriter pw = response.getWriter();
         pw.println("<ul>");

Modified: incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/defaults/DefaultServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/defaults/DefaultServlet.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/defaults/DefaultServlet.java (original)
+++ incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/defaults/DefaultServlet.java Wed Jan  9 02:05:24 2008
@@ -83,9 +83,9 @@
         PrintWriter pw = response.getWriter();
 
         pw.println("<html><head><title>");
-        pw.println(resource.getURI());
+        pw.println(resource.getPath());
         pw.println("</title></head><body bgcolor='white' fgcolor='black'>");
-        pw.println("<h1>Contents of <code>" + resource.getURI()
+        pw.println("<h1>Contents of <code>" + resource.getPath()
             + "</code></h1>");
 
         pw.println("<table>");
@@ -107,7 +107,7 @@
         response.setContentType("text/plain; charset=UTF-8");
         PrintWriter pw = response.getWriter();
 
-        pw.println("Contents of " + resource.getURI());
+        pw.println("Contents of " + resource.getPath());
         pw.println();
 
         for (Map.Entry<Object, Object> entry : contentMap.entrySet()) {
@@ -129,7 +129,7 @@
         response.setContentType("text/plain; charset=ISO-8859-1");
 
         OutputStream out = response.getOutputStream();
-        props.store(out, "Contents of " + resource.getURI());
+        props.store(out, "Contents of " + resource.getPath());
     }
 
     private void renderContentXML(Resource resource,

Modified: incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/helper/SlingScriptServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/helper/SlingScriptServlet.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/helper/SlingScriptServlet.java (original)
+++ incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/helper/SlingScriptServlet.java Wed Jan  9 02:05:24 2008
@@ -18,8 +18,10 @@
  */
 package org.apache.sling.servlet.resolver.helper;
 
-import static java.lang.Boolean.*;
-import static org.apache.sling.api.scripting.SlingBindings.*;
+import static java.lang.Boolean.TRUE;
+import static org.apache.sling.api.scripting.SlingBindings.FLUSH;
+import static org.apache.sling.api.scripting.SlingBindings.REQUEST;
+import static org.apache.sling.api.scripting.SlingBindings.RESPONSE;
 
 import java.io.IOException;
 
@@ -86,7 +88,7 @@
     }
 
     public String getServletInfo() {
-        return "Script " + script.getScriptResource().getURI();
+        return "Script " + script.getScriptResource().getPath();
     }
 
     public void init(ServletConfig servletConfig) {

Modified: incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FileServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FileServlet.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FileServlet.java (original)
+++ incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FileServlet.java Wed Jan  9 02:05:24 2008
@@ -48,7 +48,7 @@
         FileObject file = resource.adaptTo(FileObject.class);
         if (file == null) {
             throw new SlingException("Missing mapped object for file "
-                + resource.getURI());
+                + resource.getPath());
         }
 
         // just render the child content
@@ -58,7 +58,7 @@
             RequestDispatcher rd = request.getRequestDispatcher(jcrContent);
             rd.include(request, response);
         } else {
-            throw new SlingException("File " + resource.getURI()
+            throw new SlingException("File " + resource.getPath()
                 + " has no content");
         }
     }

Modified: incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FolderServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FolderServlet.java?rev=610330&r1=610329&r2=610330&view=diff
==============================================================================
--- incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FolderServlet.java (original)
+++ incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FolderServlet.java Wed Jan  9 02:05:24 2008
@@ -49,7 +49,7 @@
         FolderObject content = resource.adaptTo(FolderObject.class);
         if (content == null) {
             throw new SlingException("Missing mapped object for folder "
-                + resource.getURI());
+                + resource.getPath());
         }
 
         response.setContentType("text/html");
@@ -64,7 +64,7 @@
             Iterator<Resource> entries = request.getResourceResolver().listChildren(resource);
             while (entries.hasNext()) {
                 Resource entry = entries.next();
-                pw.println("<li>" + entry.getURI() + "</li>");
+                pw.println("<li>" + entry.getPath() + "</li>");
             }
         } catch (SlingException ce) {
             // TODO: handle



Mime
View raw message