]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
879800e34812b1ef052fe23f79188396a736dc4f
[tmp/jakarta-migration.git] /
1 package org.collectionspace.hello.client;\r
2 \r
3 import java.util.*;\r
4 \r
5 public abstract class CollectionSpaceClient {\r
6         static final String URL_PROPERTY = "org.collectionspace.url";\r
7         /*\r
8         static final String URL_PROPERTY_SCHEME = "org.collectionspace.url.schme";\r
9         static final String URL_PROPERTY_HOST = "org.collectionspace.url.host";\r
10         static final String URL_PROPERTY_PORT = "org.collectionspace.url.port";\r
11         static final String URL_PROPERTY_CONTEXT = "org.collectionspace.url.context";\r
12          */\r
13         \r
14         private static final String SCHEME = "http";\r
15         private static final String HOST = "localhost";\r
16         private static final String PORT = "8080";\r
17         private static final String URI = "/helloworld/cspace-nuxeo";\r
18         private static final String URL = SCHEME + "://" +\r
19                 HOST + ":" +\r
20                 PORT +\r
21                 URI;\r
22         private String collectionSpaceURL = null;\r
23         \r
24         \r
25         String getURL() {\r
26                 String result = collectionSpaceURL;\r
27                 \r
28                 if (collectionSpaceURL == null) {\r
29                         result = collectionSpaceURL = System.getProperty(URL_PROPERTY, URL);\r
30                 }\r
31                 \r
32                 return result;\r
33         }\r
34 }\r