View Javadoc
1   /**
2    * Copyright 2005-2016 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 edu.sampleu.demo.kitchensink;
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 boolean bfield;
38      private List<String> stringList = Arrays.asList("String1", "String2", "String3");
39  
40      private UITestObject innerObject;
41  
42      private Map<String, Object> remoteFieldValuesMap;
43  
44      private List<UITestObject> subList = new ArrayList<UITestObject>();
45  
46      public UITestObject() {
47          remoteFieldValuesMap = new HashMap<String, Object>();
48          remoteFieldValuesMap.put("remoteField1", "Apple");
49          remoteFieldValuesMap.put("remoteField2", "Banana");
50          remoteFieldValuesMap.put("remoteField3", true);
51          remoteFieldValuesMap.put("remoteField4", "Fruit");
52      }
53  
54      public UITestObject(String field1, String field2, String field3, String field4) {
55          this.field1 = field1;
56          this.field2 = field2;
57          this.field3 = field3;
58          this.field4 = field4;
59  
60          remoteFieldValuesMap = new HashMap<String, Object>();
61          remoteFieldValuesMap.put("remoteField1", "Apple");
62          remoteFieldValuesMap.put("remoteField2", "Banana");
63          remoteFieldValuesMap.put("remoteField3", true);
64          remoteFieldValuesMap.put("remoteField4", "Fruit");
65  
66      }
67  
68      public UITestObject(String field1, String field2, String field3, String field4, UITestObject innerObject) {
69          this(field1,field2,field3,field4);
70  
71          this.innerObject = innerObject;
72      }
73  
74      /**
75       * @return the field1
76       */
77      public String getField1() {
78          return this.field1;
79      }
80  
81      /**
82       * @param field1 the field1 to set
83       */
84      public void setField1(String field1) {
85          this.field1 = field1;
86      }
87  
88      /**
89       * @return the field2
90       */
91      public String getField2() {
92          return this.field2;
93      }
94  
95      /**
96       * @param field2 the field2 to set
97       */
98      public void setField2(String field2) {
99          this.field2 = field2;
100     }
101 
102     /**
103      * @return the field3
104      */
105     public String getField3() {
106         return this.field3;
107     }
108 
109     /**
110      * @param field3 the field3 to set
111      */
112     public void setField3(String field3) {
113         this.field3 = field3;
114     }
115 
116     /**
117      * @return the field4
118      */
119     public String getField4() {
120         return this.field4;
121     }
122 
123     /**
124      * @param field4 the field4 to set
125      */
126     public void setField4(String field4) {
127         this.field4 = field4;
128     }
129 
130     /**
131      * @param subList the subList to set
132      */
133     public void setSubList(List<UITestObject> subList) {
134         this.subList = subList;
135     }
136 
137     /**
138      * @return the subList
139      */
140     public List<UITestObject> getSubList() {
141         return subList;
142     }
143 
144     public Map<String, Object> getRemoteFieldValuesMap() {
145         return remoteFieldValuesMap;
146     }
147 
148     public void setRemoteFieldValuesMap(Map<String, Object> remoteFieldValuesMap) {
149         this.remoteFieldValuesMap = remoteFieldValuesMap;
150     }
151 
152     /**
153      * boolean field
154      *
155      * @return bField
156      */
157     public boolean isBfield() {
158         return bfield;
159     }
160 
161     /**
162      * @param bfield boolean field
163      */
164     public void setBfield(boolean bfield) {
165         this.bfield = bfield;
166     }
167 
168     @Override
169     public String toString() {
170 
171         return "" + field1 + field2 + field3 + field4;
172     }
173 
174     public List<String> getStringList() {
175         return stringList;
176     }
177 
178     public void setStringList(List<String> stringList) {
179         this.stringList = stringList;
180     }
181 
182     public UITestObject getInnerObject() {
183         return innerObject;
184     }
185 
186     public void setInnerObject(UITestObject innerObject) {
187         this.innerObject = innerObject;
188     }
189 }