comparison artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CreateResource.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 82f62ef25a8f
comparison
equal deleted inserted replaced
47:4ae4dc99127d 48:41c225c8bd41
75 .getAttributes().get("database"); 75 .getAttributes().get("database");
76 76
77 try { 77 try {
78 return new DomRepresentation( 78 return new DomRepresentation(
79 MediaType.APPLICATION_XML, 79 MediaType.APPLICATION_XML,
80 db.createArtifactWithFactory(factory)); 80 db.createArtifactWithFactory(factory, getCallMeta()));
81 } 81 }
82 catch (ArtifactDatabaseException adbe) { 82 catch (ArtifactDatabaseException adbe) {
83 Response response = getResponse(); 83 Response response = getResponse();
84 response.setStatus( 84 response.setStatus(
85 Status.CLIENT_ERROR_UNPROCESSABLE_ENTITY, adbe.getMessage()); 85 Status.CLIENT_ERROR_UNPROCESSABLE_ENTITY, adbe.getMessage());

http://dive4elements.wald.intevation.org