Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/StaticState.java @ 2004:94c4dd5aaf20
Made StaticState a bit more convenient to use.
flys-artifacts/trunk@3446 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 16 Dec 2011 14:11:50 +0000 |
parents | 741d2067cfe1 |
children | 6cdd994ee8a4 |
comparison
equal
deleted
inserted
replaced
2003:ec5d6149b176 | 2004:94c4dd5aaf20 |
---|---|
44 DefaultOutput output = new DefaultOutput(nameDesc, | 44 DefaultOutput output = new DefaultOutput(nameDesc, |
45 nameDesc, "image/png", facets, "chart"); | 45 nameDesc, "image/png", facets, "chart"); |
46 getOutputs().add(output); | 46 getOutputs().add(output); |
47 } | 47 } |
48 | 48 |
49 public static void addDefaultChartOutput( | |
50 DefaultState state, | |
51 String nameDesc, | |
52 List<Facet> facets | |
53 ) { | |
54 DefaultOutput output = new DefaultOutput(nameDesc, | |
55 nameDesc, "image/png", facets, "chart"); | |
56 state.getOutputs().add(output); | |
57 } | |
58 | |
49 | 59 |
50 /** | 60 /** |
51 * Do nothing (override to include your logic). | 61 * Do nothing (override to include your logic). |
52 * @param facets List of facets (to add to). | 62 * @param facets List of facets (to add to). |
53 */ | 63 */ |
64 public Object staticCompute(List<Facet> facets, FLYSArtifact artifact) { | |
65 return staticCompute(facets); | |
66 } | |
67 | |
54 public Object staticCompute(List<Facet> facets) { | 68 public Object staticCompute(List<Facet> facets) { |
55 return null; | 69 return null; |
56 } | 70 } |
57 | 71 |
58 | 72 |
63 String hash, | 77 String hash, |
64 CallContext context, | 78 CallContext context, |
65 List<Facet> facets, | 79 List<Facet> facets, |
66 Object old | 80 Object old |
67 ) { | 81 ) { |
68 return staticCompute(facets); | 82 return staticCompute(facets, artifact); |
69 } | 83 } |
70 | 84 |
71 | 85 |
72 /** Call staticCompute to allow easy adjustments. */ | 86 /** Call staticCompute to allow easy adjustments. */ |
73 @Override | 87 @Override |
76 String hash, | 90 String hash, |
77 CallContext context, | 91 CallContext context, |
78 List<Facet> facets, | 92 List<Facet> facets, |
79 Object old | 93 Object old |
80 ) { | 94 ) { |
81 return staticCompute(facets); | 95 return staticCompute(facets, artifact); |
82 } | 96 } |
83 | 97 |
84 | 98 |
85 /** Call staticCompute to allow easy adjustments. */ | 99 /** Call staticCompute to allow easy adjustments. */ |
86 @Override | 100 @Override |
89 String hash, | 103 String hash, |
90 Object context, | 104 Object context, |
91 CallMeta meta, | 105 CallMeta meta, |
92 List<Facet> facets | 106 List<Facet> facets |
93 ) { | 107 ) { |
94 return staticCompute(facets); | 108 return staticCompute(facets, artifact); |
95 } | 109 } |
96 } | 110 } |
97 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 111 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |