1 19 20 package org.netbeans.modules.tasklist.bugs; 21 22 import java.util.Date ; 23 24 import org.netbeans.modules.tasklist.core.Task; 25 import org.openide.nodes.Node; 26 27 28 30 36 public final class Bug extends Task { 37 private BugEngine engine = null; 38 39 private String id = ""; 41 private String synopsis = ""; 42 private int priority; 43 private String type = ""; 44 private String component = ""; 45 private String subcomponent = ""; 46 private Date created = null; 47 private String keywords = ""; 48 private String assignedto = ""; 49 private String reportedby = ""; 50 private String status = ""; 51 private String target = ""; 52 private int votes = 0; 53 55 56 public Bug() { 57 } 58 59 public Bug(String id, 60 String synopsis, 61 int priority, 62 String type, 63 String component, 64 String subcomponent, 65 Date created, 66 String keywords, 67 String assignedto, 68 String reportedby, 69 String status, 70 String target, 71 int votes) { 72 super(id, null); 73 this.id = id; 74 this.synopsis = synopsis; 75 this.priority = priority; 76 this.type = type; 77 this.component = component; 78 this.subcomponent = subcomponent; 79 this.created = created; 80 this.keywords = keywords; 81 this.assignedto = assignedto; 82 this.reportedby = reportedby; 83 this.status = status; 84 this.target = target; 85 this.votes = votes; 86 87 setSummary(id + ": " + synopsis); } 89 90 98 public int getPriorityNumber() { 99 return priority; 100 } 101 102 public void setPriorityNumber(int priority) { 103 this.priority = priority; 104 } 105 106 111 public String getId() { 112 return id; 113 } 114 115 public void setId(String id) { 116 this.id = id; 117 } 118 119 120 125 public String getSynopsis() { 126 return synopsis; 127 } 128 129 public void setSynopsis(String synopsis) { 130 this.synopsis = synopsis; 131 } 132 133 136 public String getComponent() { 137 return component; 138 } 139 140 public void setComponent(String component) { 141 this.component = component; 142 } 143 144 145 148 public String getSubComponent() { 149 return subcomponent; 150 } 151 152 public void setSubComponent(String subcomponent) { 153 this.subcomponent = subcomponent; 154 } 155 156 157 160 public Date getCreated() { 161 return created; 162 } 163 164 public void setCreated(Date created) { 165 this.created = created; 166 } 167 168 169 172 public String getKeywords() { 173 return keywords; 174 } 175 176 public void setKeywords(String keywords) { 177 this.keywords = keywords; 178 } 179 180 183 public String getAssignedTo() { 184 return assignedto; 185 } 186 187 public void setAssignedTo(String assignedto) { 188 this.assignedto = assignedto; 189 } 190 191 194 public String getReportedBy() { 195 return reportedby; 196 } 197 198 public void setReportedBy(String reportedby) { 199 this.reportedby = reportedby; 200 } 201 202 205 public String getStatus() { 206 return status; 207 } 208 209 public void setStatus(String status) { 210 this.status = status; 211 } 212 213 216 public String getTarget() { 217 return target; 218 } 219 220 public void setTarget(String target) { 221 this.target = target; 222 } 223 224 227 public String getType() { 228 return type; 229 } 230 231 public void setType(String type) { 232 this.type = type; 233 } 234 235 238 public int getVotes() { 239 return votes; 240 } 241 242 public void setVotes(int votes) { 243 this.votes = votes; 244 } 245 246 249 256 public String toString() { 257 return "Bug[\"" + id + "\", " + synopsis + ":" + priority + "]"; } 259 260 263 public Node[] createNode() { 264 if (hasSubtasks()) { 271 return new Node[]{ new BugNode(this, new BugNode.BugChildren(this))}; 272 } else { 273 return new Node[]{ new BugNode(this)}; 274 } 275 } 276 277 281 protected Object clone() { 282 Bug t = new Bug(); 283 t.copyFrom(this); 284 return t; 285 } 286 287 300 protected void copyFrom(Bug from) { 301 super.copyFrom(from); 302 303 engine = from.engine; 304 305 id = from.id; 306 synopsis = from.synopsis; 307 priority = from.priority; 308 type = from.type; 309 component = from.component; 310 subcomponent = from.subcomponent; 311 created = from.created; 312 keywords = from.keywords; 313 assignedto = from.assignedto; 314 reportedby = from.reportedby; 315 status = from.status; 316 target = from.target; 317 votes = from.votes; 318 } 319 320 323 void view() { 324 BugList list = (BugList) BugsView.getCurrent().getList(); 325 list.viewBug(this); 326 } 327 328 331 public void setEngine(BugEngine engine) { 332 this.engine = engine; 333 } 334 335 338 public BugEngine getEngine() { 339 return engine; 340 } 341 } 342 343 344 345 | Popular Tags |