Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactOutResource.java @ 88:69c84cf7c5d7
Added javadoc to the REST package of the artifact database (complete).
artifacts/trunk@840 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 26 Mar 2010 15:05:11 +0000 |
parents | 48d1a9a082c2 |
children | e27cf9c84eb8 |
comparison
equal
deleted
inserted
replaced
87:0f48188a6e02 | 88:69c84cf7c5d7 |
---|---|
23 import org.w3c.dom.Document; | 23 import org.w3c.dom.Document; |
24 | 24 |
25 import java.io.IOException; | 25 import java.io.IOException; |
26 | 26 |
27 /** | 27 /** |
28 * Resource to serve the out()-outputs of artifacts. | |
28 * @author <a href="mailto:sascha.teichmann@intevation">Sascha L. Teichmann</a> | 29 * @author <a href="mailto:sascha.teichmann@intevation">Sascha L. Teichmann</a> |
29 */ | 30 */ |
30 public class ArtifactOutResource | 31 public class ArtifactOutResource |
31 extends BaseResource | 32 extends BaseResource |
32 { | 33 { |
34 /** | |
35 * server URL where to find the resource. | |
36 */ | |
33 public static final String PATH = "/artifact/{uuid}/{type}"; | 37 public static final String PATH = "/artifact/{uuid}/{type}"; |
34 | 38 |
39 /** | |
40 * XPath to figure out the MIME type of the requested result. | |
41 */ | |
35 public static final String XPATH_MIME_TYPE = "/art:action/art:out/art:mime-type/@value"; | 42 public static final String XPATH_MIME_TYPE = "/art:action/art:out/art:mime-type/@value"; |
36 | 43 |
44 /** | |
45 * Default result MIME type: octet stream | |
46 */ | |
37 public static final MediaType DEFAULT_MIME_TYPE = | 47 public static final MediaType DEFAULT_MIME_TYPE = |
38 MediaType.APPLICATION_OCTET_STREAM; | 48 MediaType.APPLICATION_OCTET_STREAM; |
39 | 49 |
40 private static Logger logger = Logger.getLogger(ArtifactOutResource.class); | 50 private static Logger logger = Logger.getLogger(ArtifactOutResource.class); |
41 | 51 |
52 @Override | |
42 protected Representation innerPost(Representation requestRepr) | 53 protected Representation innerPost(Representation requestRepr) |
43 throws ResourceException | 54 throws ResourceException |
44 { | 55 { |
45 Document inputDocument = null; | 56 Document inputDocument = null; |
46 try { | 57 try { |
93 Status.CLIENT_ERROR_NOT_FOUND, adbe.getMessage()); | 104 Status.CLIENT_ERROR_NOT_FOUND, adbe.getMessage()); |
94 return new EmptyRepresentation(); | 105 return new EmptyRepresentation(); |
95 } | 106 } |
96 } | 107 } |
97 } | 108 } |
98 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: | 109 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |