comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBackgroundArtifact.java @ 3468:f37e7e8907cb

merged flys-artifacts/2.8.1
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:39 +0200
parents c62ff9e72cea
children a2735a4bf75e
comparison
equal deleted inserted replaced
3387:5ffad8bde8ad 3468:f37e7e8907cb
1 package de.intevation.flys.artifacts;
2
3 import java.util.ArrayList;
4 import java.util.List;
5
6 import org.apache.log4j.Logger;
7
8 import de.intevation.artifacts.Artifact;
9 import de.intevation.artifacts.CallMeta;
10
11 import de.intevation.artifactdatabase.state.Facet;
12
13 import de.intevation.flys.artifacts.states.DefaultState;
14
15
16 public class WMSBackgroundArtifact extends StaticFLYSArtifact {
17
18 public static final String NAME = "wmsbackground";
19
20 private static final Logger logger =
21 Logger.getLogger(WMSBackgroundArtifact.class);
22
23
24 @Override
25 public String getName() {
26 return NAME;
27 }
28
29
30 @Override
31 protected void initialize(Artifact artifact, Object context, CallMeta meta) {
32 logger.debug("Initialize internal state with: "+ artifact.identifier());
33
34 FLYSArtifact flys = (FLYSArtifact) artifact;
35 addData("river", flys.getData("river"));
36
37 List<Facet> fs = new ArrayList<Facet>();
38
39 // TODO Add CallMeta
40 DefaultState state = (DefaultState) getCurrentState(context);
41 state.computeInit(this, hash(), context, meta, fs);
42
43 if (!fs.isEmpty()) {
44 facets.put(getCurrentStateId(), fs);
45 }
46 }
47 }
48 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org