IssueService
public class IssueServiceImpl extends Object implements IssueService
Constructor | Description |
---|---|
IssueServiceImpl() |
Modifier and Type | Method | Description |
---|---|---|
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,
IssueRelation.Type 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() |
|
Long |
getAllIssueAttachmentSize() |
get total size of all attachments in database
|
List<Issue> |
getAllIssues() |
Deprecated.
don't use to expensive memory use!
|
ConfigurationService |
getConfigurationService() |
|
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) |
|
List<Issue> |
getNextIssues(Integer issueId) |
|
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) |
|
List<Issue> |
getPreviousIssues(Integer issueId) |
|
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) |
|
void |
setComponentDAO(ComponentDAO componentDAO) |
|
void |
setConfigurationService(ConfigurationService configurationService) |
|
void |
setCustomFieldDAO(CustomFieldDAO customFieldDAO) |
|
void |
setIssueActivityDAO(IssueActivityDAO issueActivityDAO) |
|
void |
setIssueAttachmentDAO(IssueAttachmentDAO issueAttachmentDAO) |
|
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) |
|
void |
setIssueDAO(IssueDAO issueDAO) |
|
boolean |
setIssueFields(Integer issueId,
List<IssueField> fields) |
TODO maybe it has no use at all.
|
void |
setIssueHistoryDAO(IssueHistoryDAO issueHistoryDAO) |
|
void |
setIssueRelationDAO(IssueRelationDAO issueRelationDAO) |
|
boolean |
setIssueVersions(Integer issueId,
HashSet<Integer> versionIds,
Integer userId) |
|
void |
setNotificationService(NotificationService notificationService) |
|
void |
setProjectDAO(ProjectDAO projectDAO) |
|
void |
setUserDAO(UserDAO userDAO) |
|
void |
setVersionDAO(VersionDAO versionDAO) |
|
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 |
public Issue getIssue(Integer issueId)
getIssue
in interface IssueService
public List<Issue> getAllIssues()
getAllIssues
in interface IssueService
public Long getNumberIssues()
getNumberIssues
in interface IssueService
public List<Issue> getIssuesCreatedByUser(Integer userId)
getIssuesCreatedByUser
in interface IssueService
public List<Issue> getIssuesCreatedByUser(Integer userId, boolean availableProjectsOnly)
getIssuesCreatedByUser
in interface IssueService
public List<Issue> getIssuesOwnedByUser(Integer userId)
getIssuesOwnedByUser
in interface IssueService
public List<Issue> getIssuesOwnedByUser(Integer userId, boolean availableProjectsOnly)
getIssuesOwnedByUser
in interface IssueService
public List<Issue> getIssuesWatchedByUser(Integer userId)
getIssuesWatchedByUser
in interface IssueService
public List<Issue> getIssuesWatchedByUser(Integer userId, boolean availableProjectsOnly)
NotificationService
getIssuesWatchedByUser
in interface IssueService
public List<Issue> getUnassignedIssues()
getUnassignedIssues
in interface IssueService
public List<Issue> getUnassignedIssues(boolean availableProjectsOnly)
getUnassignedIssues
in interface IssueService
public List<Issue> getIssuesWithStatus(int status)
getIssuesWithStatus
in interface IssueService
status
- the status to comparepublic List<Issue> getIssuesWithStatusLessThan(int status)
getIssuesWithStatusLessThan
in interface IssueService
status
- the status to comparepublic List<Issue> getIssuesWithSeverity(int severity)
getIssuesWithSeverity
in interface IssueService
severity
- the severity to comparepublic List<Issue> getIssuesByProjectId(Integer projectId)
getIssuesByProjectId
in interface IssueService
public List<Issue> getIssuesByProjectId(Integer projectId, int status)
getIssuesByProjectId
in interface IssueService
public User getIssueCreator(Integer issueId)
getIssueCreator
in interface IssueService
public User getIssueOwner(Integer issueId)
getIssueOwner
in interface IssueService
public List<Component> getIssueComponents(Integer issueId)
getIssueComponents
in interface IssueService
public List<Version> getIssueVersions(Integer issueId)
getIssueVersions
in interface IssueService
public List<IssueAttachment> getIssueAttachments(Integer issueId)
getIssueAttachments
in interface IssueService
public 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 IssueService
issue
- an Issue representing the new issue informationprojectId
- 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 IssueService
issueDirty
- the changed, unsaved issue to update on persistency layeruserId
- the user-id of the changerProjectException
public Issue moveIssue(Issue issue, Integer projectId, Integer userId)
moveIssue
in interface IssueService
issue
- an Issue of the issue to moveprojectId
- the id of the target projectuserId
- the id of the user that is moving the issuepublic 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 IssueService
public IssueRelation getIssueRelation(Integer relationId)
getIssueRelation
in interface IssueService
public boolean addIssueRelation(Integer issueId, Integer relatedIssueId, IssueRelation.Type 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 IssueService
ProjectException
public void updateIssueActivityNotification(Integer issueId, boolean notificationSent)
NotificationService
public boolean addIssueAttachment(IssueAttachment attachment, byte[] data)
addIssueAttachment
in interface IssueService
attachment
- The attachment datadata
- The byte datapublic boolean setIssueAttachmentData(Integer attachmentId, byte[] data)
IssueService
setIssueAttachmentData
in interface IssueService
attachmentId
- the id of the attachment to updatedata
- a byte arrray of the binary data for the attachmentpublic boolean setIssueAttachmentData(String fileName, byte[] data)
IssueService
setIssueAttachmentData
in interface IssueService
fileName
- 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 attachmentpublic boolean removeIssueAttachment(Integer attachmentId)
removeIssueAttachment
in interface IssueService
attachmentId
- the id of the IssueAttachmentBean
public Integer removeIssueHistoryEntry(Integer entryId, Integer userId)
removeIssueHistoryEntry
in interface IssueService
public Project getIssueProject(Integer issueId)
getIssueProject
in interface IssueService
public HashSet<Integer> getIssueComponentIds(Integer issueId)
getIssueComponentIds
in interface IssueService
public HashSet<Integer> getIssueVersionIds(Integer issueId)
getIssueVersionIds
in interface IssueService
public List<IssueActivity> getIssueActivity(Integer issueId)
getIssueActivity
in interface IssueService
public List<IssueActivity> getIssueActivity(Integer issueId, boolean notificationSent)
NotificationService
?getIssueActivity
in interface IssueService
public Long getAllIssueAttachmentCount()
getAllIssueAttachmentCount
in interface IssueService
public List<IssueAttachment> getAllIssueAttachments()
getAllIssueAttachments
in interface IssueService
public IssueAttachment getIssueAttachment(Integer attachmentId)
getIssueAttachment
in interface IssueService
public byte[] getIssueAttachmentData(Integer attachmentId)
IssueService
getIssueAttachmentData
in interface IssueService
attachmentId
- the id of the attachment to obtain the data forpublic int getIssueAttachmentCount(Integer issueId)
getIssueAttachmentCount
in interface IssueService
public IssueHistory getLastIssueHistory(Integer issueId)
getLastIssueHistory
in interface IssueService
issueId
- the id of the issue to return the history entry for.public int getOpenIssueCountByProjectId(Integer projectId)
getOpenIssueCountByProjectId
in interface IssueService
public int getResolvedIssueCountByProjectId(Integer projectId)
getResolvedIssueCountByProjectId
in interface IssueService
public int getTotalIssueCountByProjectId(Integer projectId)
getTotalIssueCountByProjectId
in interface IssueService
public Date getLatestIssueDateByProjectId(Integer projectId)
getLatestIssueDateByProjectId
in interface IssueService
public List<Issue> getNextIssues(Integer issueId)
getNextIssues
in interface IssueService
public List<Issue> getPreviousIssues(Integer issueId)
getPreviousIssues
in interface IssueService
public boolean canViewIssue(Integer issueId, User user)
canViewIssue
in interface IssueService
public boolean canViewIssue(Issue issue, User user)
canViewIssue
in interface IssueService
public Long getAllIssueAttachmentSize()
getAllIssueAttachmentSize
in interface IssueService
public List<Issue> searchIssues(IssueSearchQuery queryModel, User user, Map<Integer,Set<PermissionType>> userPermissions) throws IssueSearchException
searchIssues
in interface IssueService
IssueSearchException
public Long totalSystemIssuesAttachmentSize()
public ConfigurationService getConfigurationService()
public void setUserDAO(UserDAO userDAO)
public void setConfigurationService(ConfigurationService configurationService)
public void setCustomFieldDAO(CustomFieldDAO customFieldDAO)
public void setProjectDAO(ProjectDAO projectDAO)
public void setIssueDAO(IssueDAO issueDAO)
public void setIssueHistoryDAO(IssueHistoryDAO issueHistoryDAO)
public void setIssueRelationDAO(IssueRelationDAO issueRelationDAO)
public void setIssueAttachmentDAO(IssueAttachmentDAO issueAttachmentDAO)
public void setComponentDAO(ComponentDAO componentDAO)
public void setIssueActivityDAO(IssueActivityDAO issueActivityDAO)
public void setVersionDAO(VersionDAO versionDAO)
public void setNotificationService(NotificationService notificationService)
Copyright © 2002–2019 itracker. All rights reserved.