9274
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
|
2 * Software engineering by Intevation GmbH |
|
3 * |
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
|
6 * documentation coming with Dive4Elements River for details. |
|
7 */ |
|
8 |
|
9 package org.dive4elements.river.artifacts.bundu.bezugswst; |
|
10 |
|
11 import org.dive4elements.artifactdatabase.data.StateData; |
|
12 import org.dive4elements.artifacts.Artifact; |
|
13 import org.dive4elements.artifacts.CallContext; |
|
14 import org.dive4elements.artifacts.CallMeta; |
|
15 import org.dive4elements.artifacts.common.utils.XMLUtils; |
|
16 import org.dive4elements.river.artifacts.resources.Resources; |
|
17 import org.dive4elements.river.artifacts.states.DefaultState; |
|
18 import org.dive4elements.river.artifacts.uinfo.salix.ScenarioTypeState; |
|
19 import org.w3c.dom.Element; |
|
20 |
|
21 /** |
|
22 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> |
|
23 */ |
|
24 public class MissingVolumeSelect extends DefaultState { |
|
25 |
|
26 /** |
|
27 * The default constructor that initializes an empty State object. |
|
28 */ |
|
29 public MissingVolumeSelect() { |
|
30 } |
|
31 |
|
32 @Override |
|
33 protected Element[] createItems(final XMLUtils.ElementCreator ec, final Artifact artifact, final String name, final CallContext context) { |
|
34 final CallMeta meta = context.getMeta(); |
|
35 final Element[] elements = new Element[1]; |
|
36 elements[0] = createItem(ec, |
|
37 new String[] { Resources.getMsg(meta, "state.bundu.wst.missing_volume.select", "state.bundu.wst.missing_volume.select"), "missing_volume" }); |
|
38 |
|
39 return elements; |
|
40 } |
|
41 |
|
42 @Override |
|
43 protected String getUIProvider() { |
|
44 return "fix.missing_volume_panel"; // generalize? |
|
45 } |
|
46 |
|
47 @Override |
|
48 protected Element createData(final XMLUtils.ElementCreator cr, final Artifact artifact, final StateData data, final CallContext context) { |
|
49 return ScenarioTypeState.changeHeaderForCurrentState("state.bundu.wst.missing_volume", data.getName(), cr, context); |
|
50 } |
|
51 } |