Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/server/ArtifactServiceImpl.java @ 82:4c5fa2b0086a
The project list button toggles the project list now.
flys-client/trunk@1592 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 28 Mar 2011 15:23:51 +0000 |
parents | fe2f4d1dd784 |
children | e02f50a3ad59 |
rev | line source |
---|---|
11
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.server; |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import org.w3c.dom.Document; |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import com.google.gwt.user.server.rpc.RemoteServiceServlet; |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 |
14
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
7 import de.intevation.artifacts.common.utils.ClientProtocolUtils; |
11
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 |
14
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
9 import de.intevation.artifacts.httpclient.exceptions.ConnectionException; |
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
10 import de.intevation.artifacts.httpclient.http.HttpClient; |
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
11 import de.intevation.artifacts.httpclient.http.HttpClientImpl; |
11
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 import de.intevation.flys.client.shared.model.Artifact; |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import de.intevation.flys.client.client.services.ArtifactService; |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 /** |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 * This interface provides artifact specific services as CREATE, DESCRIBE, FEED, |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 * ADVANCE and OUT. |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 * |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 */ |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 public class ArtifactServiceImpl |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 extends RemoteServiceServlet |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 implements ArtifactService |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 { |
14
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
27 public Artifact create(String serverUrl, String factory) { |
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
28 Document create = ClientProtocolUtils.newCreateDocument(factory); |
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
29 HttpClient client = new HttpClientImpl(serverUrl); |
11
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 |
14
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
31 try { |
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
32 return (Artifact) client.create(create, new FLYSArtifactCreator()); |
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
33 } |
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
34 catch (ConnectionException ce) { |
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
35 System.err.println(ce.getLocalizedMessage()); |
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
36 } |
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
11
diff
changeset
|
37 |
11
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 return null; |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 } |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 } |
6aeb4072eeb4
Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |