Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/CollectionMonitor.java @ 1834:9eedda250280
Extract output names from artifact, not from state. Important when querying recommendations for an artifact with these outputs.
flys-artifacts/trunk@3170 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 04 Nov 2011 13:23:39 +0000 |
parents | 33ade8153d74 |
children | 94871b7ce9e9 |
comparison
equal
deleted
inserted
replaced
1833:d4e80e9b40b5 | 1834:9eedda250280 |
---|---|
64 Recommendations rec = Recommendations.getInstance(); | 64 Recommendations rec = Recommendations.getInstance(); |
65 rec.recommend(flys, null, outs, params, recommended); | 65 rec.recommend(flys, null, outs, params, recommended); |
66 } | 66 } |
67 | 67 |
68 | 68 |
69 /** | |
70 * Get outputnames from current state (only the ones for which | |
71 * facets exist). | |
72 */ | |
69 public static String[] extractOutputNames( | 73 public static String[] extractOutputNames( |
70 FLYSArtifact flys, | 74 FLYSArtifact flys, |
71 CallContext context) | 75 CallContext context) |
72 { | 76 { |
73 State state = flys.getCurrentState(context); | 77 List<Output> outs = flys.getCurrentOutputs(context); |
74 List<Output> outs = state.getOutputs(); | |
75 | 78 |
76 int num = outs == null ? 0 : outs.size(); | 79 int num = outs == null ? 0 : outs.size(); |
77 | 80 |
78 String[] names = new String[num]; | 81 String[] names = new String[num]; |
79 | 82 |