From: Richard Millet Date: Fri, 10 Apr 2009 22:07:01 +0000 (+0000) Subject: CSPACE-69: Add new string constants for PersonNuxeo and CollectionObject workspaces... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=43fdd59aa0362e6373450fb8c7c6d842b2f7bf54;p=tmp%2Fjakarta-migration.git CSPACE-69: Add new string constants for PersonNuxeo and CollectionObject workspaces. Also gave these constants the values for our Nuxeo instance on demo.collectionspace.org. --- diff --git a/HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/CollectionSpaceResource.java b/HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/CollectionSpaceResource.java index e1008fd15..2c59b2c13 100644 --- a/HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/CollectionSpaceResource.java +++ b/HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/CollectionSpaceResource.java @@ -1,10 +1,22 @@ package org.collectionspace.hello.services; -public interface CollectionSpaceResource { +import org.collectionspace.hello.services.nuxeo.NuxeoRESTClient; + +public abstract class CollectionSpaceResource { //replace WORKSPACE_UID for resource workspace - static String CS_NUXEO_WORKSPACE_UID = "6c7881fe-54c5-486e-b144-a025dee3a484"; - static String CS_NUXEO_DEFAULT_REPOS = "default"; + static String CS_COLLECTIONOBJECT_WORKSPACE_UID = "5a37d40f-59c4-4d15-93ad-e0e6a0c33587"; + static String CS_PERSON_WORKSPACE_UID = "eae0d7b6-580a-45a3-a0f3-e25e980e03bb"; + //replace host if not running on localhost - static String CS_NUXEO_HOST = "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"; + + NuxeoRESTClient getClient() { + NuxeoRESTClient nxClient = new NuxeoRESTClient(CS_NUXEO_URI); + nxClient.setAuthType(NuxeoRESTClient.AUTH_TYPE_BASIC); + nxClient.setBasicAuthentication("Administrator", "Administrator"); + return nxClient; + } + }