org.itracker.services
Interface IssueService

All Known Implementing Classes:
IssueServiceImpl

public interface IssueService


Method Summary
 boolean addIssueAttachment(IssueAttachment attachment, byte[] data)
           
 boolean addIssueHistory(IssueHistory history)
           
 boolean addIssueRelation(Integer issueId, Integer relatedIssueId, int relationType, Integer userId)
           
 boolean assignIssue(Integer issueId, Integer userId)
           
 boolean assignIssue(Integer issueId, Integer userId, Integer assignedByUserId)
           
 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.  
 Long getAllIssueAttachmentSize()
           
 List<Issue> getAllIssues()
          Deprecated. Don't use due to EXPENSIVE memory use.
 Issue getIssue(Integer issueId)
           
 List<IssueActivity> getIssueActivity(Integer issueId)
           
 List<IssueActivity> getIssueActivity(Integer issueId, boolean notificationSent)
           
 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)
           
 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)
           
 List<Issue> getIssuesWithSeverity(int severity)
          Returns an array of issues that are currently at the given severity.
 List<Issue> getIssuesWithStatus(int status)
          Returns an array of issues that are currently at the given status.
 List<Issue> getIssuesWithStatusLessThan(int status)
          Returns an array of issues that are currently at the given status or a status less than the given status.
 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()
           
 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)
           
 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: Add Javadocs here: document this whole class.describe what is the use for this method.
 boolean setIssueVersions(Integer issueId, HashSet<Integer> versionIds, Integer userId)
           
 Issue systemUpdateIssue(Issue issue, Integer userId)
           
 Issue updateIssue(Issue issue, Integer userId)
          Save a modified issue to the persistence layer
 

Method Detail

getIssue

Issue getIssue(Integer issueId)

getAllIssues

List<Issue> getAllIssues()
Deprecated. Don't use due to EXPENSIVE memory use.

Returns:

getNumberIssues

Long getNumberIssues()

getIssuesWithStatus

List<Issue> getIssuesWithStatus(int status)
Returns an array of issues that are currently at the given status.

Parameters:
status - the status to search for
Returns:
an array of issues with the given status

getIssuesWithStatusLessThan

List<Issue> getIssuesWithStatusLessThan(int status)
Returns an array of issues that are currently at the given status or a status less than the given status.

Parameters:
status - the status to search for
Returns:
an array of issues with the given status or lower

getIssuesWithSeverity

List<Issue> getIssuesWithSeverity(int severity)
Returns an array of issues that are currently at the given severity.

Parameters:
severity - the severity to search for
Returns:
an array of issues with the given severity

getIssuesByProjectId

List<Issue> getIssuesByProjectId(Integer projectId)

getIssuesByProjectId

List<Issue> getIssuesByProjectId(Integer projectId,
                                 int status)

getIssuesCreatedByUser

List<Issue> getIssuesCreatedByUser(Integer userId)

getIssuesCreatedByUser

List<Issue> getIssuesCreatedByUser(Integer userId,
                                   boolean availableProjectsOnly)

getIssuesOwnedByUser

List<Issue> getIssuesOwnedByUser(Integer userId)

getIssuesOwnedByUser

List<Issue> getIssuesOwnedByUser(Integer userId,
                                 boolean availableProjectsOnly)

getIssuesWatchedByUser

List<Issue> getIssuesWatchedByUser(Integer userId)

getIssuesWatchedByUser

List<Issue> getIssuesWatchedByUser(Integer userId,
                                   boolean availableProjectsOnly)

getUnassignedIssues

List<Issue> getUnassignedIssues()

getUnassignedIssues

List<Issue> getUnassignedIssues(boolean availableProjectsOnly)

createIssue

Issue createIssue(Issue issue,
                  Integer projectId,
                  Integer userId,
                  Integer createdById)
                  throws ProjectException
Creates a new issue in a project.

Parameters:
model - an Issue representing the new issue information
projectId - the projectId the issue belongs to
userId - the id of registered creator of the new issue
createdById - the id of the actual creator of the issue. This would normally be the same as the userId.
Returns:
an Issue containing the newly created issue, or null if the create failed
Throws:
ProjectException

updateIssue

Issue updateIssue(Issue issue,
                  Integer userId)
                  throws ProjectException
Save a modified issue to the persistence layer

Parameters:
issueDirty - the changed, unsaved issue to update on persistency layer
userId - the user-id of the changer
Throws:
ProjectException

systemUpdateIssue

Issue systemUpdateIssue(Issue issue,
                        Integer userId)
                        throws ProjectException
Throws:
ProjectException

moveIssue

Issue moveIssue(Issue issue,
                Integer projectId,
                Integer userId)
Moves an issues from its current project to a new project.

Parameters:
issue - an Issue of the issue to move
projectId - the id of the target project
userId - the id of the user that is moving the issue
Returns:
an Issue of the issue after it has been moved

