View Javadoc

1   /*
2    * Copyright 2004-2005 Thomas Cotting
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *    http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  /*
17   * $Id: JReleaseInfoProperty.java,v 1.2 2005/08/06 14:12:35 tcotting Exp $
18   */
19  package ch.oscg.jreleaseinfo;
20  
21  
22  /***
23   * Property class for JReleaseInfoAntTask task.
24   *
25   * <p>
26   * This class holds three String values
27   * </p>
28   *
29   * <ul>
30   * <li>
31   * name
32   * </li>
33   * <li>
34   * type
35   * </li>
36   * <li>
37   * value
38   * </li>
39   * </ul>
40   *
41   * <p>
42   * From this data, we will create a class with fields and getter method.
43   * Therefore we need the types to be defined.
44   * </p>
45   *
46   * <p>
47   * This types are implemented now:
48   * </p>
49   *
50   * <ul>
51   * <li>
52   * String
53   * </li>
54   * <li>
55   * Boolean
56   * </li>
57   * <li>
58   * Integer
59   * </li>
60   * <li>
61   * boolean
62   * </li>
63   * <li>
64   * int
65   * </li>
66   * <li>
67   * Date
68   * </li>
69   * </ul>
70   *
71   * <p></p>
72   *
73   * @author Thomas Cotting, Tangarena Engineering AG, Luzern
74   * @version $Revision: 1.2 $ ($Date: 2005/08/06 14:12:35 $ / $Author: tcotting $)
75   */
76  public class JReleaseInfoProperty {
77     /*** String Type. */
78     public static final String TYPE_OBJ_STRING = "String";
79  
80     /*** Boolean Type. */
81     public static final String TYPE_OBJ_BOOLEAN = "Boolean";
82  
83     /*** Integer Type. */
84     public static final String TYPE_OBJ_INTEGER = "Integer";
85  
86     /*** boolean primitive Type. */
87     public static final String TYPE_PRI_BOOLEAN = "boolean";
88  
89     /*** int primitive Type. */
90     public static final String TYPE_PRI_INT = "int";
91  
92     /*** Date Type. */
93     public static final String TYPE_OBJ_DATE = "Date";
94  
95     /*** Property Name e.g. BuildNumber. */
96     private String name = null;
97  
98     /*** Property Type e.g. Integer. */
99     private String type = null;
100 
101    /*** Property Value e.g. 8. */
102    private String value = null;
103 
104    /***
105     * Constructor.
106     */
107    public JReleaseInfoProperty() {
108       super();
109    }
110 
111    /***
112     * Constructor.
113     *
114     * @param name name of the property
115     * @param type name of the type
116     * @param value value of the property
117     */
118    public JReleaseInfoProperty(String name, String type, String value) {
119       super();
120       this.setName(name);
121       this.setType(type);
122       this.setValue(value);
123    }
124 
125    /***
126     * Get name of Property (name, type, value).
127     *
128     * @return name String of Property
129     */
130    public String getName() {
131       return this.name;
132    }
133 
134    /***
135     * Set name of Property (name, type, value).
136     *
137     * @param name String
138     */
139    public void setName(String name) {
140       this.name = name;
141    }
142 
143    /***
144     * Get type of Property (name, type, value).
145     *
146     * @return type String of Property
147     */
148    public String getType() {
149       return this.type;
150    }
151 
152    /***
153     * Set type of Property (name, type, value).
154     *
155     * @param type String of Property
156     */
157    public void setType(String type) {
158       this.type = type;
159    }
160 
161    /***
162     * Get value of Property (name, type, value).
163     *
164     * @return String value
165     */
166    public String getValue() {
167       return this.value;
168    }
169 
170    /***
171     * Set value of Property (name, type, value).
172     *
173     * @param value String of Property
174     */
175    public void setValue(String value) {
176       this.value = value;
177    }
178 }