Author: areshetnyak
Date: 2009-12-29 11:07:55 -0500 (Tue, 29 Dec 2009)
New Revision: 1243
Modified:
jcr/branches/1.12.0-JBCCACHE/applications/cluster.test.client/src/main/java/org/exoplatform/services/jcr/cluster/JCRWebdavConnection.java
Log:
EXOJCR-330 : The cluster.test.client was changed.
Modified:
jcr/branches/1.12.0-JBCCACHE/applications/cluster.test.client/src/main/java/org/exoplatform/services/jcr/cluster/JCRWebdavConnection.java
===================================================================
---
jcr/branches/1.12.0-JBCCACHE/applications/cluster.test.client/src/main/java/org/exoplatform/services/jcr/cluster/JCRWebdavConnection.java 2009-12-29
15:53:15 UTC (rev 1242)
+++
jcr/branches/1.12.0-JBCCACHE/applications/cluster.test.client/src/main/java/org/exoplatform/services/jcr/cluster/JCRWebdavConnection.java 2009-12-29
16:07:55 UTC (rev 1243)
@@ -80,9 +80,12 @@
return Put(workspacePath + name, stream);
}
- public void removeNode(String name) throws IOException, ModuleException
+ public HTTPResponse removeNode(String name) throws IOException, ModuleException
{
- Delete(workspacePath + name).getStatusCode();
+ HTTPResponse response = Delete(workspacePath + name);
+ response.getStatusCode();
+
+ return response;
}
/*public void getNode(String name) throws IOException, ModuleException
@@ -234,11 +237,27 @@
MkCol(workspacePath + path).getStatusCode();
}
- public void restore(String node, String version) throws IOException, ModuleException
+ public HTTPResponse restore(String node, String version) throws IOException,
ModuleException
{
NVPair[] query = new NVPair[1];
query[0] = new NVPair("version", version);
- Get(workspacePath + node, query).getStatusCode();
+
+ HTTPResponse response = Get(workspacePath + node, query);
+ response.getStatusCode();
+
+ return response;
}
+
+ public HTTPResponse moveNode(String path, String destination) throws IOException,
ModuleException
+ {
+ NVPair[] headers = new NVPair[2];
+ headers[0] = new NVPair(ExtHttpHeaders.DESTINATION, this.getProtocol() +
"://" + this.getHost() + ":" + this.getPort() + workspacePath +
destination);
+ headers[1] = new NVPair(HttpHeaders.CONTENT_LENGTH,
Integer.toString("".length()));
+ HTTPResponse response = ExtensionMethod("MOVE", workspacePath + path,
"".getBytes(), headers);
+ response.getStatusCode();
+
+ return response;
+ }
+
}
\ No newline at end of file
Show replies by date