annotate gwt-client/src/main/java/org/dive4elements/river/client/server/AddArtifactServiceImpl.java @ 9801:1d7a72a50183 3.2.x tip

Assume Compose V2, consistently
author Tom Gottfried <tom@intevation.de>
date Thu, 23 Nov 2023 10:14:13 +0100
parents 0a5239a1e46e
children
rev   line source
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
6 * documentation coming with Dive4Elements River for details.
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
9 package org.dive4elements.river.client.server;
69
4bdb18e5f484 Added a service to add artifacts to collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
9726
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8203
diff changeset
11 import org.apache.logging.log4j.Logger;
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8203
diff changeset
12 import org.apache.logging.log4j.LogManager;
1367
ab8eb2f544f2 Replaced stdout and stderr logging with log4j loggers in server classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 905
diff changeset
13
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
14 import org.dive4elements.river.client.shared.exceptions.ServerException;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
15 import org.dive4elements.river.client.shared.model.Artifact;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
16 import org.dive4elements.river.client.shared.model.Collection;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
17 import org.dive4elements.river.client.client.services.AddArtifactService;
69
4bdb18e5f484 Added a service to add artifacts to collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18
4bdb18e5f484 Added a service to add artifacts to collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19
4bdb18e5f484 Added a service to add artifacts to collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20 /**
4bdb18e5f484 Added a service to add artifacts to collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
4bdb18e5f484 Added a service to add artifacts to collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 */
4bdb18e5f484 Added a service to add artifacts to collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 public class AddArtifactServiceImpl
99
5c3d685546a6 Added a new service to describe collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 87
diff changeset
24 extends DescribeCollectionServiceImpl
69
4bdb18e5f484 Added a service to add artifacts to collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 implements AddArtifactService
4bdb18e5f484 Added a service to add artifacts to collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 {
8203
238fc722f87a sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
27 private static final Logger log =
9726
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8203
diff changeset
28 LogManager.getLogger(AddArtifactService.class);
1367
ab8eb2f544f2 Replaced stdout and stderr logging with log4j loggers in server classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 905
diff changeset
29
ab8eb2f544f2 Replaced stdout and stderr logging with log4j loggers in server classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 905
diff changeset
30
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
31 public Collection add(
924da6695800 Each service is now called with the name of the current locale to set the request object's locale manually in the HttpClient.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
32 Collection collection,
924da6695800 Each service is now called with the name of the current locale to set the request object's locale manually in the HttpClient.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
33 Artifact artifact,
924da6695800 Each service is now called with the name of the current locale to set the request object's locale manually in the HttpClient.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
34 String locale)
215
e02f50a3ad59 Improved the exception handling of artifact / collection specific operations. Warning dialog are displayed after such an exception.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 101
diff changeset
35 throws ServerException
e02f50a3ad59 Improved the exception handling of artifact / collection specific operations. Warning dialog are displayed after such an exception.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 101
diff changeset
36 {
8203
238fc722f87a sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
37 log.info("AddArtifactServiceImpl.add");
1425
bc06a671ef60 Removed the URL parameter from service calls. The service
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1367
diff changeset
38 String url = getServletContext().getInitParameter("server-url");
69
4bdb18e5f484 Added a service to add artifacts to collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39
905
478a571f1f94 Refactored server code - HTTP related code moved to ArtifactsHelper and CollectionHelper which makes us able to combine Artifact and Collection protocol stuff in a single RPC service.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 852
diff changeset
40 return CollectionHelper.addArtifact(collection, artifact, url, locale);
69
4bdb18e5f484 Added a service to add artifacts to collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 }
4bdb18e5f484 Added a service to add artifacts to collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42 }
4bdb18e5f484 Added a service to add artifacts to collections.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org