Changeset 4207 for DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/TargetResource.java
- Timestamp:
- 12/19/13 14:36:04 (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/TargetResource.java
r4028 r4207 26 26 import eu.dasish.annotation.schema.ReferenceList; 27 27 import eu.dasish.annotation.schema.Target; 28 import java.io.IOException; 28 29 import java.io.InputStream; 29 30 import java.sql.SQLException; … … 41 42 import javax.ws.rs.core.UriInfo; 42 43 import javax.xml.bind.JAXBElement; 44 import javax.xml.parsers.ParserConfigurationException; 43 45 import org.springframework.beans.factory.annotation.Autowired; 44 46 import org.springframework.security.access.annotation.Secured; 45 47 import org.springframework.stereotype.Component; 48 import org.springframework.transaction.annotation.Transactional; 46 49 47 50 /** … … 55 58 @Component 56 59 @Path("/targets") 60 @Transactional(rollbackFor={Exception.class, SQLException.class, IOException.class, ParserConfigurationException.class}) 57 61 public class TargetResource { 58 62 … … 75 79 @Produces(MediaType.TEXT_XML) 76 80 @Path("{targetid: " + BackendConstants.regExpIdentifier + "}") 77 @Secured("ROLE_USER") 81 @Secured("ROLE_USER") 82 @Transactional(readOnly=true) 78 83 public JAXBElement<Target> getTarget(@PathParam("targetid") String ExternalIdentifier) throws SQLException { 79 84 dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString()); … … 87 92 @Produces(MediaType.TEXT_XML) 88 93 @Path("{targetid: " + BackendConstants.regExpIdentifier + "}/versions") 89 @Secured("ROLE_USER") 94 @Secured("ROLE_USER") 95 @Transactional(readOnly=true) 90 96 public JAXBElement<ReferenceList> getSiblingTargets(@PathParam("targetid") String ExternalIdentifier) throws SQLException { 91 97 dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString());
Note: See TracChangeset
for help on using the changeset viewer.