001 /**
002 * Copyright 2005-2012 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.HashMap;
021 import java.util.List;
022 import java.util.Map;
023
024 /**
025 * For test view purposes only
026 *
027 * @author Kuali Rice Team (rice.collab@kuali.org)
028 */
029 public class UITestObject implements Serializable {
030 private static final long serialVersionUID = -7525378097732916411L;
031
032 private String field1;
033 private String field2;
034 private String field3;
035 private String field4;
036 private boolean bfield;
037
038 private Map<String, Object> remoteFieldValuesMap;
039
040 private List<UITestObject> subList = new ArrayList<UITestObject>();
041
042 public UITestObject() {
043 remoteFieldValuesMap = new HashMap<String, Object>();
044 remoteFieldValuesMap.put("remoteField1", "Apple");
045 remoteFieldValuesMap.put("remoteField2", "Banana");
046 remoteFieldValuesMap.put("remoteField3", true);
047 remoteFieldValuesMap.put("remoteField4", "Fruit");
048 }
049
050 public UITestObject(String field1, String field2, String field3, String field4) {
051 this.field1 = field1;
052 this.field2 = field2;
053 this.field3 = field3;
054 this.field4 = field4;
055
056 remoteFieldValuesMap = new HashMap<String, Object>();
057 remoteFieldValuesMap.put("remoteField1", "Apple");
058 remoteFieldValuesMap.put("remoteField2", "Banana");
059 remoteFieldValuesMap.put("remoteField3", true);
060 remoteFieldValuesMap.put("remoteField4", "Fruit");
061
062 }
063
064 /**
065 * @return the field1
066 */
067 public String getField1() {
068 return this.field1;
069 }
070
071 /**
072 * @param field1 the field1 to set
073 */
074 public void setField1(String field1) {
075 this.field1 = field1;
076 }
077
078 /**
079 * @return the field2
080 */
081 public String getField2() {
082 return this.field2;
083 }
084
085 /**
086 * @param field2 the field2 to set
087 */
088 public void setField2(String field2) {
089 this.field2 = field2;
090 }
091
092 /**
093 * @return the field3
094 */
095 public String getField3() {
096 return this.field3;
097 }
098
099 /**
100 * @param field3 the field3 to set
101 */
102 public void setField3(String field3) {
103 this.field3 = field3;
104 }
105
106 /**
107 * @return the field4
108 */
109 public String getField4() {
110 return this.field4;
111 }
112
113 /**
114 * @param field4 the field4 to set
115 */
116 public void setField4(String field4) {
117 this.field4 = field4;
118 }
119
120 /**
121 * @param subList the subList to set
122 */
123 public void setSubList(List<UITestObject> subList) {
124 this.subList = subList;
125 }
126
127 /**
128 * @return the subList
129 */
130 public List<UITestObject> getSubList() {
131 return subList;
132 }
133
134 public Map<String, Object> getRemoteFieldValuesMap() {
135 return remoteFieldValuesMap;
136 }
137
138 public void setRemoteFieldValuesMap(Map<String, Object> remoteFieldValuesMap) {
139 this.remoteFieldValuesMap = remoteFieldValuesMap;
140 }
141
142 /**
143 * boolean field
144 *
145 * @return bField
146 */
147 public boolean isBfield() {
148 return bfield;
149 }
150
151 /**
152 * @param bfield boolean field
153 */
154 public void setBfield(boolean bfield) {
155 this.bfield = bfield;
156 }
157
158 @Override
159 public String toString() {
160
161 return "" + field1 + field2 + field3 + field4;
162 }
163 }