Last change
on this file since 22:b1fb0d117877 was
22:b1fb0d117877,
checked in by casties, 12 years ago
|
adding and listing groups via html works now.
no editing of group membership yet.
no authentication yet.
|
File size:
1.2 KB
|
Line | |
---|
1 | /** |
---|
2 | * |
---|
3 | */ |
---|
4 | package de.mpiwg.itgroup.annotations.restlet; |
---|
5 | |
---|
6 | import org.apache.log4j.Logger; |
---|
7 | import org.restlet.Context; |
---|
8 | import org.restlet.Restlet; |
---|
9 | import org.restlet.routing.Router; |
---|
10 | |
---|
11 | /** |
---|
12 | * @author casties |
---|
13 | * |
---|
14 | */ |
---|
15 | public class AnnotationStoreRestlet extends BaseRestlet { |
---|
16 | |
---|
17 | public final String version = "AnnotationManagerN4J/AnnotationStore 0.1"; |
---|
18 | |
---|
19 | public static Logger logger = Logger.getLogger(AnnotationStoreRestlet.class); |
---|
20 | |
---|
21 | public AnnotationStoreRestlet(Context context) { |
---|
22 | super(context); |
---|
23 | logger.debug("StoreRestlet!"); |
---|
24 | } |
---|
25 | |
---|
26 | /* |
---|
27 | * (non-Javadoc) |
---|
28 | * |
---|
29 | * @see org.restlet.Application#createInboundRoot() |
---|
30 | */ |
---|
31 | @Override |
---|
32 | public Restlet createInboundRoot() { |
---|
33 | // this.authenticator = createAuthenticator(); |
---|
34 | |
---|
35 | Router router = new Router(getContext()); |
---|
36 | |
---|
37 | router.attach("/groups", AnnotationStoreGroups.class); |
---|
38 | router.attach("/groups/", AnnotationStoreGroups.class); |
---|
39 | router.attach("/groups/{id}", AnnotationStoreGroups.class); |
---|
40 | |
---|
41 | router.attach("/", AnnotationStoreInfo.class); |
---|
42 | // authenticator.setNext(router); |
---|
43 | // return authenticator; |
---|
44 | |
---|
45 | return router; |
---|
46 | } |
---|
47 | |
---|
48 | |
---|
49 | @Override |
---|
50 | public String getVersion() { |
---|
51 | return version; |
---|
52 | } |
---|
53 | |
---|
54 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.