annotate artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java @ 303:190aa68ae7a8

Added method to artifact database to load all artifacts. artifacts/trunk@2408 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 27 Jul 2011 09:32:26 +0000
parents a367a0d011af
children 824051dff018
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
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9 package de.intevation.artifacts;
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
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
16 /**
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
17 * 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
18 *
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
19 * @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
20 */
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
21 public interface ArtifactDatabase
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
22 {
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
23 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
24 * 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
25 */
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
26 public interface DeferredOutput {
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
27
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
28 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
29 * 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
30 * with the given Outputstream.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
31 * @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
32 * @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
33 * the output stream.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
34 */
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
35 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
36
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
37 } // interface DeferredOut
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
38
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
39 /**
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
40 * 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
41 * @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
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 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
44
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
45 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
46 * 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
47 * 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
48 * 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
49 * artifact database.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
50 * @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
51 * @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
52 * factory is found.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
53 */
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
54 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
55
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
56 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
57 * 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
58 * 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
59 * 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
60 * document of the artifact is returned.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
61 * @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
62 * @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
63 * creation.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
64 * @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
65 * @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
66 * @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
67 * during artifact creation.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
68 */
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
69 Document createArtifactWithFactory(
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
70 String factory,
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
71 CallMeta callMeta,
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
72 Document data
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
73 ) 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
74
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
75 /**
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
76 * 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
77 * 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
78 */
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 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
80 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
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 /**
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
83 * 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
84 * with the string 'artifact'.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
85 * @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
86 * @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
87 * @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
88 * the description.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
89 * @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
90 * @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
91 * 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
92 */
55
9a29899b31e5 describe() in REST interface is also handled as POST to pass
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 48
diff changeset
93 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
94 throws ArtifactDatabaseException;
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
95
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
96 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
97 * 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
98 * '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
99 * @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
100 * @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
101 * @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
102 * advance attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
103 * @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
104 * @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
105 * during the advance attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
106 */
48
41c225c8bd41 Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 32
diff changeset
107 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
108 throws ArtifactDatabaseException;
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
109
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
110 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
111 * 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
112 * @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
113 * @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
114 * @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
115 * attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
116 * @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
117 * @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
118 * the feed attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
119 */
48
41c225c8bd41 Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 32
diff changeset
120 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
121 throws ArtifactDatabaseException;
41c225c8bd41 Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 32
diff changeset
122
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
123 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
124 * 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
125 * 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
126 * 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
127 * 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
128 * deferred into to the calling context.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
129 * @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
130 * @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
131 * @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
132 * @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
133 * @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
134 * producing the output.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
135 */
48
41c225c8bd41 Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 32
diff changeset
136 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
137 throws ArtifactDatabaseException;
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
138
269
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
139
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
140 /**
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
141 * 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
142 * 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
143 * 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
144 * 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
145 * 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
146 * @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
147 * @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
148 * @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
149 * @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
150 * @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
151 * 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
152 */
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
153 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
154 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
155 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
156 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
157 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
158 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
159
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
160 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
161 * 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
162 * '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
163 * later.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
164 * @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
165 * @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
166 * @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
167 * @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
168 * during export.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
169 */
79
f69e5b87f05f Implementation to export artifacts as xml (applied patch from issue208 by SLT).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 77
diff changeset
170 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
171 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
172
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
173 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
174 * 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
175 * 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
176 * 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
177 * 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
178 * returned.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
179 * @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
180 * #exportArtifact(String, CallMeta).
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
181 * @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
182 * import.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
183 * @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
184 * @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
185 * the import attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
186 */
79
f69e5b87f05f Implementation to export artifacts as xml (applied patch from issue208 by SLT).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 77
diff changeset
187 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
188 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
189
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
190 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
191 * 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
192 * @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
193 * strings.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
194 */
68
541814404822 Added interfaces for XML processing services. TODO: Implement them!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 66
diff changeset
195 String [][] serviceNamesAndDescriptions();
541814404822 Added interfaces for XML processing services. TODO: Implement them!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 66
diff changeset
196
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
197 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
198 * 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
199 * to produce some output document.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
200 * @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
201 * @param input The input document.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
202 * @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
203 * service call.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
204 * @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
205 * @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
206 * the service processing.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
207 */
70
ce488c1d3fc4 Serve services over artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 68
diff changeset
208 Document process(String service, Document input, CallMeta callMeta)
ce488c1d3fc4 Serve services over artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 68
diff changeset
209 throws ArtifactDatabaseException;
117
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
210
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
211 // User API
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
212
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
213 Document listUsers(CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
214 throws ArtifactDatabaseException;
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 createUser(Document data, 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
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
219 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
220 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
221
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
222 // Collection API
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
223
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
224 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
225 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
226
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
227 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
228 CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
229 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
230
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
231 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
232 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
233
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
234 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
235 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
236
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
237 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
238 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
239
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
240 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
241 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
242 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
243 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
244 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
245
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
246 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
247 CallMeta callMeta) throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
248
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
249 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
250 Document attribute, CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
251 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
252
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
253 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
254 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
255
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
256 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
257 CallMeta callMeta) throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
258
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
259 Document listCollectionArtifacts(String collectionId,
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
260 CallMeta callMeta) 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 DeferredOutput outCollection(String collectionId,
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
263 Document format, CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
264 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
265
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
266 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
267 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
268 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
269
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
270 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
271 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
272
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
273 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
274 throws ArtifactDatabaseException;
303
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
275
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
276 public interface ArtifactLoadedCallback {
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
277 void artifactLoaded(
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
278 String userId,
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
279 String collectionId,
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
280 String artifactId,
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
281 Artifact artifact);
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
282 };
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
283
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
284 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
285 throws ArtifactDatabaseException;
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
286 }
79
f69e5b87f05f Implementation to export artifacts as xml (applied patch from issue208 by SLT).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 77
diff changeset
287 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org