Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java @ 3558:c3cd414982fe
Adjusted to follow the Chain-of-responsibility pattern in figuring out facet activities.
flys-artifacts/trunk@5155 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 29 Jul 2012 11:39:39 +0000 |
parents | afc7bfb4800b |
children | e0354aed0cd3 |
comparison
equal
deleted
inserted
replaced
3557:f1f798b5f14a | 3558:c3cd414982fe |
---|---|
54 public static final String STATIC_STATE_NAME = "state.mainvalue.static"; | 54 public static final String STATIC_STATE_NAME = "state.mainvalue.static"; |
55 | 55 |
56 /** One and only state to be in. */ | 56 /** One and only state to be in. */ |
57 protected transient State state = null; | 57 protected transient State state = null; |
58 | 58 |
59 | |
60 static { | |
61 // TODO: Move to configuration. | |
62 FacetActivity.Registry.getInstance().register( | |
63 ARTIFACT_NAME, | |
64 new FacetActivity() { | |
65 @Override | |
66 public Boolean isInitialActive( | |
67 Artifact artifact, | |
68 Facet facet, | |
69 String outputName | |
70 ) { | |
71 return outputName.equals("computed_discharge_curve") | |
72 || outputName.equals("duration_curve"); | |
73 } | |
74 }); | |
75 } | |
59 | 76 |
60 /** | 77 /** |
61 * Trivial Constructor. | 78 * Trivial Constructor. |
62 */ | 79 */ |
63 public MainValuesArtifact() { | 80 public MainValuesArtifact() { |
314 } | 331 } |
315 } | 332 } |
316 } | 333 } |
317 return filteredList; | 334 return filteredList; |
318 } | 335 } |
319 | |
320 static { | |
321 // TODO: Move to configuration. | |
322 FacetActivity.Registry.getInstance().register( | |
323 ARTIFACT_NAME, | |
324 new FacetActivity() { | |
325 @Override | |
326 public boolean isInitialActive( | |
327 Artifact artifact, | |
328 Facet facet, | |
329 String outputName | |
330 ) { | |
331 return outputName.equals("computed_discharge_curve") | |
332 || outputName.equals("duration_curve"); | |
333 } | |
334 }); | |
335 } | |
336 } | 336 } |
337 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 337 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |