--- /dev/null
+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