assignIssue

boolean assignIssue(Integer issueId,
                    Integer userId)
Parameters:
issueId -
userId -
Returns:

assignIssue

boolean assignIssue(Integer issueId,
                    Integer userId,
                    Integer assignedByUserId)
Parameters:
issueId -
userId -
assignedByUserId -
Returns:

setIssueFields

boolean setIssueFields(Integer issueId,
                       List<IssueField> fields)
TODO: Add Javadocs here: document this whole class.describe what is the use for this method.

Parameters:
issueId -
fields -
Returns:

setIssueComponents

boolean setIssueComponents(Integer issueId,
                           HashSet<Integer> componentIds,
                           Integer userId)

setIssueVersions

boolean setIssueVersions(Integer issueId,
                         HashSet<Integer> versionIds,
                         Integer userId)

addIssueHistory

boolean addIssueHistory(IssueHistory history)

addIssueRelation

boolean addIssueRelation(Integer issueId,
                         Integer relatedIssueId,
                         int relationType,
                         Integer userId)

addIssueAttachment

boolean addIssueAttachment(IssueAttachment attachment,
                           byte[] data)

setIssueAttachmentData

boolean setIssueAttachmentData(Integer attachmentId,
                               byte[] data)
Updates the binary data of the attachment stored in the database.

Parameters:
attachmentId - the id of the attachment to update
data - a byte arrray of the binary data for the attachment
Returns:
true if the update was successful

setIssueAttachmentData

boolean setIssueAttachmentData(String fileName,
                               byte[] data)
Updates the binary data of the attachment stored in the database. Used mainly to take an existing attachment stored on the filesystem and move it into the database.

Parameters:
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 attachment
Returns:
true if the update was successful

removeIssueAttachment

boolean removeIssueAttachment(Integer attachmentId)

removeIssueHistoryEntry

Integer removeIssueHistoryEntry(Integer entryId,
                                Integer userId)

removeIssueRelation

void removeIssueRelation(Integer relationId,
                         Integer userId)

getIssueProject

Project getIssueProject(Integer issueId)

getIssueComponents

List<Component> getIssueComponents(Integer issueId)

getIssueComponentIds

HashSet<Integer> getIssueComponentIds(Integer issueId)

getIssueVersions

List<Version> getIssueVersions(Integer issueId)

getIssueVersionIds

HashSet<Integer> getIssueVersionIds(Integer issueId)

getIssueCreator

User getIssueCreator(Integer issueId)

getIssueOwner

User getIssueOwner(Integer issueId)

getIssueRelation

IssueRelation getIssueRelation(Integer relationId)

getIssueActivity

List<IssueActivity> getIssueActivity(Integer issueId)

getIssueActivity

List<IssueActivity> getIssueActivity(Integer issueId,
                                     boolean notificationSent)

getAllIssueAttachments

List<IssueAttachment> getAllIssueAttachments()
Deprecated. 

Returns:

getAllIssueAttachmentSize

Long getAllIssueAttachmentSize()

getAllIssueAttachmentCount

Long getAllIssueAttachmentCount()

getIssueAttachment

IssueAttachment getIssueAttachment(Integer attachmentId)

getIssueAttachmentData

byte[] getIssueAttachmentData(Integer attachmentId)
Returns the binary data for an attachment.

Parameters:
attachmentId - the id of the attachment to obtain the data for
Returns:
a byte array containing the attachment data

getIssueAttachments

List<IssueAttachment> getIssueAttachments(Integer issueId)

getIssueAttachmentCount

int getIssueAttachmentCount(Integer issueId)

getLastIssueHistory

IssueHistory getLastIssueHistory(Integer issueId)
Returns the latest issue history entry for a particular issue.

Parameters:
issueId - the id of the issue to return the history entry for.
Returns:
the latest IssueHistory, or null if no entries could be found

getIssueHistory

List<IssueHistory> getIssueHistory(Integer issueId)

getOpenIssueCountByProjectId

int getOpenIssueCountByProjectId(Integer projectId)

getResolvedIssueCountByProjectId

int getResolvedIssueCountByProjectId(Integer projectId)

getTotalIssueCountByProjectId

int getTotalIssueCountByProjectId(Integer projectId)

getLatestIssueDateByProjectId

Date getLatestIssueDateByProjectId(Integer projectId)

canViewIssue

boolean canViewIssue(Integer issueId,
                     User user)

canViewIssue

boolean canViewIssue(Issue issue,
                     User user)

searchIssues

List<Issue> searchIssues(IssueSearchQuery queryModel,
                         User user,
                         Map<Integer,Set<PermissionType>> userPermissions)
                         throws IssueSearchException
Throws:
IssueSearchException


Copyright © 2002-2012 itracker. All Rights Reserved.