]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/proxy/ResourceProxy.java
Introduce JCR proxys
[lgpl/argeo-commons.git] / server / runtime / org.argeo.server.jcr / src / main / java / org / argeo / jcr / proxy / ResourceProxy.java
diff --git a/server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/proxy/ResourceProxy.java b/server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/proxy/ResourceProxy.java
new file mode 100644 (file)
index 0000000..265ee93
--- /dev/null
@@ -0,0 +1,19 @@
+package org.argeo.jcr.proxy;
+
+import javax.jcr.Node;
+import javax.jcr.Session;
+
+/** A proxy which nows how to resolve and synchronize relative URLs */
+public interface ResourceProxy {
+       /** Path to the proxied node (which may not already exist) */
+       public String getNodePath(String relativePath);
+
+       /**
+        * Proxy the file referenced by this relative path in the underlying
+        * repository
+        * 
+        * @return the unique identifier of the proxied Node, <code>null</code> if
+        *         the resource was not found (e.g. HTPP 404)
+        */
+       public Node proxy(Session session,String relativePath);
+}