comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java @ 2422:44dc117aa2b7

Picked rev 4058,4063,4065,4068,4069 from trunk. flys-artifacts/tags/2.6.1@4077 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 17 Feb 2012 11:29:41 +0000
parents e0243627ba62
children ac528b883b47
comparison
equal deleted inserted replaced
2421:59047dfed8be 2422:44dc117aa2b7
280 280
281 WINFOArtifact flys = (WINFOArtifact) artifact; 281 WINFOArtifact flys = (WINFOArtifact) artifact;
282 StateData data = getData(flys, FIELD_WQ_MODE); 282 StateData data = getData(flys, FIELD_WQ_MODE);
283 283
284 String mode = data != null ? (String) data.getValue() : null; 284 String mode = data != null ? (String) data.getValue() : null;
285 285 boolean isQ = mode != null
286 if (mode != null && mode.equals("W")) { 286 ? Boolean.valueOf(mode)
287 : false;
288
289 if (!isQ) {
287 return validateW(artifact); 290 return validateW(artifact);
288 } 291 }
289 else if (mode != null && mode.equals("Q")) { 292 else if (isQ) {
290 return validateQ(artifact); 293 return validateQ(artifact);
291 } 294 }
292 else { 295 else {
293 throw new IllegalArgumentException("error_feed_no_wq_mode_selected"); 296 throw new IllegalArgumentException("error_feed_no_wq_mode_selected");
294 } 297 }

http://dive4elements.wald.intevation.org