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