Changeset 4245 for DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/AnnotationResource.java
- Timestamp:
- 01/09/14 17:02:09 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/AnnotationResource.java
r4217 r4245 55 55 import javax.xml.bind.JAXBElement; 56 56 import org.springframework.beans.factory.annotation.Autowired; 57 import org.springframework.security.access.annotation.Secured;58 57 import org.springframework.stereotype.Component; 59 58 import org.slf4j.Logger; … … 105 104 @Produces(MediaType.TEXT_XML) 106 105 @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}") 107 @Secured("ROLE_USER")108 106 @Transactional(readOnly = true) 109 107 public JAXBElement<Annotation> getAnnotation(@PathParam("annotationid") String ExternalIdentifier) throws IOException { … … 135 133 @Produces(MediaType.TEXT_XML) 136 134 @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}/targets") 137 @Secured("ROLE_USER")138 135 @Transactional(readOnly = true) 139 136 public JAXBElement<ReferenceList> getAnnotationTargets(@PathParam("annotationid") String ExternalIdentifier) throws IOException { … … 160 157 @Produces(MediaType.TEXT_XML) 161 158 @Path("") 162 @Secured("ROLE_USER")163 159 @Transactional(readOnly = true) 164 160 public JAXBElement<AnnotationInfoList> getFilteredAnnotations(@QueryParam("link") String link, … … 183 179 @Produces(MediaType.TEXT_XML) 184 180 @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}/permissions") 185 @Secured("ROLE_USER")186 181 @Transactional(readOnly = true) 187 182 public JAXBElement<UserWithPermissionList> getAnnotationPermissions(@PathParam("annotationid") String ExternalIdentifier) throws IOException { … … 208 203 @DELETE 209 204 @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}") 210 @Secured("ROLE_USER")211 205 public String deleteAnnotation(@PathParam("annotationid") String externalIdentifier) throws IOException { 212 206 dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString()); … … 234 228 @Produces(MediaType.APPLICATION_XML) 235 229 @Path("") 236 @Secured("ROLE_USER")237 230 public JAXBElement<ResponseBody> createAnnotation(Annotation annotation) throws IOException { 238 231 dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString()); … … 249 242 @Produces(MediaType.APPLICATION_XML) 250 243 @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}") 251 @Secured("ROLE_USER")252 244 public JAXBElement<ResponseBody> updateAnnotation(@PathParam("annotationid") String externalIdentifier, Annotation annotation) throws IOException { 253 245 String path = uriInfo.getBaseUri().toString(); … … 281 273 @Produces(MediaType.APPLICATION_XML) 282 274 @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}/body") 283 @Secured("ROLE_USER")284 275 public JAXBElement<ResponseBody> updateAnnotationBody(@PathParam("annotationid") String externalIdentifier, AnnotationBody annotationBody) throws IOException { 285 276 String path = uriInfo.getBaseUri().toString(); … … 307 298 @Produces(MediaType.APPLICATION_XML) 308 299 @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}/permissions/{userid: " + BackendConstants.regExpIdentifier + "}") 309 @Secured("ROLE_USER")310 300 public String updatePermission(@PathParam("annotationid") String annotationExternalId, @PathParam("userid") String userExternalId, Permission permission) throws IOException { 311 301 dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString()); … … 335 325 @Produces(MediaType.APPLICATION_XML) 336 326 @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}/permissions/") 337 @Secured("ROLE_USER")338 327 public JAXBElement<ResponseBody> updatePermissions(@PathParam("annotationid") String annotationExternalId, UserWithPermissionList permissions) throws IOException { 339 328 dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString());
Note: See TracChangeset
for help on using the changeset viewer.