Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/AddArtifactServiceImpl.java @ 229:924da6695800
Each service is now called with the name of the current locale to set the request object's locale manually in the HttpClient.
flys-client/trunk@1681 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 14 Apr 2011 07:53:01 +0000 |
parents | e02f50a3ad59 |
children | c0105b4dc6d1 |
comparison
equal
deleted
inserted
replaced
228:bbe32496dc84 | 229:924da6695800 |
---|---|
22 extends DescribeCollectionServiceImpl | 22 extends DescribeCollectionServiceImpl |
23 implements AddArtifactService | 23 implements AddArtifactService |
24 { | 24 { |
25 public static final String ERROR_ADD_ARTIFACT = "error_add_artifact"; | 25 public static final String ERROR_ADD_ARTIFACT = "error_add_artifact"; |
26 | 26 |
27 public Collection add(Collection collection, Artifact artifact, String url) | 27 public Collection add( |
28 Collection collection, | |
29 Artifact artifact, | |
30 String url, | |
31 String locale) | |
28 throws ServerException | 32 throws ServerException |
29 { | 33 { |
30 System.out.println("AddArtifactServiceImpl.add"); | 34 System.out.println("AddArtifactServiceImpl.add"); |
31 | 35 |
32 Document add = ClientProtocolUtils.newAddArtifactDocument( | 36 Document add = ClientProtocolUtils.newAddArtifactDocument( |
33 artifact.getUuid(), null); | 37 artifact.getUuid(), null); |
34 | 38 |
35 HttpClient client = new HttpClientImpl(url); | 39 HttpClient client = new HttpClientImpl(url, locale); |
36 | 40 |
37 try { | 41 try { |
38 Document response = (Document) client.doCollectionAction( | 42 Document response = (Document) client.doCollectionAction( |
39 add, collection.identifier(), new DocumentResponseHandler()); | 43 add, collection.identifier(), new DocumentResponseHandler()); |
40 | 44 |