001 /**
002 * Copyright 2005-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package edu.sampleu.demo.kitchensink;
017
018 import java.io.Serializable;
019 import java.util.ArrayList;
020 import java.util.Arrays;
021 import java.util.HashMap;
022 import java.util.List;
023 import java.util.Map;
024
025 /**
026 * For test view purposes only
027 *
028 * @author Kuali Rice Team (rice.collab@kuali.org)
029 */
030 public class UITestObject implements Serializable {
031 private static final long serialVersionUID = -7525378097732916411L;
032
033 private String field1;
034 private String field2;
035 private String field3;
036 private String field4;
037 private boolean bfield;
038 private List<String> stringList = Arrays.asList("String1", "String2", "String3");
039
040 private Map<String, Object> remoteFieldValuesMap;
041
042 private List<UITestObject> subList = new ArrayList<UITestObject>();
043
044 public UITestObject() {
045 remoteFieldValuesMap = new HashMap<String, Object>();
046 remoteFieldValuesMap.put("remoteField1", "Apple");
047 remoteFieldValuesMap.put("remoteField2", "Banana");
048 remoteFieldValuesMap.put("remoteField3", true);
049 remoteFieldValuesMap.put("remoteField4", "Fruit");
050 }
051
052 public UITestObject(String field1, String field2, String field3, String field4) {
053 this.field1 = field1;
054 this.field2 = field2;
055 this.field3 = field3;
056 this.field4 = field4;
057
058 remoteFieldValuesMap = new HashMap<String, Object>();
059 remoteFieldValuesMap.put("remoteField1", "Apple");
060 remoteFieldValuesMap.put("remoteField2", "Banana");
061 remoteFieldValuesMap.put("remoteField3", true);
062 remoteFieldValuesMap.put("remoteField4", "Fruit");
063
064 }
065
066 /**
067 * @return the field1
068 */
069 public String getField1() {
070 return this.field1;
071 }
072
073 /**
074 * @param field1 the field1 to set
075 */
076 public void setField1(String field1) {
077 this.field1 = field1;
078 }
079
080 /**
081 * @return the field2
082 */
083 public String getField2() {
084 return this.field2;
085 }
086
087 /**
088 * @param field2 the field2 to set
089 */
090 public void setField2(String field2) {
091 this.field2 = field2;
092 }
093
094 /**
095 * @return the field3
096 */
097 public String getField3() {
098 return this.field3;
099 }
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 }