1 package org.tigris.scarab.util.xmlissues; 2 3 48 49 public class XmlActivity implements java.io.Serializable 50 { 51 private String id = null; 52 private String attribute = null; 53 private String oldNumericValue = null; 54 private String newNumericValue = null; 55 private String oldUser = null; 56 private String newUser = null; 57 private String oldOption = null; 58 private String newOption = null; 59 private String oldValue = null; 60 private String newValue = null; 61 private Dependency dependency = null; 62 private String description = null; 63 private EndDate endDate = null; 64 private XmlAttachment attachment = null; 65 66 private boolean isNewActivity = true; 67 68 public XmlActivity() 69 { 70 } 71 72 public boolean isNewActivity() 73 { 74 return isNewActivity; 75 } 76 77 public boolean isRemoveUserActivity() 78 { 79 return (getNewUser() == null && getOldUser() != null); 80 } 81 82 public boolean isAddDependency() 83 { 84 return (getDependency() != null && 85 getOldValue() == null && 86 getNewValue() != null); 87 } 88 89 public boolean isDeleteDependency() 90 { 91 return (getDependency() != null && 92 getOldValue() != null && 93 getNewValue() == null); 94 } 95 96 public boolean isUpdateDependency() 97 { 98 return (getDependency() != null && 99 getOldValue() != null && 100 getNewValue() != null); 101 } 102 103 public String getId() 104 { 105 return id; 106 } 107 108 public void setId(String id) 109 { 110 this.id = id; 111 } 112 113 public void setAttribute(String attribute) 114 { 115 this.attribute = attribute; 116 } 117 118 public String getAttribute() 119 { 120 return this.attribute; 121 } 122 123 public void setOldNumericValue(String oldNumericValue) 124 { 125 this.oldNumericValue = oldNumericValue; 126 isNewActivity = false; 127 } 128 129 public String getOldNumericValue() 130 { 131 return this.oldNumericValue; 132 } 133 134 public void setNewNumericValue(String newNumericValue) 135 { 136 this.newNumericValue = newNumericValue; 137 } 138 139 public String getNewNumericValue() 140 { 141 return this.newNumericValue; 142 } 143 144 public void setOldUser(String oldUser) 145 { 146 this.oldUser = oldUser; 147 isNewActivity = false; 148 } 149 150 public String getOldUser() 151 { 152 return this.oldUser; 153 } 154 155 public void setNewUser(String newUser) 156 { 157 this.newUser = newUser; 158 } 159 160 public String getNewUser() 161 { 162 return this.newUser; 163 } 164 165 public void setOldOption(String oldOption) 166 { 167 this.oldOption = oldOption; 168 isNewActivity = false; 169 } 170 171 public String getOldOption() 172 { 173 return this.oldOption; 174 } 175 176 public void setNewOption(String newOption) 177 { 178 this.newOption = newOption; 179 } 180 181 public String getNewOption() 182 { 183 return this.newOption; 184 } 185 186 public void setOldValue(String oldValue) 187 { 188 this.oldValue = oldValue; 189 isNewActivity = false; 190 } 191 192 public String getOldValue() 193 { 194 return this.oldValue; 195 } 196 197 public void setNewValue(String newValue) 198 { 199 this.newValue = newValue; 200 } 201 202 public String getNewValue() 203 { 204 return this.newValue; 205 } 206 207 public Dependency getDependency() 208 { 209 return dependency; 210 } 211 212 public void setDependency(Dependency name) 213 { 214 this.dependency = name; 215 isNewActivity = true; 216 } 217 218 public void setDescription(String description) 219 { 220 this.description = description; 221 } 222 223 public String getDescription() 224 { 225 return this.description; 226 } 227 228 public EndDate getEndDate() 229 { 230 return endDate; 231 } 232 233 public void setEndDate(EndDate endDate) 234 { 235 this.endDate = endDate; 236 } 237 238 public void setAttachment(XmlAttachment attachment) 239 { 240 this.attachment = attachment; 241 } 242 243 public XmlAttachment getAttachment() 244 { 245 return this.attachment; 246 } 247 248 public String toString() 249 { 250 return ("Activity Id: " + id); 251 } 252 } 253 | Popular Tags |