From: Richard Millet Date: Fri, 1 May 2009 18:36:26 +0000 (+0000) Subject: CSPACE-84: An abstract class for all Nuxeo-REST implementations of CollectionSpace... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=b9306973e7eb02db0ef7cb6f3b5a26976a62292e;p=tmp%2Fjakarta-migration.git CSPACE-84: An abstract class for all Nuxeo-REST implementations of CollectionSpace service interfaces. --- 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; + } +}