Mercurial > hg > AnnotationManagerN4J
comparison src/main/java/de/mpiwg/itgroup/annotations/restlet/BaseRestlet.java @ 58:f5c0e6df7e88
made uri prefixes in store configurable.
author | casties |
---|---|
date | Tue, 20 Nov 2012 18:23:52 +0100 |
parents | 4efb21cf0ce0 |
children | e2f86ef9b871 |
comparison
equal
deleted
inserted
replaced
57:4efb21cf0ce0 | 58:f5c0e6df7e88 |
---|---|
76 public static final String ADMIN_PASSWORD_KEY = "annotationmanager.admin.password"; | 76 public static final String ADMIN_PASSWORD_KEY = "annotationmanager.admin.password"; |
77 | 77 |
78 /** | 78 /** |
79 * run in authorization mode i.e. with tokens. | 79 * run in authorization mode i.e. with tokens. |
80 */ | 80 */ |
81 protected boolean authorizationMode = false; | 81 protected boolean authorizationMode = false; |
82 public static final String AUTHORIZATION_MODE_KEY = "annotationmanager.authorization"; | 82 public static final String AUTHORIZATION_MODE_KEY = "annotationmanager.authorization"; |
83 | 83 |
84 /** | |
85 * prefix to create uris for tags in store. | |
86 */ | |
87 public static String TAGS_URI_PREFIX = ""; | |
88 public static final String TAGS_URI_KEY = "annotationmanager.uris.tags"; | |
89 | |
90 /** | |
91 * prefix to create uris for persons in store. | |
92 */ | |
93 public static String PERSONS_URI_PREFIX = ""; | |
94 public static final String PERSONS_URI_KEY = "annotationmanager.uris.persons"; | |
95 | |
96 /** | |
97 * prefix to create uris for groups in store. | |
98 */ | |
99 public static String GROUPS_URI_PREFIX = ""; | |
100 public static final String GROUPS_URI_KEY = "annotationmanager.uris.groups"; | |
101 | |
84 /** | 102 /** |
85 * constructor | 103 * constructor |
86 * | 104 * |
87 * @param context | 105 * @param context |
88 */ | 106 */ |
182 logger.error("Unable to get resource " + CONSUMER_KEYS_PATH); | 200 logger.error("Unable to get resource " + CONSUMER_KEYS_PATH); |
183 } | 201 } |
184 // store config | 202 // store config |
185 sc.setAttribute(CONSUMERKEYS_KEY, consumerKeys); | 203 sc.setAttribute(CONSUMERKEYS_KEY, consumerKeys); |
186 } | 204 } |
205 /* | |
206 * read uri prefixes | |
207 */ | |
208 String pup = (String) sc.getAttribute(PERSONS_URI_KEY); | |
209 if (pup != null) { | |
210 BaseRestlet.PERSONS_URI_PREFIX = pup; | |
211 } | |
212 String gup = (String) sc.getAttribute(GROUPS_URI_KEY); | |
213 if (gup != null) { | |
214 BaseRestlet.GROUPS_URI_PREFIX = gup; | |
215 } | |
216 String tup = (String) sc.getAttribute(TAGS_URI_KEY); | |
217 if (tup != null) { | |
218 BaseRestlet.TAGS_URI_PREFIX = tup; | |
219 } | |
187 } else { | 220 } else { |
188 logger.error("Unable to get ServletContext!"); | 221 logger.error("Unable to get ServletContext!"); |
189 } | 222 } |
190 } | 223 } |
191 | 224 |