|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.itracker.services.implementations.IssueServiceImpl
public class IssueServiceImpl
Issue related service layer. A bit "fat" at this time, because of being a direct EJB porting. Going go get thinner over time
| Constructor Summary | |
|---|---|
IssueServiceImpl(UserDAO userDAO,
ProjectDAO projectDAO,
IssueDAO issueDAO,
IssueHistoryDAO issueHistoryDAO,
IssueRelationDAO issueRelationDAO,
IssueAttachmentDAO issueAttachmentDAO,
ComponentDAO componentDAO,
IssueActivityDAO issueActivityDAO,
VersionDAO versionDAO,
CustomFieldDAO customFieldDAO,
NotificationService notificationService)
|
|
| Method Summary | |
|---|---|
boolean |
addIssueAttachment(IssueAttachment attachment,
byte[] data)
Adds an attachment to an issue |
boolean |
addIssueHistory(IssueHistory history)
this should not exist. |
boolean |
addIssueRelation(Integer issueId,
Integer relatedIssueId,
int relationType,
Integer userId)
add a relation between two issues. |
boolean |
assignIssue(Integer issueId,
Integer userId)
|
boolean |
assignIssue(Integer issueId,
Integer userId,
Integer assignedByUserId)
only use for updating issue from actions.. |
boolean |
canViewIssue(Integer issueId,
User user)
|
boolean |
canViewIssue(Issue issue,
User user)
|
Issue |
createIssue(Issue issue,
Integer projectId,
Integer userId,
Integer createdById)
Creates a new issue in a project. |
Long |
getAllIssueAttachmentCount()
|
List<IssueAttachment> |
getAllIssueAttachments()
Deprecated. do not use this due to expensive memory use! use explicit hsqldb queries instead. |
Long |
getAllIssueAttachmentSize()
get total size of all attachments in database |
List<Issue> |
getAllIssues()
Deprecated. don't use to expensive memory use! |
Issue |
getIssue(Integer issueId)
|
List<IssueActivity> |
getIssueActivity(Integer issueId)
|
List<IssueActivity> |
getIssueActivity(Integer issueId,
boolean notificationSent)
TODO move to NotificationService ? |
IssueAttachment |
getIssueAttachment(Integer attachmentId)
|
int |
getIssueAttachmentCount(Integer issueId)
|
byte[] |
getIssueAttachmentData(Integer attachmentId)
Returns the binary data for an attachment. |
List<IssueAttachment> |
getIssueAttachments(Integer issueId)
|
HashSet<Integer> |
getIssueComponentIds(Integer issueId)
|
List<Component> |
getIssueComponents(Integer issueId)
|
User |
getIssueCreator(Integer issueId)
|
List<IssueHistory> |
getIssueHistory(Integer issueId)
Old implementation is left here, commented, because it checked for history entry status. |
User |
getIssueOwner(Integer issueId)
|
Project |
getIssueProject(Integer issueId)
|
IssueRelation |
getIssueRelation(Integer relationId)
|
List<Issue> |
getIssuesByProjectId(Integer projectId)
|
List<Issue> |
getIssuesByProjectId(Integer projectId,
int status)
|
List<Issue> |
getIssuesCreatedByUser(Integer userId)
|
List<Issue> |
getIssuesCreatedByUser(Integer userId,
boolean availableProjectsOnly)
|
List<Issue> |
getIssuesOwnedByUser(Integer userId)
|
List<Issue> |
getIssuesOwnedByUser(Integer userId,
boolean availableProjectsOnly)
|
List<Issue> |
getIssuesWatchedByUser(Integer userId)
|
List<Issue> |
getIssuesWatchedByUser(Integer userId,
boolean availableProjectsOnly)
TODO move to NotificationService |
List<Issue> |
getIssuesWithSeverity(int severity)
Returns all issues with a severity equal to the given severity number |
List<Issue> |
getIssuesWithStatus(int status)
Returns all issues with a status equal to the given status number |
List<Issue> |
getIssuesWithStatusLessThan(int status)
Returns all issues with a status less than the given status number |
HashSet<Integer> |
getIssueVersionIds(Integer issueId)
|
List<Version> |
getIssueVersions(Integer issueId)
|
IssueHistory |
getLastIssueHistory(Integer issueId)
Returns the latest issue history entry for a particular issue. |
Date |
getLatestIssueDateByProjectId(Integer projectId)
|
Long |
getNumberIssues()
Added implementation to make proper count of ALL issues, instead select them in a list and return its size |
int |
getOpenIssueCountByProjectId(Integer projectId)
|
int |
getResolvedIssueCountByProjectId(Integer projectId)
|
int |
getTotalIssueCountByProjectId(Integer projectId)
|
List<Issue> |
getUnassignedIssues()
|
List<Issue> |
getUnassignedIssues(boolean availableProjectsOnly)
|
Issue |
moveIssue(Issue issue,
Integer projectId,
Integer userId)
Moves an issues from its current project to a new project. |
boolean |
removeIssueAttachment(Integer attachmentId)
Removes a attachement (deletes it) |
Integer |
removeIssueHistoryEntry(Integer entryId,
Integer userId)
|
void |
removeIssueRelation(Integer relationId,
Integer userId)
|
List<Issue> |
searchIssues(IssueSearchQuery queryModel,
User user,
Map<Integer,Set<PermissionType>> userPermissions)
|
boolean |
setIssueAttachmentData(Integer attachmentId,
byte[] data)
Updates the binary data of the attachment stored in the database. |
boolean |
setIssueAttachmentData(String fileName,
byte[] data)
Updates the binary data of the attachment stored in the database. |
boolean |
setIssueComponents(Integer issueId,
HashSet<Integer> componentIds,
Integer userId)
|
boolean |
setIssueFields(Integer issueId,
List<IssueField> fields)
TODO maybe it has no use at all. |
boolean |
setIssueVersions(Integer issueId,
HashSet<Integer> versionIds,
Integer userId)
|
Issue |
systemUpdateIssue(Issue updateissue,
Integer userId)
System-Update an issue, adds the action to the issue and updates the issue |
Long |
totalSystemIssuesAttachmentSize()
|
Issue |
updateIssue(Issue issueDirty,
Integer userId)
Save a modified issue to the persistence layer |
void |
updateIssueActivityNotification(Integer issueId,
boolean notificationSent)
I think this entire method is useless - RJST TODO move to NotificationService |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IssueServiceImpl(UserDAO userDAO,
ProjectDAO projectDAO,
IssueDAO issueDAO,
IssueHistoryDAO issueHistoryDAO,
IssueRelationDAO issueRelationDAO,
IssueAttachmentDAO issueAttachmentDAO,
ComponentDAO componentDAO,
IssueActivityDAO issueActivityDAO,
VersionDAO versionDAO,
CustomFieldDAO customFieldDAO,
NotificationService notificationService)
| Method Detail |
|---|
public Issue getIssue(Integer issueId)
getIssue in interface IssueServicepublic List<Issue> getAllIssues()
getAllIssues in interface IssueServicepublic Long getNumberIssues()
getNumberIssues in interface IssueServicepublic List<Issue> getIssuesCreatedByUser(Integer userId)
getIssuesCreatedByUser in interface IssueService
public List<Issue> getIssuesCreatedByUser(Integer userId,
boolean availableProjectsOnly)
getIssuesCreatedByUser in interface IssueServicepublic List<Issue> getIssuesOwnedByUser(Integer userId)
getIssuesOwnedByUser in interface IssueService
public List<Issue> getIssuesOwnedByUser(Integer userId,
boolean availableProjectsOnly)
getIssuesOwnedByUser in interface IssueServicepublic List<Issue> getIssuesWatchedByUser(Integer userId)
getIssuesWatchedByUser in interface IssueService
public List<Issue> getIssuesWatchedByUser(Integer userId,
boolean availableProjectsOnly)
NotificationService
getIssuesWatchedByUser in interface IssueServicepublic List<Issue> getUnassignedIssues()
getUnassignedIssues in interface IssueServicepublic List<Issue> getUnassignedIssues(boolean availableProjectsOnly)
getUnassignedIssues in interface IssueServicepublic List<Issue> getIssuesWithStatus(int status)
getIssuesWithStatus in interface IssueServicestatus - the status to compare
public List<Issue> getIssuesWithStatusLessThan(int status)
getIssuesWithStatusLessThan in interface IssueServicestatus - the status to compare
public List<Issue> getIssuesWithSeverity(int severity)
getIssuesWithSeverity in interface IssueServiceseverity - the severity to compare
public List<Issue> getIssuesByProjectId(Integer projectId)
getIssuesByProjectId in interface IssueService
public List<Issue> getIssuesByProjectId(Integer projectId,
int status)
getIssuesByProjectId in interface IssueServicepublic User getIssueCreator(Integer issueId)
getIssueCreator in interface IssueServicepublic User getIssueOwner(Integer issueId)
getIssueOwner in interface IssueServicepublic List<Component> getIssueComponents(Integer issueId)
getIssueComponents in interface IssueServicepublic List<Version> getIssueVersions(Integer issueId)
getIssueVersions in interface IssueServicepublic List<IssueAttachment> getIssueAttachments(Integer issueId)
getIssueAttachments in interface IssueServicepublic List<IssueHistory> getIssueHistory(Integer issueId)
getIssueHistory in interface IssueService
public Issue createIssue(Issue issue,
Integer projectId,
Integer userId,
Integer createdById)
throws ProjectException
IssueService
createIssue in interface IssueServiceprojectId - the projectId the issue belongs touserId - the id of registered creator of the new issuecreatedById - the id of the actual creator of the issue. This would normally be the same as the userId.
ProjectException
public Issue updateIssue(Issue issueDirty,
Integer userId)
throws ProjectException
updateIssue in interface IssueServiceissueDirty - the changed, unsaved issue to update on persistency layeruserId - the user-id of the changer
ProjectException
public Issue moveIssue(Issue issue,
Integer projectId,
Integer userId)
moveIssue in interface IssueServiceissue - an Issue of the issue to moveprojectId - the id of the target projectuserId - the id of the user that is moving the issue
public boolean addIssueHistory(IssueHistory history)
addIssueHistory in interface IssueService
public boolean setIssueFields(Integer issueId,
List<IssueField> fields)
setIssueFields in interface IssueService
public boolean setIssueComponents(Integer issueId,
HashSet<Integer> componentIds,
Integer userId)
setIssueComponents in interface IssueService
public boolean setIssueVersions(Integer issueId,
HashSet<Integer> versionIds,
Integer userId)
setIssueVersions in interface IssueServicepublic IssueRelation getIssueRelation(Integer relationId)
getIssueRelation in interface IssueService
public boolean addIssueRelation(Integer issueId,
Integer relatedIssueId,
int relationType,
Integer userId)
addIssueRelation in interface IssueService
public void removeIssueRelation(Integer relationId,
Integer userId)
removeIssueRelation in interface IssueService
public boolean assignIssue(Integer issueId,
Integer userId)
assignIssue in interface IssueService
public boolean assignIssue(Integer issueId,
Integer userId,
Integer assignedByUserId)
assignIssue in interface IssueService
public Issue systemUpdateIssue(Issue updateissue,
Integer userId)
throws ProjectException
systemUpdateIssue in interface IssueServiceProjectException
public void updateIssueActivityNotification(Integer issueId,
boolean notificationSent)
NotificationService
model - issue - user -
public boolean addIssueAttachment(IssueAttachment attachment,
byte[] data)
addIssueAttachment in interface IssueServicemodel - The attachment datadata - The byte data
public boolean setIssueAttachmentData(Integer attachmentId,
byte[] data)
IssueService
setIssueAttachmentData in interface IssueServiceattachmentId - the id of the attachment to updatedata - a byte arrray of the binary data for the attachment
public boolean setIssueAttachmentData(String fileName,
byte[] data)
IssueService
setIssueAttachmentData in interface IssueServicefileName - the filename listed in the database for the localtion of the attachment.
This is the name that was previously used to store the data on the
filesystem, not the original filename of the attachment.data - a byte arrray of the binary data for the attachment
public boolean removeIssueAttachment(Integer attachmentId)
removeIssueAttachment in interface IssueServiceattachmentId - the id of the IssueAttachmentBean
public Integer removeIssueHistoryEntry(Integer entryId,
Integer userId)
removeIssueHistoryEntry in interface IssueServicepublic Project getIssueProject(Integer issueId)
getIssueProject in interface IssueServicepublic HashSet<Integer> getIssueComponentIds(Integer issueId)
getIssueComponentIds in interface IssueServicepublic HashSet<Integer> getIssueVersionIds(Integer issueId)
getIssueVersionIds in interface IssueServicepublic List<IssueActivity> getIssueActivity(Integer issueId)
getIssueActivity in interface IssueService
public List<IssueActivity> getIssueActivity(Integer issueId,
boolean notificationSent)
NotificationService ?
getIssueActivity in interface IssueServicepublic Long getAllIssueAttachmentCount()
getAllIssueAttachmentCount in interface IssueServicepublic List<IssueAttachment> getAllIssueAttachments()
getAllIssueAttachments in interface IssueServicepublic IssueAttachment getIssueAttachment(Integer attachmentId)
getIssueAttachment in interface IssueServicepublic byte[] getIssueAttachmentData(Integer attachmentId)
IssueService
getIssueAttachmentData in interface IssueServiceattachmentId - the id of the attachment to obtain the data for
public int getIssueAttachmentCount(Integer issueId)
getIssueAttachmentCount in interface IssueServicepublic IssueHistory getLastIssueHistory(Integer issueId)
getLastIssueHistory in interface IssueServiceissueId - the id of the issue to return the history entry for.
public int getOpenIssueCountByProjectId(Integer projectId)
getOpenIssueCountByProjectId in interface IssueServicepublic int getResolvedIssueCountByProjectId(Integer projectId)
getResolvedIssueCountByProjectId in interface IssueServicepublic int getTotalIssueCountByProjectId(Integer projectId)
getTotalIssueCountByProjectId in interface IssueServicepublic Date getLatestIssueDateByProjectId(Integer projectId)
getLatestIssueDateByProjectId in interface IssueService
public boolean canViewIssue(Integer issueId,
User user)
canViewIssue in interface IssueService
public boolean canViewIssue(Issue issue,
User user)
canViewIssue in interface IssueServicepublic Long getAllIssueAttachmentSize()
getAllIssueAttachmentSize in interface IssueService
public List<Issue> searchIssues(IssueSearchQuery queryModel,
User user,
Map<Integer,Set<PermissionType>> userPermissions)
throws IssueSearchException
searchIssues in interface IssueServiceIssueSearchExceptionpublic Long totalSystemIssuesAttachmentSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||