]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-84: Adding Client Library code to new source structure.
authorRichard Millet <richard.millet@berkeley.edu>
Sat, 2 May 2009 05:28:02 +0000 (05:28 +0000)
committerRichard Millet <richard.millet@berkeley.edu>
Sat, 2 May 2009 05:28:02 +0000 (05:28 +0000)
services/common/src/main/java/org/collectionspace/services/client/CollectionSpaceClient.java [new file with mode: 0644]

diff --git a/services/common/src/main/java/org/collectionspace/services/client/CollectionSpaceClient.java b/services/common/src/main/java/org/collectionspace/services/client/CollectionSpaceClient.java
new file mode 100644 (file)
index 0000000..a24a19b
--- /dev/null
@@ -0,0 +1,32 @@
+package org.collectionspace.services.client;\r
+\r
+public abstract class CollectionSpaceClient {\r
+       static final String URL_PROPERTY = "org.collectionspace.url";\r
+       /*\r
+       static final String URL_PROPERTY_SCHEME = "org.collectionspace.url.schme";\r
+       static final String URL_PROPERTY_HOST = "org.collectionspace.url.host";\r
+       static final String URL_PROPERTY_PORT = "org.collectionspace.url.port";\r
+       static final String URL_PROPERTY_CONTEXT = "org.collectionspace.url.context";\r
+        */\r
+       \r
+       private static final String SCHEME = "http";\r
+       private static final String HOST = "localhost";\r
+       private static final String PORT = "8080";\r
+       private static final String URI = "/helloworld/cspace-nuxeo";\r
+       private static final String URL = SCHEME + "://" +\r
+               HOST + ":" +\r
+               PORT +\r
+               URI;\r
+       private String collectionSpaceURL = null;\r
+       \r
+       \r
+       String getURL() {\r
+               String result = collectionSpaceURL;\r
+               \r
+               if (collectionSpaceURL == null) {\r
+                       result = collectionSpaceURL = System.getProperty(URL_PROPERTY, URL);\r
+               }\r
+               \r
+               return result;\r
+       }\r
+}\r