9063
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
|
2 * Software engineering by Intevation GmbH |
|
3 * |
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
|
6 * documentation coming with Dive4Elements River for details. |
|
7 */ |
|
8 |
9073
|
9 package org.dive4elements.river.artifacts.states; |
9063
|
10 |
|
11 import org.apache.log4j.Logger; |
|
12 import org.dive4elements.artifacts.Artifact; |
|
13 |
|
14 /** State in which to fetch years for sedminent load calculation. */ |
9073
|
15 public class LoadSingleYearSelectState extends DefaultState { |
9063
|
16 private static final long serialVersionUID = 1L; |
|
17 /** The log used in this class. */ |
9073
|
18 private static Logger log = Logger.getLogger(LoadSingleYearSelectState.class); |
9063
|
19 |
|
20 /** |
|
21 * The default constructor that initializes an empty State object. |
|
22 */ |
9073
|
23 public LoadSingleYearSelectState() { |
9063
|
24 } |
|
25 |
|
26 /** Year Select Widget. */ |
|
27 @Override |
|
28 protected String getUIProvider() { |
9073
|
29 return "common.state.load_single_year_select"; |
9063
|
30 } |
|
31 |
|
32 @Override |
|
33 public boolean validate(final Artifact artifact) throws IllegalArgumentException { |
|
34 return true; |
|
35 // final CollisionLoadYearEpochAccess access = new CollisionLoadYearEpochAccess((D4EArtifact) artifact); |
|
36 // |
|
37 // // Second year should be later than first. |
|
38 // if (access.getYears() == null || access.getYears().length == 0) |
|
39 // return true; // TODO: richtig in CollisionLoadYear... implementieren |
|
40 // // throw new IllegalArgumentException("error_years_wrong"); |
|
41 // |
|
42 // return true; |
|
43 } |
|
44 } |
|
45 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |