Mercurial > hg > AnnotationManager
comparison src/de/mpiwg/itgroup/annotationManager/restlet/RestServer.java @ 3:e5f0906c107c
Neue Startseite
Header bei Post werden jetzt richtig gesetzt.
| author | dwinter |
|---|---|
| date | Fri, 25 Nov 2011 08:43:25 +0100 |
| parents | 6888ae3287b8 |
| children | 0be9d53a6967 |
comparison
equal
deleted
inserted
replaced
| 2:6888ae3287b8 | 3:e5f0906c107c |
|---|---|
| 32 | 32 |
| 33 import org.restlet.data.ChallengeScheme; | 33 import org.restlet.data.ChallengeScheme; |
| 34 import org.restlet.data.ClientInfo; | 34 import org.restlet.data.ClientInfo; |
| 35 import org.restlet.engine.component.ChildContext; | 35 import org.restlet.engine.component.ChildContext; |
| 36 import org.restlet.ext.jaas.JaasVerifier; | 36 import org.restlet.ext.jaas.JaasVerifier; |
| 37 import org.restlet.routing.Redirector; | |
| 37 import org.restlet.routing.Router; | 38 import org.restlet.routing.Router; |
| 38 import org.restlet.routing.Template; | 39 import org.restlet.routing.Template; |
| 39 import org.restlet.routing.TemplateRoute; | 40 import org.restlet.routing.TemplateRoute; |
| 40 import org.restlet.security.ChallengeAuthenticator; | 41 import org.restlet.security.ChallengeAuthenticator; |
| 41 import org.restlet.security.MapVerifier; | 42 import org.restlet.security.MapVerifier; |
| 123 | 124 |
| 124 public synchronized Restlet createInboundRoot(){ | 125 public synchronized Restlet createInboundRoot(){ |
| 125 this.authenticator = createAuthenticator(); | 126 this.authenticator = createAuthenticator(); |
| 126 | 127 |
| 127 | 128 |
| 129 //String target = "{rh}/{rf}/XX"; | |
| 130 //Redirector redirector = new Redirector(getContext().createChildContext(), target, | |
| 131 // Redirector.MODE_CLIENT_SEE_OTHER); | |
| 132 | |
| 128 Router router = new Router(getContext()); | 133 Router router = new Router(getContext()); |
| 134 | |
| 129 | 135 |
| 130 router.attach("/annotations",AddAndSearchAnnotations.class); | 136 router.attach("/annotations",AddAndSearchAnnotations.class); |
| 131 router.attach("/search",AddAndSearchAnnotations.class); // annotator api askes for different uris for search and adding | 137 router.attach("/search",AddAndSearchAnnotations.class); // annotator api askes for different uris for search and adding |
| 132 router.attach("/dummy",Dummy.class); | 138 router.attach("/dummy",Dummy.class); |
| 133 | 139 |
| 140 //router.attach("",redirector); | |
| 141 router.attach("/",AnnotatorInfo.class); | |
| 134 authenticator.setNext(router); | 142 authenticator.setNext(router); |
| 135 return authenticator; | 143 return authenticator; |
| 136 | 144 |
| 137 | 145 |
| 138 | 146 |
