Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java @ 1050:eccf966fb677
State engine: Removed CallContext from state validation.
flys-artifacts/trunk@2512 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 19 Aug 2011 14:10:18 +0000 |
parents | 610d0e0f4f85 |
children | 61c051e53f9b |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java Fri Aug 19 11:46:40 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java Fri Aug 19 14:10:18 2011 +0000 @@ -200,7 +200,7 @@ @Override - public boolean validate(Artifact artifact, CallContext context) + public boolean validate(Artifact artifact) throws IllegalArgumentException { logger.debug("WQSelect.validate"); @@ -211,10 +211,10 @@ String selectionMode = data != null ? (String) data.getValue() : null; if (selectionMode == null || selectionMode.equals("single")) { - return validateSingle(artifact, context); + return validateSingle(artifact); } else { - return validateRange(artifact, context); + return validateRange(artifact); } } @@ -241,7 +241,7 @@ } - protected boolean validateSingle(Artifact artifact, CallContext context) + protected boolean validateSingle(Artifact artifact) throws IllegalArgumentException { logger.debug("WQSelect.validateSingle"); @@ -293,7 +293,7 @@ } - protected boolean validateRange(Artifact artifact, CallContext context) + protected boolean validateRange(Artifact artifact) throws IllegalArgumentException { logger.debug("WQSelect.validateRange"); @@ -325,10 +325,10 @@ double step = Double.parseDouble(stepStr); if (mode != null && mode.trim().toLowerCase().equals("w")) { - return validateW(artifact, context, from, to, step); + return validateW(artifact, from, to, step); } else if (mode != null && mode.trim().toLowerCase().equals("q")) { - return validateQ(artifact, context, from, to, step); + return validateQ(artifact, from, to, step); } else { throw new IllegalArgumentException( @@ -345,7 +345,6 @@ * Validates the inserted W values. * * @param artifact The owner artifact. - * @param context The CallContext * @param from The lower value of the W range. * @param to The upper value of the W range. * @param step The step width. @@ -354,7 +353,6 @@ */ protected boolean validateW( Artifact artifact, - CallContext context, double from, double to, double step) @@ -372,7 +370,6 @@ * Validates the inserted Q values. * * @param artifact The owner artifact. - * @param context The CallContext * @param from The lower value of the Q range. * @param to The upper value of the Q range. * @param step The step width. @@ -381,7 +378,6 @@ */ protected boolean validateQ( Artifact artifact, - CallContext context, double from, double to, double step)