# HG changeset patch # User Raimund Renkert # Date 1366017470 -7200 # Node ID 4ed36858fe0f409752e48084246f4d3edc9afff4 # Parent 5fca0d0d8aac161e141d9f796f8925534c54d692# Parent 74ebef99772d70eb2f41edbb5c19a11fdb77c745 merged. diff -r 5fca0d0d8aac -r 4ed36858fe0f flys-artifacts/doc/conf/floodmap.xml --- a/flys-artifacts/doc/conf/floodmap.xml Mon Apr 15 11:16:39 2013 +0200 +++ b/flys-artifacts/doc/conf/floodmap.xml Mon Apr 15 11:17:50 2013 +0200 @@ -2,7 +2,7 @@ - + @@ -15,127 +15,127 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r 5fca0d0d8aac -r 4ed36858fe0f flys-artifacts/doc/conf/rivermap.xml --- a/flys-artifacts/doc/conf/rivermap.xml Mon Apr 15 11:16:39 2013 +0200 +++ b/flys-artifacts/doc/conf/rivermap.xml Mon Apr 15 11:17:50 2013 +0200 @@ -2,7 +2,7 @@ - + @@ -14,117 +14,117 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r 5fca0d0d8aac -r 4ed36858fe0f flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadYearSelect.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadYearSelect.java Mon Apr 15 11:16:39 2013 +0200 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadYearSelect.java Mon Apr 15 11:17:50 2013 +0200 @@ -2,9 +2,15 @@ import org.apache.log4j.Logger; +import de.intevation.artifacts.Artifact; + +import de.intevation.flys.artifacts.FLYSArtifact; + +import de.intevation.flys.artifacts.access.SedimentLoadAccess; import de.intevation.flys.artifacts.states.DefaultState; +/** State in which to fetch years for sedminent load calculation. */ public class SedimentLoadYearSelect extends DefaultState { @@ -18,9 +24,25 @@ public SedimentLoadYearSelect() { } + + /** Year Select Widget. */ @Override protected String getUIProvider() { return "minfo.sedimentload_year_select"; } + + @Override + public boolean validate(Artifact artifact) + throws IllegalArgumentException + { + SedimentLoadAccess access = new SedimentLoadAccess((FLYSArtifact) artifact, null); + + // Second year should be later than first. + if (access.getPeriod()[1] < access.getPeriod()[0]) + throw new IllegalArgumentException("error_years_wrong"); + + return true; + } } +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : diff -r 5fca0d0d8aac -r 4ed36858fe0f flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Mon Apr 15 11:16:39 2013 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Mon Apr 15 11:17:50 2013 +0200 @@ -594,6 +594,8 @@ // ERRORS + String error_years_wrong(); + String error_read_minmax_values(); String error_validate_range(); diff -r 5fca0d0d8aac -r 4ed36858fe0f flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Mon Apr 15 11:16:39 2013 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Mon Apr 15 11:17:50 2013 +0200 @@ -307,6 +307,7 @@ ele_window_geometry_error = The geometry is not supported: unexpected_exception = There occured an unexpected exception +error_years_wrong = The second year needs to be bigger than the first year. error_read_minmax_values = Error while reading min/max values for the location input. error_validate_range = The value $1 needs to be smaller than $3 and bigger than $2. error_validate_date_range = Start date needs to be before end date. diff -r 5fca0d0d8aac -r 4ed36858fe0f flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Mon Apr 15 11:16:39 2013 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Mon Apr 15 11:17:50 2013 +0200 @@ -307,6 +307,7 @@ ele_window_geometry_error = Die Geometrie wird nicht unterst\u00fctzt: unexpected_exception = Ein unerwarteter Fehler ist aufgetreten +error_years_wrong = Das zweite Jahr muss gr\u00f6\u00dfer als das erste sein. error_read_minmax_values = Fehler beim Lesen der min/max Werte. Es kann keine Validierung der eingegebenen Strecke durchgef\u00fchrt werden. error_validate_range = Der Wert $1 muss kleiner als $3 und gr\u00f6\u00dfer als $2 sein. error_validate_date_range = Anfangsdatum muss fr\u00fcher sein als Enddatum. diff -r 5fca0d0d8aac -r 4ed36858fe0f flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Mon Apr 15 11:16:39 2013 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Mon Apr 15 11:17:50 2013 +0200 @@ -305,6 +305,7 @@ ele_window_geometry_error = The geometry is not supported: unexpected_exception = There occured an unexpected exception +error_years_wrong = The second year needs to be bigger than the first year. error_read_minmax_values = Error while reading min/max values for the location input. error_validate_range = The value $1 needs to be smaller than $3 and bigger than $2. error_validate_date_range = Start date needs to be before end date.