]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-84: An abstract class for all Nuxeo-REST implementations of CollectionSpace...
authorRichard Millet <richard.millet@berkeley.edu>
Fri, 1 May 2009 18:36:26 +0000 (18:36 +0000)
committerRichard Millet <richard.millet@berkeley.edu>
Fri, 1 May 2009 18:36:26 +0000 (18:36 +0000)
services/common/src/main/java/org/collectionspace/services/nuxeo/CollectionSpaceServiceNuxeoImpl.java [new file with mode: 0644]

diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/CollectionSpaceServiceNuxeoImpl.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/CollectionSpaceServiceNuxeoImpl.java
new file mode 100644 (file)
index 0000000..5f131c8
--- /dev/null
@@ -0,0 +1,28 @@
+/**\r
+ * \r
+ */\r
+package org.collectionspace.services.nuxeo;\r
+\r
+import org.collectionspace.services.nuxeo.NuxeoRESTClient;\r
+\r
+\r
+/**\r
+ * @author remillet\r
+ *\r
+ */\r
+public abstract class CollectionSpaceServiceNuxeoImpl {\r
+\r
+    //replace host if not running on localhost\r
+    //static String CS_NUXEO_HOST = "173.45.234.217";\r
+       static String CS_NUXEO_HOST = "localhost";\r
+    static String CS_NUXEO_URI = "http://" + CS_NUXEO_HOST + ":8080/nuxeo";\r
+       \r
+    public NuxeoRESTClient getClient() {\r
+               NuxeoRESTClient nxClient = new NuxeoRESTClient(CS_NUXEO_URI);\r
+               \r
+               nxClient.setAuthType(NuxeoRESTClient.AUTH_TYPE_BASIC);\r
+               nxClient.setBasicAuthentication("Administrator", "Administrator");\r
+               \r
+               return nxClient;\r
+       }\r
+}\r