Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java @ 3556:afc7bfb4800b
Use the new infrastructure to figure out if a facet should
be initially active or not.
flys-artifacts/trunk@5152 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 29 Jul 2012 11:04:06 +0000 |
parents | 3c006a53e551 |
children | 8483d190b2e7 |
comparison
equal
deleted
inserted
replaced
3555:b1912514e0f5 | 3556:afc7bfb4800b |
---|---|
1 package de.intevation.flys.artifacts; | 1 package de.intevation.flys.artifacts; |
2 | 2 |
3 import de.intevation.artifactdatabase.state.DefaultFacet; | 3 import de.intevation.artifactdatabase.state.DefaultFacet; |
4 import de.intevation.artifactdatabase.state.Facet; | 4 import de.intevation.artifactdatabase.state.Facet; |
5 import de.intevation.artifactdatabase.state.FacetActivity; | |
5 | 6 |
6 import de.intevation.artifacts.Artifact; | 7 import de.intevation.artifacts.Artifact; |
7 import de.intevation.artifacts.ArtifactFactory; | 8 import de.intevation.artifacts.ArtifactFactory; |
8 import de.intevation.artifacts.CallMeta; | 9 import de.intevation.artifacts.CallMeta; |
9 | 10 |
30 private static Logger logger = Logger.getLogger(WaterlevelArtifact.class); | 31 private static Logger logger = Logger.getLogger(WaterlevelArtifact.class); |
31 | 32 |
32 /** The name of the artifact. */ | 33 /** The name of the artifact. */ |
33 public static final String ARTIFACT_NAME = "waterlevel"; | 34 public static final String ARTIFACT_NAME = "waterlevel"; |
34 | 35 |
36 static { | |
37 // TODO: Move to configuration. | |
38 FacetActivity.Registry.getInstance() | |
39 .register(ARTIFACT_NAME, FacetActivity.INACTIVE); | |
40 } | |
35 | 41 |
36 /** | 42 /** |
37 * The default constructor. | 43 * The default constructor. |
38 */ | 44 */ |
39 public WaterlevelArtifact() { | 45 public WaterlevelArtifact() { |
105 * @return the name of the concrete artifact. | 111 * @return the name of the concrete artifact. |
106 */ | 112 */ |
107 public String getName() { | 113 public String getName() { |
108 return ARTIFACT_NAME; | 114 return ARTIFACT_NAME; |
109 } | 115 } |
110 | |
111 | |
112 /** | |
113 * Determines Facets initial disposition regarding activity (think of | |
114 * selection in Client ThemeList GUI). | |
115 * WaterlevelArtifact Facets should come to live "inactive" (always | |
116 * return 0). | |
117 * | |
118 * @param facetName name of the facet. | |
119 * @param index index of the facet. | |
120 * | |
121 * @return Always 0 to have Facets initial predisposition to "inactive". | |
122 */ | |
123 @Override | |
124 public int getInitialFacetActivity( | |
125 String outputName, | |
126 String facetName, | |
127 int index) | |
128 { | |
129 return 0; | |
130 } | |
131 } | 116 } |
132 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 117 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |