Changeset 4207 for DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/CachedRepresentationResource.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/CachedRepresentationResource.java
r3949 r4207 37 37 import javax.ws.rs.core.UriInfo; 38 38 import javax.xml.bind.JAXBElement; 39 import javax.xml.parsers.ParserConfigurationException; 39 40 import org.springframework.beans.factory.annotation.Autowired; 40 41 import org.springframework.security.access.annotation.Secured; 41 42 import org.springframework.stereotype.Component; 43 import org.springframework.transaction.annotation.Transactional; 42 44 43 45 /** … … 47 49 @Component 48 50 @Path("/cached") 51 @Transactional(rollbackFor={Exception.class, SQLException.class, IOException.class, ParserConfigurationException.class}) 49 52 public class CachedRepresentationResource { 50 53 … … 65 68 @Produces(MediaType.TEXT_XML) 66 69 @Path("{cachedid: " + BackendConstants.regExpIdentifier + "}/metadata") 67 @Secured("ROLE_USER") 70 @Secured("ROLE_USER") 71 @Transactional(readOnly=true) 68 72 public JAXBElement<CachedRepresentationInfo> getCachedRepresentationInfo(@PathParam("cachedid") String externalId) throws SQLException { 69 73 dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString()); … … 76 80 @Produces({"image/jpeg", "image/png"}) 77 81 @Path("{cachedid: " + BackendConstants.regExpIdentifier + "}/content") 78 @Secured("ROLE_USER") 82 @Secured("ROLE_USER") 83 @Transactional(readOnly=true) 79 84 public BufferedImage getCachedRepresentationContent(@PathParam("cachedid") String externalId) throws SQLException, IOException { 80 85 dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString());
Note: See TracChangeset
for help on using the changeset viewer.