From b9306973e7eb02db0ef7cb6f3b5a26976a62292e Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Fri, 1 May 2009 18:36:26 +0000 Subject: [PATCH] CSPACE-84: An abstract class for all Nuxeo-REST implementations of CollectionSpace service interfaces. --- .../CollectionSpaceServiceNuxeoImpl.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 services/common/src/main/java/org/collectionspace/services/nuxeo/CollectionSpaceServiceNuxeoImpl.java 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 index 000000000..5f131c81e --- /dev/null +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/CollectionSpaceServiceNuxeoImpl.java @@ -0,0 +1,28 @@ +/** + * + */ +package org.collectionspace.services.nuxeo; + +import org.collectionspace.services.nuxeo.NuxeoRESTClient; + + +/** + * @author remillet + * + */ +public abstract class CollectionSpaceServiceNuxeoImpl { + + //replace host if not running on localhost + //static String CS_NUXEO_HOST = "173.45.234.217"; + static String CS_NUXEO_HOST = "localhost"; + static String CS_NUXEO_URI = "http://" + CS_NUXEO_HOST + ":8080/nuxeo"; + + public NuxeoRESTClient getClient() { + NuxeoRESTClient nxClient = new NuxeoRESTClient(CS_NUXEO_URI); + + nxClient.setAuthType(NuxeoRESTClient.AUTH_TYPE_BASIC); + nxClient.setBasicAuthentication("Administrator", "Administrator"); + + return nxClient; + } +} -- 2.47.3