Mercurial > hg > AnnotationManagerN4J
view src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotationStoreRestlet.java @ 22:b1fb0d117877
adding and listing groups via html works now.
no editing of group membership yet.
no authentication yet.
author | casties |
---|---|
date | Thu, 20 Sep 2012 17:42:26 +0200 |
parents | aafa3884b2c4 |
children |
line wrap: on
line source
/** * */ package de.mpiwg.itgroup.annotations.restlet; import org.apache.log4j.Logger; import org.restlet.Context; import org.restlet.Restlet; import org.restlet.routing.Router; /** * @author casties * */ public class AnnotationStoreRestlet extends BaseRestlet { public final String version = "AnnotationManagerN4J/AnnotationStore 0.1"; public static Logger logger = Logger.getLogger(AnnotationStoreRestlet.class); public AnnotationStoreRestlet(Context context) { super(context); logger.debug("StoreRestlet!"); } /* * (non-Javadoc) * * @see org.restlet.Application#createInboundRoot() */ @Override public Restlet createInboundRoot() { // this.authenticator = createAuthenticator(); Router router = new Router(getContext()); router.attach("/groups", AnnotationStoreGroups.class); router.attach("/groups/", AnnotationStoreGroups.class); router.attach("/groups/{id}", AnnotationStoreGroups.class); router.attach("/", AnnotationStoreInfo.class); // authenticator.setNext(router); // return authenticator; return router; } @Override public String getVersion() { return version; } }