Changeset 91:cf44d9e1a4a7 in AnnotationManagerN4J for src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorAnnotations.java
- Timestamp:
- Feb 8, 2015, 5:09:00 PM (9 years ago)
- Branch:
- default
- Children:
- 92:aadf8760216d, 94:fcb6fe10e08c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorAnnotations.java
r88 r91 55 55 public class AnnotatorAnnotations extends AnnotatorResourceImpl { 56 56 57 protected String getAllowedMethodsForHeader() {58 return "OPTIONS,GET,POST,PUT,DELETE";59 }60 61 57 /** 62 58 * GET with JSON content-type. … … 68 64 public Representation doGetJSON(Representation entity) { 69 65 logger.fine("AnnotatorAnnotations doGetJSON!"); 70 setCorsHeaders();71 66 // id from URI /annotations/{id} 72 67 String id = null; … … 165 160 public Representation doPostJson(Representation entity) { 166 161 logger.fine("AnnotatorAnnotations doPostJSON!"); 167 // set headers168 setCorsHeaders();169 162 170 163 // do authentication TODO: who's allowed to create? … … 220 213 public Representation doPutJSON(Representation entity) { 221 214 logger.fine("AnnotatorAnnotations doPutJSON!"); 222 setCorsHeaders();223 215 // id from URI /annotations/{id} 224 216 String jsonId = (String) getRequest().getAttributes().get("id"); … … 283 275 public Representation doDeleteJSON(Representation entity) { 284 276 logger.fine("AnnotatorAnnotations doDeleteJSON!"); 285 setCorsHeaders();286 277 // id from URI /annotations/{id} 287 278 String jsonId = (String) getRequest().getAttributes().get("id");
Note: See TracChangeset
for help on using the changeset viewer.