annotate artifacts/src/main/java/org/dive4elements/artifacts/ArtifactDatabase.java @ 471:1a87cb24a446

Moved directories to org.dive4elements
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 10:50:31 +0200
parents artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java@d4a846ee35b8
children 415df0fc4fa1
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
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;
b46c5b13ac94 Extract the collection and artifact creation times when doing the initial, too.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 317
diff changeset
17
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
18 /**
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
19 * 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
20 *
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
21 * @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
22 */
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
23 public interface ArtifactDatabase
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
24 {
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
25 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
26 * 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
27 */
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
28 public interface DeferredOutput {
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
29
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
30 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
31 * 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
32 * with the given Outputstream.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
33 * @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
34 * @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
35 * the output stream.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
36 */
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
37 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
38
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
39 } // interface DeferredOut
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
40
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
41 /**
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
42 * 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
43 * @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
44 */
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
45 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
46
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
47 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
48 * 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
49 * 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
50 * 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
51 * artifact database.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
52 * @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
53 * @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
54 * factory is found.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
55 */
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
56 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
57
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
58 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
59 * 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
60 * 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
61 * 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
62 * document of the artifact is returned.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
63 * @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
64 * @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
65 * creation.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
66 * @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
67 * @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
68 * @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
69 * during artifact creation.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
70 */
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
71 Document createArtifactWithFactory(
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
72 String factory,
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
73 CallMeta callMeta,
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
74 Document data
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
75 ) 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
76
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
77 /**
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
78 * 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
79 * 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
80 */
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 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
82 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
83
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 /**
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
85 * 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
86 * with the string 'artifact'.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
87 * @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
88 * @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
89 * @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
90 * the description.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
91 * @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
92 * @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
93 * 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
94 */
55
9a29899b31e5 describe() in REST interface is also handled as POST to pass
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 48
diff changeset
95 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
96 throws ArtifactDatabaseException;
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
97
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
98 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
99 * 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
100 * '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
101 * @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
102 * @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
103 * @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
104 * advance attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
105 * @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
106 * @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
107 * during the advance attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
108 */
48
41c225c8bd41 Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 32
diff changeset
109 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
110 throws ArtifactDatabaseException;
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
111
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
112 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
113 * 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
114 * @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
115 * @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
116 * @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
117 * attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
118 * @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
119 * @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
120 * the feed attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
121 */
48
41c225c8bd41 Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 32
diff changeset
122 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
123 throws ArtifactDatabaseException;
41c225c8bd41 Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 32
diff changeset
124
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
125 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
126 * 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
127 * 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
128 * 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
129 * 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
130 * deferred into to the calling context.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
131 * @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
132 * @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
133 * @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
134 * @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
135 * @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
136 * producing the output.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
137 */
48
41c225c8bd41 Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 32
diff changeset
138 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
139 throws ArtifactDatabaseException;
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 4
diff changeset
140
269
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
141
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 * 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
144 * 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
145 * 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
146 * 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
147 * 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
148 * @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
149 * @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
150 * @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
151 * @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
152 * @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
153 * 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
154 */
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
155 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
156 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
157 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
158 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
159 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
160 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
161
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
162 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
163 * 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
164 * '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
165 * later.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
166 * @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
167 * @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
168 * @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
169 * @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
170 * during export.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
171 */
79
f69e5b87f05f Implementation to export artifacts as xml (applied patch from issue208 by SLT).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 77
diff changeset
172 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
173 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
174
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
175 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
176 * 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
177 * 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
178 * 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
179 * 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
180 * returned.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
181 * @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
182 * #exportArtifact(String, CallMeta).
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
183 * @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
184 * import.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
185 * @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
186 * @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
187 * the import attempt.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
188 */
79
f69e5b87f05f Implementation to export artifacts as xml (applied patch from issue208 by SLT).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 77
diff changeset
189 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
190 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
191
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
192 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
193 * 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
194 * @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
195 * strings.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
196 */
68
541814404822 Added interfaces for XML processing services. TODO: Implement them!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 66
diff changeset
197 String [][] serviceNamesAndDescriptions();
541814404822 Added interfaces for XML processing services. TODO: Implement them!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 66
diff changeset
198
85
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
199 /**
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
200 * 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
201 * to produce some output document.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
202 * @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
203 * @param input The input document.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
204 * @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
205 * service call.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
206 * @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
207 * @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
208 * the service processing.
78263e910675 Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 79
diff changeset
209 */
380
9798e4d83681 Services are now able to return more than just XML documents.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 343
diff changeset
210 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
211 throws ArtifactDatabaseException;
117
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 // User API
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
214
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
215 Document listUsers(CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
216 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
217
415
d4a846ee35b8 Implement ArtifactDatabase findUser method
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 380
diff changeset
218 Document findUser(Document data, CallMeta callMeta)
d4a846ee35b8 Implement ArtifactDatabase findUser method
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 380
diff changeset
219 throws ArtifactDatabaseException;
d4a846ee35b8 Implement ArtifactDatabase findUser method
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 380
diff changeset
220
117
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
221 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
222 throws ArtifactDatabaseException;
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 deleteUser(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 // Collection API
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
228
343
542caebea773 Add functionality to get 'oldest' artifact of a collection.'
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 320
diff changeset
229 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
230 throws ArtifactDatabaseException;
542caebea773 Add functionality to get 'oldest' artifact of a collection.'
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 320
diff changeset
231
117
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
232 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
233 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
234
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
235 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
236 CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
237 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
238
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
239 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
240 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
241
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
242 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
243 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
244
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
245 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
246 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
247
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 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
249 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
250 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
251 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
252 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
253
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
254 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
255 CallMeta callMeta) throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
256
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
257 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
258 Document attribute, CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
259 throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
260
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
261 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
262 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
263
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
264 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
265 CallMeta callMeta) throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
266
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
267 Document listCollectionArtifacts(String collectionId,
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
268 CallMeta callMeta) throws ArtifactDatabaseException;
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
269
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
270 DeferredOutput outCollection(String collectionId,
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
271 Document format, CallMeta callMeta)
4d725248f8d1 Added external API for users and collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
272 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
273
d9a99b28a847 Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 253
diff changeset
274 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
275 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
276 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
277
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 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
279 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
280
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 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
282 throws ArtifactDatabaseException;
303
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 interface ArtifactLoadedCallback {
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
285 void artifactLoaded(
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
286 String userId,
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
287 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
288 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
289 Date collectionCreated,
303
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
290 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
291 Date artifactCreated,
303
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
292 Artifact artifact);
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
293 };
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
294
190aa68ae7a8 Added method to artifact database to load all artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 293
diff changeset
295 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
296 throws ArtifactDatabaseException;
1
11c82d3f125e Checked in the central interfaces of the artifact system.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
297 }
79
f69e5b87f05f Implementation to export artifacts as xml (applied patch from issue208 by SLT).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 77
diff changeset
298 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org