Mercurial > hg > AnnotationManagerN4J
comparison src/main/java/de/mpiwg/itgroup/annotations/restlet/BaseRestlet.java @ 57:4efb21cf0ce0
new non-authorized mode without tokens. enabled by default. configured with annotationmanager.authorization=false property.
author | casties |
---|---|
date | Tue, 20 Nov 2012 17:56:35 +0100 |
parents | 64aa756c60cc |
children | f5c0e6df7e88 |
comparison
equal
deleted
inserted
replaced
56:30c2e7d4eaf9 | 57:4efb21cf0ce0 |
---|---|
31 public abstract class BaseRestlet extends Application { | 31 public abstract class BaseRestlet extends Application { |
32 | 32 |
33 public static Logger logger = Logger.getLogger(BaseRestlet.class); | 33 public static Logger logger = Logger.getLogger(BaseRestlet.class); |
34 | 34 |
35 /** | 35 /** |
36 * Properties holding consumer keys and secrets | 36 * Properties holding consumer keys and secrets. |
37 */ | 37 */ |
38 protected Properties consumerKeys; | 38 protected Properties consumerKeys; |
39 public String CONSUMER_KEYS_PATH = "WEB-INF/consumerkeys.property"; | 39 public String CONSUMER_KEYS_PATH = "WEB-INF/consumerkeys.property"; |
40 public static final String CONSUMERKEYS_KEY = "annotationmanager.consumerkeys"; | 40 public static final String CONSUMERKEYS_KEY = "annotationmanager.consumerkeys"; |
41 | 41 |
42 /** | |
43 * Properties holding server config. | |
44 */ | |
42 protected Properties serverConfig; | 45 protected Properties serverConfig; |
43 public String CONFIG_PROPS_PATH = "WEB-INF/serverconfig.property"; | 46 public String CONFIG_PROPS_PATH = "WEB-INF/serverconfig.property"; |
44 public static final String SERVERCONFIG_KEY = "annotationmanager.serverconfig"; | 47 public static final String SERVERCONFIG_KEY = "annotationmanager.serverconfig"; |
45 | 48 |
49 /** | |
50 * database instance; | |
51 */ | |
46 protected GraphDatabaseService graphDb; | 52 protected GraphDatabaseService graphDb; |
47 public static final String GRAPHDB_KEY = "annotationmanager.graphdb"; | 53 public static final String GRAPHDB_KEY = "annotationmanager.graphdb"; |
48 public static final String GRAPHDB_PATH_KEY = "annotationmanager.graphdb.path"; | 54 public static final String GRAPHDB_PATH_KEY = "annotationmanager.graphdb.path"; |
49 public String graphdbPath = "WEB-INF/neo4j-annotation-db"; | 55 public String graphdbPath = "WEB-INF/neo4j-annotation-db"; |
50 | 56 |
57 /** | |
58 * database interface server instance. | |
59 */ | |
51 protected WrappingNeoServerBootstrapper srv; | 60 protected WrappingNeoServerBootstrapper srv; |
52 public static final String GRAPHDBSRV_KEY = "annotationmanager.graphdb.srv"; | 61 public static final String GRAPHDBSRV_KEY = "annotationmanager.graphdb.srv"; |
53 | 62 |
63 /** | |
64 * annotation store instance. | |
65 */ | |
54 protected AnnotationStore store; | 66 protected AnnotationStore store; |
55 public static final String ANNSTORE_KEY = "annotationmanager.store"; | 67 public static final String ANNSTORE_KEY = "annotationmanager.store"; |
56 | 68 |
69 /** | |
70 * LDAP server URI (for looking up full user names). | |
71 */ | |
57 protected String ldapServerUrl; | 72 protected String ldapServerUrl; |
58 public static final String LDAP_SERVER_KEY = "annotationmanager.ldapserver.url"; | 73 public static final String LDAP_SERVER_KEY = "annotationmanager.ldapserver.url"; |
59 | 74 |
60 public static final String ADMIN_USER_KEY = "annotationmanager.admin.user"; | 75 public static final String ADMIN_USER_KEY = "annotationmanager.admin.user"; |
61 public static final String ADMIN_PASSWORD_KEY = "annotationmanager.admin.password"; | 76 public static final String ADMIN_PASSWORD_KEY = "annotationmanager.admin.password"; |
62 | 77 |
78 /** | |
79 * run in authorization mode i.e. with tokens. | |
80 */ | |
81 protected boolean authorizationMode = false; | |
82 public static final String AUTHORIZATION_MODE_KEY = "annotationmanager.authorization"; | |
83 | |
63 /** | 84 /** |
64 * constructor | 85 * constructor |
65 * | 86 * |
66 * @param context | 87 * @param context |
67 */ | 88 */ |
169 } | 190 } |
170 | 191 |
171 public abstract String getVersion(); | 192 public abstract String getVersion(); |
172 | 193 |
173 /** | 194 /** |
195 * @return the authorizationMode | |
196 */ | |
197 public boolean isAuthorizationMode() { | |
198 return authorizationMode; | |
199 } | |
200 | |
201 /** | |
174 * @return the store | 202 * @return the store |
175 */ | 203 */ |
176 public AnnotationStore getAnnotationStore() { | 204 public AnnotationStore getAnnotationStore() { |
177 return store; | 205 return store; |
178 } | 206 } |