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 UITestObject innerObject; 041 042 private Map<String, Object> remoteFieldValuesMap; 043 044 private List<UITestObject> subList = new ArrayList<UITestObject>(); 045 046 public UITestObject() { 047 remoteFieldValuesMap = new HashMap<String, Object>(); 048 remoteFieldValuesMap.put("remoteField1", "Apple"); 049 remoteFieldValuesMap.put("remoteField2", "Banana"); 050 remoteFieldValuesMap.put("remoteField3", true); 051 remoteFieldValuesMap.put("remoteField4", "Fruit"); 052 } 053 054 public UITestObject(String field1, String field2, String field3, String field4) { 055 this.field1 = field1; 056 this.field2 = field2; 057 this.field3 = field3; 058 this.field4 = field4; 059 060 remoteFieldValuesMap = new HashMap<String, Object>(); 061 remoteFieldValuesMap.put("remoteField1", "Apple"); 062 remoteFieldValuesMap.put("remoteField2", "Banana"); 063 remoteFieldValuesMap.put("remoteField3", true); 064 remoteFieldValuesMap.put("remoteField4", "Fruit"); 065 066 } 067 068 public UITestObject(String field1, String field2, String field3, String field4, UITestObject innerObject) { 069 this(field1,field2,field3,field4); 070 071 this.innerObject = innerObject; 072 } 073 074 /** 075 * @return the field1 076 */ 077 public String getField1() { 078 return this.field1; 079 } 080 081 /** 082 * @param field1 the field1 to set 083 */ 084 public void setField1(String field1) { 085 this.field1 = field1; 086 } 087 088 /** 089 * @return the field2 090 */ 091 public String getField2() { 092 return this.field2; 093 } 094 095 /** 096 * @param field2 the field2 to set 097 */ 098 public void setField2(String field2) { 099 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 }