Mercurial > hg > AnnotationManagerN4J
diff src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsUiRestlet.java @ 50:64aa756c60cc
annotations ui can show and delete annotations now.
author | casties |
---|---|
date | Thu, 27 Sep 2012 17:12:08 +0200 |
parents | f30f42080711 |
children | fc4c23247bb5 |
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsUiRestlet.java Thu Sep 27 12:39:15 2012 +0200 +++ b/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsUiRestlet.java Thu Sep 27 17:12:08 2012 +0200 @@ -19,13 +19,13 @@ */ public class AnnotationsUiRestlet extends BaseRestlet { - public final String version = "AnnotationManagerN4J/AnnotationsUI 0.2"; + public final String version = "AnnotationManagerN4J/AnnotationsUI 0.3"; public static Logger logger = Logger.getLogger(AnnotationsUiRestlet.class); public AnnotationsUiRestlet(Context context) { super(context); - logger.debug("StoreRestlet!"); + logger.info(version); } /* @@ -48,12 +48,19 @@ router.attach("/persons/", PersonsResource.class); router.attach("/persons/{id}", PersonResource.class); router.attach("/persons/{id}/", PersonResource.class); + router.attach("/annotations", AnnotationsResource.class); + router.attach("/annotations/", AnnotationsResource.class); + router.attach("/annotations/{id}", AnnotationResource.class); + router.attach("/annotations/{id}/", AnnotationResource.class); router.attach("/", InfoResource.class); - // Create a simple password verifier + // use simple password verifier MapVerifier verifier = new MapVerifier(); - verifier.getLocalSecrets().put("scott", "tiger".toCharArray()); + // get user name and password + String user = serverConfig.getProperty(BaseRestlet.ADMIN_USER_KEY); + String pw = serverConfig.getProperty(BaseRestlet.ADMIN_PASSWORD_KEY); + verifier.getLocalSecrets().put(user, pw.toCharArray()); // Create a Guard ChallengeAuthenticator guard = new ChallengeAuthenticator(getContext(), ChallengeScheme.HTTP_BASIC, "Tutorial"); guard.setVerifier(verifier);