Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java @ 48:41c225c8bd41
Add i18n support via "Accept-Language" HTTP headers.
artifacts/trunk@168 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 01 Oct 2009 16:03:12 +0000 |
parents | af22d4de275c |
children | 9a29899b31e5 |
comparison
equal
deleted
inserted
replaced
47:4ae4dc99127d | 48:41c225c8bd41 |
---|---|
60 .getAttributes().get("database"); | 60 .getAttributes().get("database"); |
61 | 61 |
62 try { | 62 try { |
63 return new DomRepresentation( | 63 return new DomRepresentation( |
64 MediaType.APPLICATION_XML, | 64 MediaType.APPLICATION_XML, |
65 db.describe(identifier)); | 65 db.describe(identifier, getCallMeta())); |
66 } | 66 } |
67 catch (ArtifactDatabaseException adbe) { | 67 catch (ArtifactDatabaseException adbe) { |
68 logger.warn(adbe.getLocalizedMessage(), adbe); | 68 logger.warn(adbe.getLocalizedMessage(), adbe); |
69 Response response = getResponse(); | 69 Response response = getResponse(); |
70 response.setStatus( | 70 response.setStatus( |
81 ) { | 81 ) { |
82 Document out = null; | 82 Document out = null; |
83 | 83 |
84 try { | 84 try { |
85 if (action.equals(FEED)) { | 85 if (action.equals(FEED)) { |
86 out = db.feed(identifier, source); | 86 out = db.feed(identifier, source, getCallMeta()); |
87 } | 87 } |
88 else if (action.equals(ADVANCE)) { | 88 else if (action.equals(ADVANCE)) { |
89 out = db.advance(identifier, source); | 89 out = db.advance(identifier, source, getCallMeta()); |
90 } | 90 } |
91 else { | 91 else { |
92 throw new ArtifactDatabaseException(NO_SUCH_ACTION_MESSAGE); | 92 throw new ArtifactDatabaseException(NO_SUCH_ACTION_MESSAGE); |
93 } | 93 } |
94 } | 94 } |