1 18 19 package cowsultants.itracker.ejb.client.interfaces; 20 21 import java.util.*; 22 import javax.ejb.EJBLocalObject ; 23 24 import cowsultants.itracker.ejb.client.models.*; 25 26 public interface IssueHandler extends EJBLocalObject { 27 public static final String JNDI_NAME = "ejb/IssueHandler"; 28 29 public IssueModel getIssue(Integer issueId); 30 public IssueModel[] getAllIssues(); 31 public int getNumberIssues(); 32 37 public IssueModel[] getIssuesWithStatus(int status); 38 44 public IssueModel[] getIssuesWithStatusLessThan(int status); 45 50 public IssueModel[] getIssuesWithSeverity(int severity); 51 public IssueModel[] getIssuesByProjectId(Integer projectId); 52 public IssueModel[] getIssuesByProjectId(Integer projectId, int status); 53 public IssueModel[] getIssuesCreatedByUser(Integer userId); 54 public IssueModel[] getIssuesCreatedByUser(Integer userId, boolean availableProjectsOnly); 55 public IssueModel[] getIssuesOwnedByUser(Integer userId); 56 public IssueModel[] getIssuesOwnedByUser(Integer userId, boolean availableProjectsOnly); 57 public IssueModel[] getIssuesWatchedByUser(Integer userId); 58 public IssueModel[] getIssuesWatchedByUser(Integer userId, boolean availableProjectsOnly); 59 public IssueModel[] getUnassignedIssues(); 60 public IssueModel[] getUnassignedIssues(boolean availableProjectsOnly); 61 69 public IssueModel createIssue(IssueModel model, Integer projectId, Integer userId, Integer createdById); 70 public IssueModel updateIssue(IssueModel model, Integer userId); 71 78 public IssueModel moveIssue(IssueModel model, Integer projectId, Integer userId); 79 public boolean deleteIssue(IssueModel model); 80 81 public boolean assignIssue(Integer issueId, Integer userId); 82 public boolean assignIssue(Integer issueId, Integer userId, Integer assignedByUserId); 83 public boolean setIssueFields(Integer issueId, IssueFieldModel[] fields); 84 public boolean setIssueComponents(Integer issueId, HashSet componentIds, Integer userId); 85 public boolean setIssueVersions(Integer issueId, HashSet versionIds, Integer userId); 86 public boolean addIssueHistory(IssueHistoryModel model); 87 public boolean addIssueActivity(IssueActivityModel model); 88 public void updateIssueActivityNotification(Integer issueId, boolean notificationSent); 89 public boolean addIssueAttachment(IssueAttachmentModel model, byte[] data); 90 96 public boolean setIssueAttachmentData(Integer attachmentId, byte[] data); 97 107 public boolean setIssueAttachmentData(String fileName, byte[] data); 108 public boolean addIssueNotification(NotificationModel model); 109 public boolean removeIssueAttachment(Integer attachmentId); 110 111 public Integer removeIssueHistoryEntry(Integer entryId, Integer userId); 112 113 public ProjectModel getIssueProject(Integer issueId); 114 public ComponentModel[] getIssueComponents(Integer issueId); 115 public HashSet getIssueComponentIds(Integer issueId); 116 public VersionModel[] getIssueVersions(Integer issueId); 117 public HashSet getIssueVersionIds(Integer issueId); 118 public UserModel getIssueCreator(Integer issueId); 119 public UserModel getIssueOwner(Integer issueId); 120 121 public IssueActivityModel[] getIssueActivity(Integer issueId); 122 public IssueActivityModel[] getIssueActivity(Integer issueId, boolean notificationSent); 123 public IssueAttachmentModel[] getAllIssueAttachments(); 124 public long[] getAllIssueAttachmentsSizeAndCount(); 125 public IssueAttachmentModel getIssueAttachment(Integer attachmentId); 126 131 public byte[] getIssueAttachmentData(Integer attachmentId); 132 public IssueAttachmentModel[] getIssueAttachments(Integer issueId); 133 public int getIssueAttachmentCount(Integer issueId); 134 139 public IssueHistoryModel getLastIssueHistory(Integer issueId); 140 public IssueHistoryModel[] getIssueHistory(Integer issueId); 141 142 150 public NotificationModel[] getPrimaryIssueNotifications(Integer issueId); 151 156 public NotificationModel[] getIssueNotifications(Integer issueId); 157 167 public NotificationModel[] getIssueNotifications(Integer issueId, boolean primaryOnly, boolean activeOnly); 168 public boolean hasIssueNotification(Integer issueId, Integer userId); 169 public void sendNotification(Integer issueId, int type, String baseURL); 170 public void sendNotification(Integer issueId, int type, String baseURL, HashSet addresses, Integer lastModifiedDays); 171 172 public int getOpenIssueCountByProjectId(Integer projectId); 173 public int getResolvedIssueCountByProjectId(Integer projectId); 174 public int getTotalIssueCountByProjectId(Integer projectId); 175 public Date getLatestIssueDateByProjectId(Integer projectId); 176 177 public boolean canViewIssue(Integer issueId, UserModel user); 178 public boolean canViewIssue(IssueModel issue, UserModel user); 179 } | Popular Tags |