annotate src/main/java/de/intevation/artifacts/httpclient/http/HttpClient.java @ 7:06e9e25632cd 0.1

Added a method to the HttpClient to list the collection of a user. http-client/trunk@1615 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 30 Mar 2011 07:48:39 +0000
parents 09a84c6e263a
children 072e8d488f83
rev   line source
1
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 /*
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2 * Copyright (c) 2010 by Intevation GmbH
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 *
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 * This program is free software under the LGPL (>=v2.1)
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5 * Read the file LGPL.txt coming with the software for details
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 */
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 package de.intevation.artifacts.httpclient.http;
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 import java.io.OutputStream;
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 import org.w3c.dom.Document;
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 import de.intevation.artifacts.httpclient.exceptions.ConnectionException;
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 import de.intevation.artifacts.httpclient.http.response.ResponseHandler;
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 import de.intevation.artifacts.httpclient.objects.Artifact;
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 import de.intevation.artifacts.httpclient.objects.ArtifactFactory;
2
2fdfa20cfa63 Added an interface that is used to create instances of artifacts depending on the framework that includes this lib. The create() method of the HttpClient makes use of this interface.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1
diff changeset
18 import de.intevation.artifacts.httpclient.utils.ArtifactCreator;
1
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20 /**
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 */
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 public interface HttpClient {
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 ArtifactFactory[] getArtifactFactories()
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 throws ConnectionException;
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27
2
2fdfa20cfa63 Added an interface that is used to create instances of artifacts depending on the framework that includes this lib. The create() method of the HttpClient makes use of this interface.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1
diff changeset
28 Object create(Document createDocument, ArtifactCreator creator)
1
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 throws ConnectionException;
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 Object describe(
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 Artifact artifact,
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 Document describeDocument,
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 ResponseHandler handler)
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 throws ConnectionException;
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 Object feed(Artifact artifact, Document feedDocument, ResponseHandler handler)
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 throws ConnectionException;
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 Object advance(
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 Artifact artifact,
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42 Document advanceDocument,
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 ResponseHandler handler)
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44 throws ConnectionException;
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46 void out(
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 Artifact artifact,
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48 Document outDocument,
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 String target,
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 OutputStream out)
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51 throws ConnectionException;
4
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
52
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
53
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
54 /*******************************
5
7917c21fad01 Enabled the HttpClient to call services that are registered at the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4
diff changeset
55 * Service API
7917c21fad01 Enabled the HttpClient to call services that are registered at the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4
diff changeset
56 *******************************/
7917c21fad01 Enabled the HttpClient to call services that are registered at the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4
diff changeset
57
7917c21fad01 Enabled the HttpClient to call services that are registered at the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4
diff changeset
58 Document callService(String url, String service, Document input)
7917c21fad01 Enabled the HttpClient to call services that are registered at the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4
diff changeset
59 throws ConnectionException;
7917c21fad01 Enabled the HttpClient to call services that are registered at the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4
diff changeset
60
7917c21fad01 Enabled the HttpClient to call services that are registered at the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4
diff changeset
61
7917c21fad01 Enabled the HttpClient to call services that are registered at the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4
diff changeset
62 /*******************************
4
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
63 * Collections API
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
64 *******************************/
5
7917c21fad01 Enabled the HttpClient to call services that are registered at the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4
diff changeset
65
4
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
66 Object createCollection(
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
67 Document createDocument,
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
68 String ownerId,
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
69 ResponseHandler handler)
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
70 throws ConnectionException;
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
71
6
09a84c6e263a Enhanced the HttpClient with a method sto trigger a collection specific action.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 5
diff changeset
72 Object doCollectionAction(
09a84c6e263a Enhanced the HttpClient with a method sto trigger a collection specific action.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 5
diff changeset
73 Document actionDocument,
09a84c6e263a Enhanced the HttpClient with a method sto trigger a collection specific action.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 5
diff changeset
74 String uuid,
09a84c6e263a Enhanced the HttpClient with a method sto trigger a collection specific action.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 5
diff changeset
75 ResponseHandler handler)
09a84c6e263a Enhanced the HttpClient with a method sto trigger a collection specific action.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 5
diff changeset
76 throws ConnectionException;
09a84c6e263a Enhanced the HttpClient with a method sto trigger a collection specific action.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 5
diff changeset
77
4
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
78
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
79 /*******************************
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
80 * Users API
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
81 *******************************/
5
7917c21fad01 Enabled the HttpClient to call services that are registered at the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4
diff changeset
82
4
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
83 Document listUsers()
19b3ba7f2568 Added a method to the http client to list the existing users of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3
diff changeset
84 throws ConnectionException;
7
06e9e25632cd Added a method to the HttpClient to list the collection of a user.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 6
diff changeset
85
06e9e25632cd Added a method to the HttpClient to list the collection of a user.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 6
diff changeset
86 Document listUserCollections(String userid)
06e9e25632cd Added a method to the HttpClient to list the collection of a user.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 6
diff changeset
87 throws ConnectionException;
1
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
88 }
c9ac6642973c Renamed GNVClient and GNVClientImpl to HttpClient and HttpClientImpl.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
89 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org