1 19 20 package za.org.coefficient.modules.issueTracker; 21 22 import za.org.coefficient.authentication.CoefficientUser; 23 import za.org.coefficient.core.Project; 24 import za.org.coefficient.modules.issueTracker.DiscussionData; 25 import za.org.coefficient.modules.vote.VoteData; 26 import za.org.coefficient.modules.fileUpload.ProjectFolderItem; 27 28 import java.util.Date ; 29 import java.util.List ; 30 import java.util.ArrayList ; 31 import java.util.Map ; 32 import java.util.HashMap ; 33 34 38 public class IssueData implements java.io.Serializable { 39 41 private CoefficientUser author; 42 private CoefficientUser assignedTo; 43 private DiscussionData discussion; 44 private ProjectFolderItem uploads; 45 private VoteData vote; 46 private Date createDate; 47 private Date updatedDate; 48 private Date taskStartDate; 49 private Date taskEndDate; 50 private List issueComponents = new ArrayList (); 51 private List affectedVersions = new ArrayList (); 52 private List fixVersions = new ArrayList (); 53 private List watchers = new ArrayList (); 54 private Map duplicates = new HashMap (); 55 private Map duplicatedBy = new HashMap (); 56 private Map incorporates = new HashMap (); 57 private Map partOf = new HashMap (); 58 private Map relatesTo = new HashMap (); 59 private Map relatedTo = new HashMap (); 60 private Long id; 61 private Project project; 62 private String environment; 63 private String priority; 64 private String summary; 65 private String type; 66 private String status; 67 private String resolution; 68 private int percentComplete; 69 private boolean completed; 70 private int taskEstimatedHours; 71 72 74 public IssueData() { 75 createDate = new Date (System.currentTimeMillis()); 76 completed = false; 77 percentComplete = IssueTracker.PERCENT_COMPLETE_START; 78 } 79 80 82 public void setAuthor(CoefficientUser author) { 83 this.author = author; 84 } 85 86 93 public CoefficientUser getAuthor() { 94 return this.author; 95 } 96 97 public void setAssignedTo(CoefficientUser assignedTo) { 98 this.assignedTo = assignedTo; 99 } 100 101 108 public CoefficientUser getAssignedTo() { 109 return this.assignedTo; 110 } 111 112 117 public void setCreateDate(Date argCreateDate) { 118 this.createDate = argCreateDate; 119 } 120 121 128 public Date getCreateDate() { 129 return this.createDate; 130 } 131 132 137 public void setTaskStartDate(Date argTaskStartDate) { 138 this.taskStartDate = argTaskStartDate; 139 } 140 141 148 public Date getTaskStartDate() { 149 return this.taskStartDate; 150 } 151 152 157 public void setTaskEndDate(Date argTaskEndDate) { 158 this.taskEndDate = argTaskEndDate; 159 } 160 161 168 public Date getTaskEndDate() { 169 return this.taskEndDate; 170 } 171 172 177 public void setUpdatedDate(Date argUpdatedDate) { 178 this.updatedDate = argUpdatedDate; 179 } 180 181 188 public Date getUpdatedDate() { 189 return this.updatedDate; 190 } 191 192 197 public void setEnvironment(String environment) { 198 this.environment = environment; 199 } 200 201 209 public String getEnvironment() { 210 return this.environment; 211 } 212 213 218 public void setPriority(String priority) { 219 this.priority = priority; 220 } 221 222 229 public String getPriority() { 230 return this.priority; 231 } 232 233 238 public void setResolution(String resolution) { 239 this.resolution = resolution; 240 } 241 242 249 public String getResolution() { 250 return this.resolution; 251 } 252 253 258 public void setPercentComplete(int percentComplete) { 259 this.percentComplete = percentComplete; 260 if(this.percentComplete == IssueTracker.PERCENT_COMPLETE_FINISHED) { 261 completed = true; 262 } else { 263 completed = false; 264 } 265 } 266 267 274 public int getPercentComplete() { 275 return this.percentComplete; 276 } 277 278 283 public void setStatus(String status) { 284 if (IssueTracker.STATUS_CLOSED.equals(status)) { 285 percentComplete = IssueTracker.PERCENT_COMPLETE_FINISHED; 286 completed = true; 287 } else { 288 completed = false; 289 } 290 this.status = status; 291 } 292 293 300 public String getStatus() { 301 return this.status; 302 } 303 304 312 public boolean getCompleted() { 313 return this.completed; 314 } 315 316 321 public void setCompleted(boolean completed){ 322 this.completed = completed; 323 } 324 325 330 public void setId(Long argId) { 331 this.id = argId; 332 } 333 334 341 public Long getId() { 342 return this.id; 343 } 344 345 350 public void setProject(Project project) { 351 this.project = project; 352 } 353 354 361 public Project getProject() { 362 return this.project; 363 } 364 365 370 public void setSummary(String summary) { 371 this.summary = summary; 372 } 373 374 381 public String getSummary() { 382 return this.summary; 383 } 384 385 390 public void setType(String type) { 391 this.type = type; 392 } 393 394 401 public String getType() { 402 return this.type; 403 } 404 405 406 411 public void setIssueComponents(List issueComponents) { 412 this.issueComponents = issueComponents; 413 } 414 415 430 public List getIssueComponents() { 431 return this.issueComponents; 432 } 433 434 439 public void setAffectedVersions(List affectedVersions) { 440 this.affectedVersions = affectedVersions; 441 } 442 443 458 public List getAffectedVersions() { 459 return this.affectedVersions; 460 } 461 462 467 public void setFixVersions(List fixVersions) { 468 this.fixVersions = fixVersions; 469 } 470 471 486 public List getFixVersions() { 487 return this.fixVersions; 488 } 489 490 495 public void setDiscussion(DiscussionData discussion) { 496 this.discussion = discussion; 497 } 498 499 506 public DiscussionData getDiscussion() { 507 return this.discussion; 508 } 509 510 515 public void setUploads(ProjectFolderItem uploads) { 516 this.uploads = uploads; 517 } 518 519 526 public ProjectFolderItem getUploads() { 527 return this.uploads; 528 } 529 530 535 public void setVote(VoteData vote) { 536 this.vote = vote; 537 } 538 539 546 public VoteData getVote() { 547 return this.vote; 548 } 549 550 555 public void setWatchers(List argWatchers) { 556 this.watchers = argWatchers; 557 } 558 559 573 public List getWatchers() { 574 return this.watchers; 575 } 576 577 public void addWatcher(CoefficientUser user) { 578 this.watchers.add(user); 579 } 580 581 public void removeWatcher(CoefficientUser user) { 582 int idx = this.watchers.indexOf(user); 583 if (idx != -1) { 584 this.watchers.remove(idx); 585 } 586 } 587 588 593 public void setDuplicates(Map argDuplicates) { 594 this.duplicates = argDuplicates; 595 } 596 597 613 public Map getDuplicates() { 614 return this.duplicates; 615 } 616 617 public void addDuplicates(Long id, String desc){ 618 this.duplicates.put(id, desc); 619 } 620 621 public void removeDuplicates(Long id) { 622 this.duplicates.remove(id); 623 } 624 625 630 public void setDuplicatedBy(Map argDuplicatedBy) { 631 this.duplicatedBy = argDuplicatedBy; 632 } 633 634 650 public Map getDuplicatedBy() { 651 return this.duplicatedBy; 652 } 653 654 public void addDuplicatedBy(Long id, String desc){ 655 this.duplicatedBy.put(id, desc); 656 } 657 658 public void removeDuplicatedBy(Long id) { 659 this.duplicatedBy.remove(id); 660 } 661 662 667 public void setIncorporates(Map argIncorporates) { 668 this.incorporates = argIncorporates; 669 } 670 671 687 public Map getIncorporates() { 688 return this.incorporates; 689 } 690 691 public void addIncorporates(Long id, String desc){ 692 this.incorporates.put(id, desc); 693 } 694 695 public void removeIncorporates(Long id) { 696 this.incorporates.remove(id); 697 } 698 699 704 public void setPartOf(Map argPartOf) { 705 this.partOf = argPartOf; 706 } 707 708 724 public Map getPartOf() { 725 return this.partOf; 726 } 727 728 public void addPartOf(Long id, String desc){ 729 this.partOf.put(id, desc); 730 } 731 732 public void removePartOf(Long id) { 733 this.partOf.remove(id); 734 } 735 736 741 public void setRelatesTo(Map argRelatesTo) { 742 this.relatesTo = argRelatesTo; 743 } 744 745 761 public Map getRelatesTo() { 762 return this.relatesTo; 763 } 764 765 public void addRelatesTo(Long id, String desc){ 766 this.relatesTo.put(id, desc); 767 } 768 769 public void removeRelatesTo(Long id) { 770 this.relatesTo.remove(id); 771 } 772 773 778 public void setRelatedTo(Map argRelatedTo) { 779 this.relatedTo = argRelatedTo; 780 } 781 782 798 public Map getRelatedTo() { 799 return this.relatedTo; 800 } 801 802 public void addRelatedTo(Long id, String desc){ 803 this.relatedTo.put(id, desc); 804 } 805 806 public void removeRelatedTo(Long id) { 807 this.relatedTo.remove(id); 808 } 809 810 817 public int getTaskEstimatedHours() { 818 return this.taskEstimatedHours; 819 } 820 821 826 public void setTaskEstimatedHours(int argTaskEstimatedHours){ 827 this.taskEstimatedHours = argTaskEstimatedHours; 828 } 829 } 830 | Popular Tags |