Mercurial > dive4elements > framework
annotate artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java @ 460:3c1177c58312 2.9.13
Add tag 2.9.12 for changeset fdb479d4a759
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 11 Mar 2013 17:25:13 +0100 |
parents | 6431b7efe240 |
children |
rev | line source |
---|---|
100
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
91
diff
changeset
|
1 /* |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
91
diff
changeset
|
2 * Copyright (c) 2010 by Intevation GmbH |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
91
diff
changeset
|
3 * |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
91
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:
91
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:
91
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:
91
diff
changeset
|
7 */ |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
91
diff
changeset
|
8 |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 package de.intevation.artifactdatabase; |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 |
207
b2115f484edb
Move Config and XMLUtils totally to commons package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
100
diff
changeset
|
11 import de.intevation.artifacts.common.utils.XMLUtils; |
b2115f484edb
Move Config and XMLUtils totally to commons package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
100
diff
changeset
|
12 |
91
730ff077a58c
More javadoc, some code formatting.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
87
diff
changeset
|
13 import de.intevation.artifacts.Artifact; |
730ff077a58c
More javadoc, some code formatting.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
87
diff
changeset
|
14 import de.intevation.artifacts.ArtifactFactory; |
730ff077a58c
More javadoc, some code formatting.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
87
diff
changeset
|
15 import de.intevation.artifacts.CallContext; |
297
694d818e99b2
Adapted the signature of Artifact.setup() - a parameter of type CallMeta has been added.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
269
diff
changeset
|
16 import de.intevation.artifacts.CallMeta; |
91
730ff077a58c
More javadoc, some code formatting.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
87
diff
changeset
|
17 |
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:
55
diff
changeset
|
18 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:
55
diff
changeset
|
19 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:
55
diff
changeset
|
20 |
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:
55
diff
changeset
|
21 import org.apache.log4j.Logger; |
91
730ff077a58c
More javadoc, some code formatting.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
87
diff
changeset
|
22 |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
23 import org.w3c.dom.Document; |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 /** |
91
730ff077a58c
More javadoc, some code formatting.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
87
diff
changeset
|
26 * Trivial implementation of an artifact. Useful to be subclassed. |
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
|
27 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
28 */ |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 public class DefaultArtifact |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 implements Artifact |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
31 { |
17
5a6b6a3debc7
Integrated logging into artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
10
diff
changeset
|
32 private static Logger logger = Logger.getLogger(DefaultArtifact.class); |
47
4ae4dc99127d
Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
42
diff
changeset
|
33 |
87
0f48188a6e02
Added some javadoc to the artifactdatabase module. Not done yet.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
86
diff
changeset
|
34 /** |
0f48188a6e02
Added some javadoc to the artifactdatabase module. Not done yet.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
86
diff
changeset
|
35 * The identifier of the artifact. |
0f48188a6e02
Added some javadoc to the artifactdatabase module. Not done yet.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
86
diff
changeset
|
36 */ |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
37 protected String identifier; |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
38 |
367
6431b7efe240
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
297
diff
changeset
|
39 |
87
0f48188a6e02
Added some javadoc to the artifactdatabase module. Not done yet.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
86
diff
changeset
|
40 /** |
0f48188a6e02
Added some javadoc to the artifactdatabase module. Not done yet.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
86
diff
changeset
|
41 * Default constructor. |
0f48188a6e02
Added some javadoc to the artifactdatabase module. Not done yet.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
86
diff
changeset
|
42 */ |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
43 public DefaultArtifact() { |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
44 } |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
45 |
81
e9c80fdfee13
Set new identifiers on artifacts after an artifact import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
77
diff
changeset
|
46 |
e9c80fdfee13
Set new identifiers on artifacts after an artifact import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
77
diff
changeset
|
47 public void setIdentifier(String identifier) { |
e9c80fdfee13
Set new identifiers on artifacts after an artifact import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
77
diff
changeset
|
48 if (logger.isDebugEnabled()) { |
e9c80fdfee13
Set new identifiers on artifacts after an artifact import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
77
diff
changeset
|
49 logger.debug("Change identifier: " |
e9c80fdfee13
Set new identifiers on artifacts after an artifact import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
77
diff
changeset
|
50 + this.identifier + " -> " + identifier); |
e9c80fdfee13
Set new identifiers on artifacts after an artifact import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
77
diff
changeset
|
51 } |
e9c80fdfee13
Set new identifiers on artifacts after an artifact import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
77
diff
changeset
|
52 this.identifier = identifier; |
e9c80fdfee13
Set new identifiers on artifacts after an artifact import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
77
diff
changeset
|
53 } |
e9c80fdfee13
Set new identifiers on artifacts after an artifact import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
77
diff
changeset
|
54 |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
55 public String identifier() { |
42
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
56 if (logger.isDebugEnabled()) { |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
57 logger.debug("DefaultArtifact.identifier: " + identifier); |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
58 } |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
59 return this.identifier; |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
60 } |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
61 |
367
6431b7efe240
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
297
diff
changeset
|
62 |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
63 public String hash() { |
42
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
64 String hash = String.valueOf(hashCode()); |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
65 if (logger.isDebugEnabled()) { |
47
4ae4dc99127d
Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
42
diff
changeset
|
66 logger.debug("DefaultArtifact.hashCode: " |
42
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
67 + identifier + " (" + hash + ")"); |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
68 } |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
69 return hash; |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
70 } |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
71 |
55
9a29899b31e5
describe() in REST interface is also handled as POST to pass
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
47
diff
changeset
|
72 public Document describe(Document data, CallContext context) { |
42
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
73 if (logger.isDebugEnabled()) { |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
74 logger.debug("DefaultArtifact.describe: " + identifier); |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
75 } |
26
83a059c204f8
Connected /create with artifact db.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
24
diff
changeset
|
76 return XMLUtils.newDocument(); |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
77 } |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
78 |
32
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
31
diff
changeset
|
79 public Document advance(Document target, CallContext context) { |
42
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
80 if (logger.isDebugEnabled()) { |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
81 logger.debug("DefaultArtifact.advance: " + identifier); |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
82 } |
26
83a059c204f8
Connected /create with artifact db.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
24
diff
changeset
|
83 return XMLUtils.newDocument(); |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
84 } |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
85 |
32
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
31
diff
changeset
|
86 public Document feed(Document target, CallContext context) { |
42
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
87 if (logger.isDebugEnabled()) { |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
88 logger.debug("DefaultArtifact.feed: " + identifier); |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
89 } |
26
83a059c204f8
Connected /create with artifact db.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
24
diff
changeset
|
90 return XMLUtils.newDocument(); |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
91 } |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
92 |
31
c4d85a8532d1
Artifact.out() is now called with an java.io.Outpustream
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
26
diff
changeset
|
93 public void out( |
c4d85a8532d1
Artifact.out() is now called with an java.io.Outpustream
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
26
diff
changeset
|
94 Document format, |
c4d85a8532d1
Artifact.out() is now called with an java.io.Outpustream
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
26
diff
changeset
|
95 OutputStream out, |
32
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
31
diff
changeset
|
96 CallContext context |
31
c4d85a8532d1
Artifact.out() is now called with an java.io.Outpustream
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
26
diff
changeset
|
97 ) |
c4d85a8532d1
Artifact.out() is now called with an java.io.Outpustream
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
26
diff
changeset
|
98 throws IOException |
c4d85a8532d1
Artifact.out() is now called with an java.io.Outpustream
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
26
diff
changeset
|
99 { |
42
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
100 if (logger.isDebugEnabled()) { |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
101 logger.debug("DefaultArtifact.out: " + identifier); |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
102 } |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
103 } |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
104 |
269
d9a99b28a847
Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
207
diff
changeset
|
105 public void out( |
d9a99b28a847
Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
207
diff
changeset
|
106 String type, |
d9a99b28a847
Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
207
diff
changeset
|
107 Document format, |
d9a99b28a847
Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
207
diff
changeset
|
108 OutputStream out, |
d9a99b28a847
Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
207
diff
changeset
|
109 CallContext context |
d9a99b28a847
Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
207
diff
changeset
|
110 ) |
d9a99b28a847
Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
207
diff
changeset
|
111 throws IOException |
d9a99b28a847
Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
207
diff
changeset
|
112 { |
d9a99b28a847
Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
207
diff
changeset
|
113 if (logger.isDebugEnabled()) { |
d9a99b28a847
Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
207
diff
changeset
|
114 logger.debug("DefaultArtifact.out: " + identifier); |
d9a99b28a847
Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
207
diff
changeset
|
115 } |
d9a99b28a847
Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
207
diff
changeset
|
116 } |
d9a99b28a847
Added support for the 'type' parameter of artifacts and collections out() call.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
207
diff
changeset
|
117 |
367
6431b7efe240
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
297
diff
changeset
|
118 public void setup(String identifier, |
6431b7efe240
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
297
diff
changeset
|
119 ArtifactFactory factory, |
6431b7efe240
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
297
diff
changeset
|
120 Object context, |
6431b7efe240
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
297
diff
changeset
|
121 CallMeta callMeta, |
6431b7efe240
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
297
diff
changeset
|
122 Document data) |
6431b7efe240
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
297
diff
changeset
|
123 { |
42
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
124 if (logger.isDebugEnabled()) { |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
125 logger.debug("DefaultArtifact.setup: " + identifier); |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
126 } |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
127 this.identifier = identifier; |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
128 } |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
129 |
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
130 public void endOfLife(Object context) { |
42
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
131 if (logger.isDebugEnabled()) { |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
132 logger.debug("DefaultArtifact.endOfLife: " + identifier); |
5fbd8e65bdf5
Added debug output to DefaultArtifact tracing of artifact lifecyle easier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
133 } |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
134 } |
82
efe752c4f8b2
Call cleanup method to remove special data stored by an 'out'-target before exporting an artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
81
diff
changeset
|
135 |
efe752c4f8b2
Call cleanup method to remove special data stored by an 'out'-target before exporting an artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
81
diff
changeset
|
136 public void cleanup(Object context) { |
91
730ff077a58c
More javadoc, some code formatting.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
87
diff
changeset
|
137 if (logger.isDebugEnabled()) { |
730ff077a58c
More javadoc, some code formatting.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
87
diff
changeset
|
138 logger.debug("DefaultArtifact.cleanup: " + identifier); |
730ff077a58c
More javadoc, some code formatting.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
87
diff
changeset
|
139 } |
82
efe752c4f8b2
Call cleanup method to remove special data stored by an 'out'-target before exporting an artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
81
diff
changeset
|
140 } |
10
e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
141 } |
91
730ff077a58c
More javadoc, some code formatting.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
87
diff
changeset
|
142 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |