annotate artifacts/src/main/java/org/dive4elements/artifacts/ArtifactDatabase.java @ 562:05caf2e731d0

Allow to add additional restful services via configuration.
author gernotbelger
date Wed, 10 Oct 2018 20:07:58 +0200
parents 68f01f10624e
children
rev   line source
100
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 85
diff changeset
1 /*
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 85
diff changeset
2 * Copyright (c) 2010 by Intevation GmbH
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 85
diff changeset
3 *
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 85
diff changeset
4 * This program is free software under the LGPL (>=v2.1)
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 85
diff changeset
5 * Read the file LGPL.txt coming with the software for details
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 85
diff changeset
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 85
diff changeset
7 */
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 85
diff changeset
8
475
415df0fc4fa1 Fixed maven group ids
Sascha L. Teichmann <teichmann@intevation.de>
parents: 471
diff changeset
9 package org.dive4elements.artifacts;
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10
75
d4c4c23847f5 Extended the Artifact-Interface-Method setup to be able to put the XML-Document which can contain further Data
Tim Englich <tim.englich@intevation.de>
parents: 70
diff changeset
11 import java.io.IOException;
d4c4c23847f5 Extended the Artifact-Interface-Method setup to be able to put the XML-Document which can contain further Data
Tim Englich <tim.englich@intevation.de>
parents: 70
diff changeset
12 import java.io.OutputStream;
d4c4c23847f5 Extended the Artifact-Interface-Method setup to be able to put the XML-Document which can contain further Data
Tim Englich <tim.englich@intevation.de>
parents: 70
diff changeset
13
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
14 import org.w3c.dom.Document;
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
15
320
b46c5b13ac94 Extract the collection and artifact creation times when doing the initial, too.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 317
diff changeset
16 import java.util.Date;
562
05caf2e731d0 Allow to add additional restful services via configuration.
gernotbelger
parents: 550
diff changeset
17 import java.util.Map;
320
b46c5b13ac94 Extract the collection and artifact creation times when doing the initial, too.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 317
diff changeset
18
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
19 /**
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
20 * Interface of an artifact managing database.
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
21 *
77
48d1a9a082c2 Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 75
diff changeset
22 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a>
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
23 */
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
24 public interface ArtifactDatabase
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
25 {
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
26 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
27 * Implementations of this class defer the out call.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
28 */
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
29 public interface DeferredOutput {
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
30
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
31 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
32 * Inside this method the Artifact.out() method is called
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
33 * with the given Outputstream.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
34 * @param output The stream to write the out() output into.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
35 * @throws IOException Thrown if an exception occurs while writing to
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
36 * the output stream.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
37 */
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
38 void write(OutputStream output) throws IOException;
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
39
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
40 } // interface DeferredOut
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
41
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
42 /**
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
43 * List of artifact factories names accessible through the database.
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
44 * @return pairs of names and descriptions of the factories.
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
45 */
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
46 String [][] artifactFactoryNamesAndDescriptions();
4
13a12b607baf Added mechanism to create an share a global context in the artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1
diff changeset
47
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
48 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
49 * The methods returns a 'pure' factory which is not bound to
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
50 * the artifact database. This means when an artifact is created
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
51 * with the factory the created artifact is not stored in the
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
52 * artifact database.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
53 * @param factoryName The name of the queried artifact factory.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
54 * @return The queried artifact factory or null if corresponing
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
55 * factory is found.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
56 */
66
89e3de0ee05f Implemented some methods to get access to ArtifactFactories which are stored in the ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 55
diff changeset
57 ArtifactFactory getInternalArtifactFactory(String factoryName);
89e3de0ee05f Implemented some methods to get access to ArtifactFactories which are stored in the ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 55
diff changeset
58
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
59 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
60 * Used to create an artifact with the factory which given
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
61 * by the name 'factory'. The artifact is stored inside the
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
62 * artifact database. If the creation succeeds the describe
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
63 * document of the artifact is returned.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
64 * @param factory The name of the factory to create the artifact.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
65 * @param callMeta The meta information (languages et. al.) of the
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
66 * creation.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
67 * @param data Optional input data to parameterize the creation.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
68 * @return The describe document of new artifact.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
69 * @throws ArtifactDatabaseException Thrown if something went wrong
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
70 * during artifact creation.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
71 */
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
72 Document createArtifactWithFactory(
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
73 String factory,
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
74 CallMeta callMeta,
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
75 Document data
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
76 ) throws ArtifactDatabaseException;
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
77
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
78 /**
293
a367a0d011af Set an interface for the global context; added a method to the artifact database to return an instance of an Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 275
diff changeset
79 * Used to retrieve an artifact.<b>NOTE: artifact modifications are not
a367a0d011af Set an interface for the global context; added a method to the artifact database to return an instance of an Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 275
diff changeset
80 * persisted to database!</b>
a367a0d011af Set an interface for the global context; added a method to the artifact database to return an instance of an Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 275
diff changeset
81 */
a367a0d011af Set an interface for the global context; added a method to the artifact database to return an instance of an Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 275
diff changeset
82 Artifact getRawArtifact(String identifier)
a367a0d011af Set an interface for the global context; added a method to the artifact database to return an instance of an Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 275
diff changeset
83 throws ArtifactDatabaseException;
a367a0d011af Set an interface for the global context; added a method to the artifact database to return an instance of an Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 275
diff changeset
84
a367a0d011af Set an interface for the global context; added a method to the artifact database to return an instance of an Artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 275
diff changeset
85 /**
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
86 * Returns the describe document of artifact identified
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
87 * with the string 'artifact'.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
88 * @param artifact The identifier of the artifact.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
89 * @param data Optional input data to parameterize the description.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
90 * @param callMeta the meta information (language et. al.) of
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
91 * the description.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
92 * @return The describe document of the artifact.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
93 * @throws ArtifactDatabaseException Thrown id something went wrong
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
94 * during the creation of the describe document.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
95 */
55
9a29899b31e5 describe() in REST interface is also handled as POST to pass
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 48
diff changeset
96 Document describe(String artifact, Document data, CallMeta callMeta)
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
97 throws ArtifactDatabaseException;
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
98
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
99 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
100 * Advances the artifact identified by 'artifact' to the state
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
101 * 'target'. The result of the attempt is returned.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
102 * @param artifact The identifier of the artifact.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
103 * @param target The target state of the advance attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
104 * @param callMeta The meta information (language et. al.) of the
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
105 * advance attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
106 * @return The result document of the advance attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
107 * @throws ArtifactDatabaseException Thrown if something went wrong
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
108 * during the advance attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
109 */
48
41c225c8bd41 Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 32
diff changeset
110 Document advance(String artifact, Document target, CallMeta callMeta)
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
111 throws ArtifactDatabaseException;
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
112
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
113 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
114 * Feeds the artifact identified by 'artifact' with some data 'data'.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
115 * @param artifact The identifier of the artifact.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
116 * @param data The data to be fed into the artifact.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
117 * @param callMeta The meta information (language et. al.) of the feed
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
118 * attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
119 * @return The result of the feed attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
120 * @throws ArtifactDatabaseException Throw if something went wrong during
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
121 * the feed attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
122 */
48
41c225c8bd41 Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 32
diff changeset
123 Document feed(String artifact, Document data, CallMeta callMeta)
41c225c8bd41 Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 32
diff changeset
124 throws ArtifactDatabaseException;
41c225c8bd41 Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 32
diff changeset
125
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
126 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
127 * Produces output for a given artifact identified by 'artifact' in
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
128 * a requested format 'format'. The writing of the data is done when
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
129 * the write() method of the returned DeferredOutput is called. This
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
130 * optimizes the out streaming of the data because the call can be
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
131 * deferred into to the calling context.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
132 * @param artifact The identifier of the artifact.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
133 * @param format The request format of the output.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
134 * @param callMeta The meta information (language et. al.) of the output.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
135 * @return The deferred output to be written later in the calling context.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
136 * @throws ArtifactDatabaseException Thrown if something went wrong during
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
137 * producing the output.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
138 */
48
41c225c8bd41 Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 32
diff changeset
139 DeferredOutput out(String artifact, Document format, CallMeta callMeta)
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
140 throws ArtifactDatabaseException;
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
141
269
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
142
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
143 /**
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
144 * Produces output for a given artifact identified by 'artifact' in
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
145 * a requested format 'format'. The writing of the data is done when
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
146 * the write() method of the returned DeferredOutput is called. This
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
147 * optimizes the out streaming of the data because the call can be
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
148 * deferred into to the calling context.
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
149 * @param artifact The identifier of the artifact.
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
150 * @param format The request format of the output.
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
151 * @param callMeta The meta information (language et. al.) of the output.
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
152 * @return The deferred output to be written later in the calling context.
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
153 * @throws ArtifactDatabaseException Thrown if something went wrong during
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
154 * producing the output.
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
155 */
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
156 DeferredOutput out(
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
157 String artifact,
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
158 String type,
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
159 Document format,
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
160 CallMeta callMeta)
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
161 throws ArtifactDatabaseException;
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
162
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
163 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
164 * Produces an extenal represention of the artifact identified by
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
165 * 'artifact' to be re-imported by #importArtifact(Document, CallMeta)
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
166 * later.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
167 * @param artifact The identifier of the artifact.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
168 * @param callMeta The meta informatio (language et. al.) of the export.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
169 * @return A extenal representation of the artifact.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
170 * @throws ArtifactDatabaseException Thrown if something went wrong
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
171 * during export.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
172 */
79
f69e5b87f05f Implementation to export artifacts as xml (applied patch from issue208 by SLT).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 77
diff changeset
173 Document exportArtifact(String artifact, CallMeta callMeta)
f69e5b87f05f Implementation to export artifacts as xml (applied patch from issue208 by SLT).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 77
diff changeset
174 throws ArtifactDatabaseException;
f69e5b87f05f Implementation to export artifacts as xml (applied patch from issue208 by SLT).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 77
diff changeset
175
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
176 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
177 * The symmetrical counter part of #exportArtifact(String, CallMeta).
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
178 * It attempts to import the artifact which is coded inside the 'data'
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
179 * document. When the import succeeds the new artifact is given a new
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
180 * internal identifier and the describe document of the artifact is
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
181 * returned.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
182 * @param data The encoded artifact. Has to be the output of
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
183 * #exportArtifact(String, CallMeta).
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
184 * @param callMeta The meta information (language et. al.) of the
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
185 * import.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
186 * @return The describe document of the imported artifact.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
187 * @throws ArtifactDatabaseException Thrown if something went wrong during
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
188 * the import attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
189 */
79
f69e5b87f05f Implementation to export artifacts as xml (applied patch from issue208 by SLT).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 77
diff changeset
190 Document importArtifact(Document data, CallMeta callMeta)
f69e5b87f05f Implementation to export artifacts as xml (applied patch from issue208 by SLT).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 77
diff changeset
191 throws ArtifactDatabaseException;
f69e5b87f05f Implementation to export artifacts as xml (applied patch from issue208 by SLT).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 77
diff changeset
192
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
193 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
194 * Returns a list of services offered by this artifact database.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
195 * @return The array returned contains tuples of (name, description)
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
196 * strings.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
197 */
68
541814404822 Added interfaces for XML processing services. TODO: Implement them!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 66
diff changeset
198 String [][] serviceNamesAndDescriptions();
541814404822 Added interfaces for XML processing services. TODO: Implement them!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 66
diff changeset
199
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
200 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
201 * Calls a service identified by 'service' with input document 'input'
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
202 * to produce some output document.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
203 * @param service The name of the service.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
204 * @param input The input document.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
205 * @param callMeta The meta information (language et. al.) of the
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
206 * service call.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
207 * @return The result document produced by the service.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
208 * @throws ArtifactDatabaseException Thrown if someting went wrong during
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
209 * the service processing.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
210 */
380
9798e4d83681 Services are now able to return more than just XML documents.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 343
diff changeset
211 Service.Output process(String service, Document input, CallMeta callMeta)
70
ce488c1d3fc4 Serve services over artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 68
diff changeset
212 throws ArtifactDatabaseException;
117
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
213
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
214 // User API
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
215
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
216 Document listUsers(CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
217 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
218
415
d4a846ee35b8 Implement ArtifactDatabase findUser method
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 380
diff changeset
219 Document findUser(Document data, CallMeta callMeta)
d4a846ee35b8 Implement ArtifactDatabase findUser method
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 380
diff changeset
220 throws ArtifactDatabaseException;
d4a846ee35b8 Implement ArtifactDatabase findUser method
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 380
diff changeset
221
117
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
222 Document createUser(Document data, CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
223 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
224
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
225 Document deleteUser(String userId, CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
226 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
227
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
228 // Collection API
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
229
343
542caebea773 Add functionality to get 'oldest' artifact of a collection.'
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 320
diff changeset
230 Document getCollectionsMasterArtifact(String collectionId, CallMeta meta)
542caebea773 Add functionality to get 'oldest' artifact of a collection.'
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 320
diff changeset
231 throws ArtifactDatabaseException;
542caebea773 Add functionality to get 'oldest' artifact of a collection.'
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 320
diff changeset
232
117
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
233 Document listCollections(String userId, CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
234 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
235
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
236 Document createCollection(String ownerId, Document data,
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
237 CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
238 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
239
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
240 Document deleteCollection(String collectionId, CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
241 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
242
196
171b6200d26d Added a describe() action for collections - the implementation in the artifact server is currently just a stub that throws an not implemented exception.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 189
diff changeset
243 Document describeCollection(String collectionId, CallMeta callMeta)
171b6200d26d Added a describe() action for collections - the implementation in the artifact server is currently just a stub that throws an not implemented exception.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 189
diff changeset
244 throws ArtifactDatabaseException;
171b6200d26d Added a describe() action for collections - the implementation in the artifact server is currently just a stub that throws an not implemented exception.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 189
diff changeset
245
253
a2df2b48d2aa Enabled the artifact database to handle requests specific to collection attributes and collection item attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 252
diff changeset
246 Document getCollectionAttribute(String collectionId, CallMeta callMeta)
a2df2b48d2aa Enabled the artifact database to handle requests specific to collection attributes and collection item attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 252
diff changeset
247 throws ArtifactDatabaseException;
a2df2b48d2aa Enabled the artifact database to handle requests specific to collection attributes and collection item attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 252
diff changeset
248
a2df2b48d2aa Enabled the artifact database to handle requests specific to collection attributes and collection item attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 252
diff changeset
249 Document setCollectionAttribute(
a2df2b48d2aa Enabled the artifact database to handle requests specific to collection attributes and collection item attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 252
diff changeset
250 String collectionId,
a2df2b48d2aa Enabled the artifact database to handle requests specific to collection attributes and collection item attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 252
diff changeset
251 CallMeta callMeta,
a2df2b48d2aa Enabled the artifact database to handle requests specific to collection attributes and collection item attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 252
diff changeset
252 Document attribute)
a2df2b48d2aa Enabled the artifact database to handle requests specific to collection attributes and collection item attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 252
diff changeset
253 throws ArtifactDatabaseException;
a2df2b48d2aa Enabled the artifact database to handle requests specific to collection attributes and collection item attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 252
diff changeset
254
252
6de74b0b878e Changed the method names to get and set the attributes of collection items.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 196
diff changeset
255 Document getCollectionItemAttribute(String collectionId, String artifactId,
117
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
256 CallMeta callMeta) throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
257
252
6de74b0b878e Changed the method names to get and set the attributes of collection items.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 196
diff changeset
258 Document setCollectionItemAttribute(String collectionId, String artifactId,
117
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
259 Document attribute, CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
260 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
261
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
262 Document addCollectionArtifact(String collectionId, String artifactId,
189
fbaeb5931d10 Implemented addCollectionArtifact() and listCollectionArtifacts() of the artifact database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 132
diff changeset
263 Document input, CallMeta callMeta) throws ArtifactDatabaseException;
117
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
264
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
265 Document removeCollectionArtifact(String collectionId, String artifactId,
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
266 CallMeta callMeta) throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
267
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
268 Document listCollectionArtifacts(String collectionId,
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
269 CallMeta callMeta) throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
270
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
271 DeferredOutput outCollection(String collectionId,
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
272 Document format, CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
273 throws ArtifactDatabaseException;
269
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
274
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
275 DeferredOutput outCollection(String collectionId, String type,
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
276 Document format, CallMeta callMeta)
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
277 throws ArtifactDatabaseException;
273
22a90706d32d Enables the artifact server to set the TTL of a specific collection via REST call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 269
diff changeset
278
22a90706d32d Enables the artifact server to set the TTL of a specific collection via REST call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 269
diff changeset
279 Document setCollectionTTL(String collectionId, Document doc, CallMeta meta)
22a90706d32d Enables the artifact server to set the TTL of a specific collection via REST call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 269
diff changeset
280 throws ArtifactDatabaseException;
275
e92d5944fe4b Enabled the artifact database to retrieve requests to change the name of a specific collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 273
diff changeset
281
e92d5944fe4b Enabled the artifact database to retrieve requests to change the name of a specific collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 273
diff changeset
282 Document setCollectionName(String collectionId, Document doc, CallMeta meta)
e92d5944fe4b Enabled the artifact database to retrieve requests to change the name of a specific collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 273
diff changeset
283 throws ArtifactDatabaseException;
303
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
284
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
285 public interface ArtifactLoadedCallback {
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
286 void artifactLoaded(
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
287 String userId,
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
288 String collectionId,
317
824051dff018 When loading all artifacts fetch the name of the collections, too.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 303
diff changeset
289 String collectionName,
320
b46c5b13ac94 Extract the collection and artifact creation times when doing the initial, too.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 317
diff changeset
290 Date collectionCreated,
303
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
291 String artifactId,
320
b46c5b13ac94 Extract the collection and artifact creation times when doing the initial, too.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 317
diff changeset
292 Date artifactCreated,
303
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
293 Artifact artifact);
550
68f01f10624e Introduced helper for finding the user name for a given artifact
gernotbelger
parents: 475
diff changeset
294 }
303
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
295
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
296 public void loadAllArtifacts(ArtifactLoadedCallback callback)
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
297 throws ArtifactDatabaseException;
550
68f01f10624e Introduced helper for finding the user name for a given artifact
gernotbelger
parents: 475
diff changeset
298
68f01f10624e Introduced helper for finding the user name for a given artifact
gernotbelger
parents: 475
diff changeset
299 String findArtifactUser(String artifactIdentifier);
562
05caf2e731d0 Allow to add additional restful services via configuration.
gernotbelger
parents: 550
diff changeset
300
05caf2e731d0 Allow to add additional restful services via configuration.
gernotbelger
parents: 550
diff changeset
301 String getServerAddress();
05caf2e731d0 Allow to add additional restful services via configuration.
gernotbelger
parents: 550
diff changeset
302
05caf2e731d0 Allow to add additional restful services via configuration.
gernotbelger
parents: 550
diff changeset
303 /** an additional list of rest services (path and implementing class) that should be registered */
05caf2e731d0 Allow to add additional restful services via configuration.
gernotbelger
parents: 550
diff changeset
304 Map<String, Class<?>> getRestServices();
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
305 }
79
f69e5b87f05f Implementation to export artifacts as xml (applied patch from issue208 by SLT).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 77
diff changeset
306 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org