Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/DatacageBackendListener.java @ 1072:80aecb01d79a
Let MainValuesArtifact have a state, outputmode and facet.
flys-artifacts/trunk@2556 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 24 Aug 2011 12:07:33 +0000 |
parents | 1917f32701dc |
children | cbe2febe30cc |
rev | line source |
---|---|
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.datacage; |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 |
1005
52949da92f7a
The signature of BackendListener in artifactdatabase has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1002
diff
changeset
|
3 import java.util.List; |
52949da92f7a
The signature of BackendListener in artifactdatabase has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1002
diff
changeset
|
4 |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
5 import de.intevation.artifacts.Artifact; |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
6 import de.intevation.artifacts.ArtifactCollection; |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
7 import de.intevation.artifacts.GlobalContext; |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 import de.intevation.artifacts.User; |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 import de.intevation.artifactdatabase.BackendListener; |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.artifactdatabase.Backend; |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
13 import org.apache.log4j.Logger; |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
14 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 import org.w3c.dom.Document; |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
16 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
17 public class DatacageBackendListener |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
18 implements BackendListener |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
19 { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
20 private static Logger log = |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 Logger.getLogger(DatacageBackendListener.class); |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
23 protected GlobalContext context; |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 public DatacageBackendListener() { |
1000
46bfe06e51d9
Added some debug output
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
999
diff
changeset
|
26 log.debug("new DatacageBackendListener"); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
27 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
28 |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
29 protected Datacage getDatacage() { |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 Object listener = context.get(Datacage.DATACAGE_KEY); |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
31 return listener instanceof Datacage |
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
32 ? (Datacage)listener |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
33 : null; |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
34 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
35 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
36 @Override |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
37 public void setup(GlobalContext context) { |
1000
46bfe06e51d9
Added some debug output
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
999
diff
changeset
|
38 log.debug("setup"); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
39 this.context = context; |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
40 Datacage l = getDatacage(); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
41 if (l != null) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
42 l.setup(context); |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
43 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
44 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
45 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
46 @Override |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
47 public void createdArtifact(Artifact artifact, Backend backend) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
48 log.debug("createdArtifact"); |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
49 Datacage l = getDatacage(); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
50 if (l != null) { |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
51 l.createdArtifact(artifact, backend, context); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
52 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
53 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
54 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
55 @Override |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
56 public void storedArtifact(Artifact artifact, Backend backend) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
57 log.debug("storedArtifact"); |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
58 Datacage l = getDatacage(); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
59 if (l != null) { |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
60 l.storedArtifact(artifact, backend, context); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
61 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
62 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
63 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
64 @Override |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
65 public void createdUser(User user, Backend backend) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
66 log.debug("createdUser"); |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
67 Datacage l = getDatacage(); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
68 if (l != null) { |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
69 l.createdUser(user, backend, context); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
70 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
71 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
72 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
73 @Override |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
74 public void deletedUser(String identifier, Backend backend) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
75 log.debug("deletedUser"); |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
76 Datacage l = getDatacage(); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
77 if (l != null) { |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
78 l.deletedUser(identifier, backend, context); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
79 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
80 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
81 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
82 @Override |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
83 public void createdCollection( |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
84 ArtifactCollection collection, |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
85 Backend backend |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
86 ) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
87 log.debug("createdCollection"); |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
88 Datacage l = getDatacage(); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
89 if (l != null) { |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
90 l.createdCollection(collection, backend, context); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
91 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
92 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
93 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
94 @Override |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
95 public void deletedCollection(String identifier, Backend backend) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
96 log.debug("deletedCollection"); |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
97 Datacage l = getDatacage(); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
98 if (l != null) { |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
99 l.deletedCollection(identifier, backend, context); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
100 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
101 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
102 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
103 @Override |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
104 public void changedCollectionAttribute( |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
105 String identifier, |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
106 Document document, |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
107 Backend backend |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
108 ) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
109 log.debug("changedCollectionAttribute"); |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
110 Datacage l = getDatacage(); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
111 if (l != null) { |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
112 l.changedCollectionAttribute( |
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
113 identifier, document, backend, context); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
114 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
115 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
116 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
117 @Override |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
118 public void changedCollectionItemAttribute( |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
119 String collectionId, |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
120 String artifactId, |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
121 Document document, |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
122 Backend backend |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
123 ) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
124 log.debug("changedCollectionItemAttribute"); |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
125 Datacage l = getDatacage(); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
126 if (l != null) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
127 l.changedCollectionItemAttribute( |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
128 collectionId, artifactId, document, backend, context); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
129 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
130 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
131 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
132 @Override |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
133 public void addedArtifactToCollection( |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
134 String artifactId, |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
135 String collectionId, |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
136 Backend backend |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
137 ) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
138 log.debug("addedArtifactToCollection"); |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
139 Datacage l = getDatacage(); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
140 if (l != null) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
141 l.addedArtifactToCollection( |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
142 artifactId, collectionId, backend, context); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
143 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
144 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
145 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
146 @Override |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
147 public void removedArtifactFromCollection( |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
148 String artifactId, |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
149 String collectionId, |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
150 Backend backend |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
151 ) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
152 log.debug("removedArtifactFromCollection"); |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
153 Datacage l = getDatacage(); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
154 if (l != null) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
155 l.removedArtifactFromCollection( |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
156 artifactId, collectionId, backend, context); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
157 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
158 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
159 |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
160 @Override |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
161 public void setCollectionName( |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
162 String collectionId, |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
163 String name |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
164 ) { |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
165 log.debug("setCollectionName"); |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
166 Datacage l = getDatacage(); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
167 if (l != null) { |
1002
db86c665ab6e
Datacage: Pass global context to datacage if calls come from backend listener.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1001
diff
changeset
|
168 l.setCollectionName(collectionId, name, context); |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
169 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
170 } |
1005
52949da92f7a
The signature of BackendListener in artifactdatabase has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1002
diff
changeset
|
171 |
52949da92f7a
The signature of BackendListener in artifactdatabase has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1002
diff
changeset
|
172 @Override |
52949da92f7a
The signature of BackendListener in artifactdatabase has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1002
diff
changeset
|
173 public void killedCollections(List<String> identifiers, Backend backend) { |
1006
1917f32701dc
Forwarded kill collections and artifacts events to datacage.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1005
diff
changeset
|
174 log.debug("killedCollections"); |
1917f32701dc
Forwarded kill collections and artifacts events to datacage.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1005
diff
changeset
|
175 Datacage l = getDatacage(); |
1917f32701dc
Forwarded kill collections and artifacts events to datacage.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1005
diff
changeset
|
176 if (l != null) { |
1917f32701dc
Forwarded kill collections and artifacts events to datacage.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1005
diff
changeset
|
177 l.killedCollections(identifiers, context); |
1917f32701dc
Forwarded kill collections and artifacts events to datacage.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1005
diff
changeset
|
178 } |
1005
52949da92f7a
The signature of BackendListener in artifactdatabase has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1002
diff
changeset
|
179 } |
52949da92f7a
The signature of BackendListener in artifactdatabase has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1002
diff
changeset
|
180 |
52949da92f7a
The signature of BackendListener in artifactdatabase has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1002
diff
changeset
|
181 @Override |
52949da92f7a
The signature of BackendListener in artifactdatabase has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1002
diff
changeset
|
182 public void killedArtifacts(List<String> identifiers, Backend backend) { |
1006
1917f32701dc
Forwarded kill collections and artifacts events to datacage.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1005
diff
changeset
|
183 log.debug("killedArtifacts"); |
1917f32701dc
Forwarded kill collections and artifacts events to datacage.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1005
diff
changeset
|
184 Datacage l = getDatacage(); |
1917f32701dc
Forwarded kill collections and artifacts events to datacage.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1005
diff
changeset
|
185 if (l != null) { |
1917f32701dc
Forwarded kill collections and artifacts events to datacage.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1005
diff
changeset
|
186 l.killedArtifacts(identifiers, context); |
1917f32701dc
Forwarded kill collections and artifacts events to datacage.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1005
diff
changeset
|
187 } |
1005
52949da92f7a
The signature of BackendListener in artifactdatabase has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1002
diff
changeset
|
188 } |
999
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
189 } |
b0218f21c664
Wire datacage with backend of artifact database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
190 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |