Changeset 6044 for DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/CachedRepresentationResource.java
- Timestamp:
- 02/24/15 18:53:22 (9 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
r6038 r6044 52 52 53 53 /** 54 * REST class for GETting, POSTing and PUTting cached representations;55 * DELETing cached representation is provided by TargetRsource class;56 * Every REST method in the case of successful completion of its action outputsthe declared output type54 * A REST class for GETting, POSTing and PUTting cached representations. 55 * DELETing cached representation is provided by {@link TargetRsource} class. 56 * Every REST method in the case of successful completion produces an object of the declared output type 57 57 * (a JAXB-element or a message string) or sends a HTTP-error with the corresponding diagnostics otherwise. 58 58 * @author olhsha … … 63 63 public class CachedRepresentationResource extends ResourceResource { 64 64 65 /** 66 * 67 * @param request a {@link HttpServletRequest} object representing request; the set parameter is used in unit tests. 68 */ 69 public void setHttpRequest(HttpServletRequest request) { 70 this.httpServletRequest = request; 71 } 72 73 /** 74 * 75 * @param externalId the external UUID of a cached representations. 76 * @return a {@link CachedRepresentationInfo} representing the metadata for the cached representation with the "externalId". 77 * @throws IOException if sending the error fails. 65 66 /** 67 * 68 * @param externalId the external UUID of a cached representation. 69 * @return a {@link CachedRepresentationInfo} object representing the metadata for the cached representation with the "externalId". 70 * @throws IOException if sending an error fails. 78 71 */ 79 72 @GET … … 112 105 * @param externalId the external UUID of a cached representation. 113 106 * @return the image-blob if the cached-representation's blob is an image file. 114 * @throws IOException if logging theerror fails (should be changed to sending httpResponse error message).107 * @throws IOException if logging an error fails (should be changed to sending httpResponse error message). 115 108 */ 116 109 @GET … … 150 143 * @param externalId the external UUID of a cached representation. 151 144 * @return the cached-representation's blob. 152 * @throws IOException is sending theerror fails.145 * @throws IOException is sending an error fails. 153 146 */ 154 147 @GET … … 180 173 /** 181 174 * 182 * @param cachedIdentifier the external uuidof a cached representation.183 * @param multiPart a {@link MultiPart} object containing two parts: a {@link CachedRepresentationInfo} object for the cached-representation's metadata, and its blob.184 * @return a message about how many rows in "cached_representation" table have been update ; "1" if updated, and "0" otherwisee.185 * @throws IOException if sending theerror fails.175 * @param cachedIdentifier the external UUID of a cached representation. 176 * @param multiPart a {@link MultiPart} object containing two parts: a {@link CachedRepresentationInfo} object for the cached-representation's metadata, and its blob. 177 * @return a message about how many rows in "cached_representation" table have been updated; "1" if updated, and "0" otherwisee. 178 * @throws IOException if sending an error fails. 186 179 */ 187 180 @PUT … … 263 256 /** 264 257 * 265 * @param cachedInfo a {@link CachedRepresentationInfo} representing the new metadata.266 * @return a message about how many rows in "cached_representation" table ,"1" if updated, "0" otherwise.267 * @throws IOException if sending theerror fails.258 * @param cachedInfo a {@link CachedRepresentationInfo} object representing the new metadata. 259 * @return a message about how many rows in "cached_representation" table have been updated: "1" if updated, "0" otherwise. 260 * @throws IOException if sending an error fails. 268 261 */ 269 262 @PUT
Note: See TracChangeset
for help on using the changeset viewer.