View Javadoc

1   /**
2    * Copyright 2005-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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  package org.kuali.rice.krad.demo.uif.form;
17  
18  import java.io.Serializable;
19  import java.util.ArrayList;
20  import java.util.Arrays;
21  import java.util.HashMap;
22  import java.util.List;
23  import java.util.Map;
24  
25  /**
26   * For test view purposes only
27   *
28   * @author Kuali Rice Team (rice.collab@kuali.org)
29   */
30  public class UITestObject implements Serializable {
31      private static final long serialVersionUID = -7525378097732916411L;
32  
33      private String field1;
34      private String field2;
35      private String field3;
36      private String field4;
37      private String field5;
38      private String field6;
39      private String field7;
40      private String field8;
41      private boolean bfield;
42      private List<String> stringList = Arrays.asList("String1", "String2", "String3");
43  
44      private UITestObject innerObject;
45  
46      private Map<String, Object> remoteFieldValuesMap;
47  
48      private List<UITestObject> subList = new ArrayList<UITestObject>();
49  
50      public UITestObject() {
51          remoteFieldValuesMap = new HashMap<String, Object>();
52          remoteFieldValuesMap.put("remoteField1", "Apple");
53          remoteFieldValuesMap.put("remoteField2", "Banana");
54          remoteFieldValuesMap.put("remoteField3", true);
55          remoteFieldValuesMap.put("remoteField4", "Fruit");
56      }
57  
58      public UITestObject(String field1, String field2, String field3, String field4) {
59          this.field1 = field1;
60          this.field2 = field2;
61          this.field3 = field3;
62          this.field4 = field4;
63  
64          remoteFieldValuesMap = new HashMap<String, Object>();
65          remoteFieldValuesMap.put("remoteField1", "Apple");
66          remoteFieldValuesMap.put("remoteField2", "Banana");
67          remoteFieldValuesMap.put("remoteField3", true);
68          remoteFieldValuesMap.put("remoteField4", "Fruit");
69      }
70  
71      public UITestObject(String field1, String field2, String field3, String field4, String field5, String field6,
72              String field7, String field8) {
73          this.field1 = field1;
74          this.field2 = field2;
75          this.field3 = field3;
76          this.field4 = field4;
77          this.field5 = field5;
78          this.field6 = field6;
79          this.field7 = field7;
80          this.field8 = field8;
81  
82          remoteFieldValuesMap = new HashMap<String, Object>();
83          remoteFieldValuesMap.put("remoteField1", "Apple");
84          remoteFieldValuesMap.put("remoteField2", "Banana");
85          remoteFieldValuesMap.put("remoteField3", true);
86          remoteFieldValuesMap.put("remoteField4", "Fruit");
87      }
88  
89      public UITestObject(String field1, String field2, String field3, String field4, UITestObject innerObject) {
90          this(field1, field2, field3, field4);
91  
92          this.innerObject = innerObject;
93      }
94  
95      /**
96       * @return the field1
97       */
98      public String getField1() {
99          return this.field1;
100     }
101 
102     /**
103      * @param field1 the field1 to set
104      */
105     public void setField1(String field1) {
106         this.field1 = field1;
107     }
108 
109     /**
110      * @return the field2
111      */
112     public String getField2() {
113         return this.field2;
114     }
115 
116     /**
117      * @param field2 the field2 to set
118      */
119     public void setField2(String field2) {
120         this.field2 = field2;
121     }
122 
123     /**
124      * @return the field3
125      */
126     public String getField3() {
127         return this.field3;
128     }
129 
130     /**
131      * @param field3 the field3 to set
132      */
133     public void setField3(String field3) {
134         this.field3 = field3;
135     }
136 
137     /**
138      * @return the field4
139      */
140     public String getField4() {
141         return this.field4;
142     }
143 
144     /**
145      * @param field4 the field4 to set
146      */
147     public void setField4(String field4) {
148         this.field4 = field4;
149     }
150 
151     public String getField5() {
152         return field5;
153     }
154 
155     public void setField5(String field5) {
156         this.field5 = field5;
157     }
158 
159     public String getField6() {
160         return field6;
161     }
162 
163     public void setField6(String field6) {
164         this.field6 = field6;
165     }
166 
167     public String getField7() {
168         return field7;
169     }
170 
171     public void setField7(String field7) {
172         this.field7 = field7;
173     }
174 
175     public String getField8() {
176         return field8;
177     }
178 
179     public void setField8(String field8) {
180         this.field8 = field8;
181     }
182 
183     /**
184      * @param subList the subList to set
185      */
186     public void setSubList(List<UITestObject> subList) {
187         this.subList = subList;
188     }
189 
190     /**
191      * @return the subList
192      */
193     public List<UITestObject> getSubList() {
194         return subList;
195     }
196 
197     public Map<String, Object> getRemoteFieldValuesMap() {
198         return remoteFieldValuesMap;
199     }
200 
201     public void setRemoteFieldValuesMap(Map<String, Object> remoteFieldValuesMap) {
202         this.remoteFieldValuesMap = remoteFieldValuesMap;
203     }
204 
205     /**
206      * boolean field
207      *
208      * @return bField
209      */
210     public boolean isBfield() {
211         return bfield;
212     }
213 
214     /**
215      * @param bfield boolean field
216      */
217     public void setBfield(boolean bfield) {
218         this.bfield = bfield;
219     }
220 
221     @Override
222     public String toString() {
223 
224         return "" + field1 + field2 + field3 + field4;
225     }
226 
227     public List<String> getStringList() {
228         return stringList;
229     }
230 
231     public void setStringList(List<String> stringList) {
232         this.stringList = stringList;
233     }
234 
235     public UITestObject getInnerObject() {
236         return innerObject;
237     }
238 
239     public void setInnerObject(UITestObject innerObject) {
240         this.innerObject = innerObject;
241     }
242 
243 }
244