Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. public class StoryImpl extends AdditionalItemsImpl implements Story {
  2. private SizeType sizeType;
  3. private StoryStatus status;
  4. private WorkItemType itemType;
  5.  
  6. public StoryImpl(String title, String description, PriorityType priorityType, String assignee,
  7. SizeType sizeType, StoryStatus status) {
  8. super(title, description, priorityType, assignee);
  9. setSizeType(sizeType);
  10. setStoryStatus(status);
  11. itemType = WorkItemType.STORY;
  12. }
  13.  
  14. public WorkItemType getWorkItemType(){
  15. return itemType;
  16. }
  17.  
  18. @Override
  19. public String additionalInfo() {
  20. return String.format("%s%n Size of the story: %s%n Story status: %s%n",
  21. super.additionalInfo(), getSizeType(), getStoryStatus());
  22. }
  23.  
  24. public void changeSize(SizeType newSizeType){
  25. setSizeType(newSizeType);
  26. }
  27.  
  28. public void changeStoryStatus(StoryStatus newStoryStatus){
  29. setStoryStatus(newStoryStatus);
  30. }
  31.  
  32. public SizeType getSizeType(){
  33. return sizeType;
  34. }
  35.  
  36. public StoryStatus getStoryStatus(){
  37. return status;
  38. }
  39.  
  40. private void setSizeType(SizeType sizeType){
  41. this.sizeType = sizeType;
  42. }
  43.  
  44. private void setStoryStatus(StoryStatus status){
  45. this.status = status;
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement