Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/product/DefaultProduct.java @ 101:e01c163ea5b0
Inputvalidation for String, Integer and Date Values added.
gnv-artifacts/trunk@149 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 29 Sep 2009 09:50:25 +0000 |
parents | e4ecf3188bdf |
children | 7fb9441dd8af |
rev | line source |
---|---|
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 /** |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 * |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
3 */ |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
4 package de.intevation.gnv.artifacts.fis.product; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
5 |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
6 import java.util.Collection; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
7 |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
8 import de.intevation.artifacts.ArtifactFactory; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.gnv.transition.InputData; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
11 /** |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
12 * @author Tim Englich <tim.englich@intevation.de> |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
13 * |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 */ |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 public class DefaultProduct implements Product { |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 private String name = null; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 private Collection<InputData> parameter = null; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 private ArtifactFactory artifactFactory = null; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 /** |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
25 * Constructor |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 * @param name |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 * @param parameter |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
28 * @param artifactFactory |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 */ |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
30 public DefaultProduct(String name, Collection<InputData> parameter, ArtifactFactory artifactFactory) { |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
31 super(); |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
32 this.name = name; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
33 this.parameter = parameter; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 this.artifactFactory = artifactFactory; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 } |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
36 |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
37 /** |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
38 * @see de.intevation.gnv.artifacts.fis.product.Product#getName() |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 */ |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 public String getName() { |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
41 return this.name; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 } |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
43 |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
44 /** |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
45 * @see de.intevation.gnv.artifacts.fis.product.Product#getParameter() |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 */ |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 public Collection<InputData> getParameter() { |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 return this.parameter; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 } |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
51 /** |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
52 * @see de.intevation.gnv.artifacts.fis.product.Product#getArtifactFactory() |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
53 */ |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
54 public ArtifactFactory getArtifactFactory() { |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 return this.artifactFactory; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
56 } |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
57 |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
58 } |