org.itracker.services
Interface ProjectService

All Known Implementing Classes:
ProjectServiceImpl

public interface ProjectService


Method Summary
 Component addProjectComponent(Integer projectId, Component component)
           
 ProjectScript addProjectScript(Integer projectId, ProjectScript projectScript)
           
 Version addProjectVersion(Integer projectId, Version version)
           
 Long countIssuesByComponent(Integer componentId)
          Counts the number of issues for a given component.
 Long countIssuesByVersion(Integer versionId)
          Counts the number of issues for a given version.
 Project createProject(Project project, Integer userId)
          Creates a new issue in a project.
 List<Project> getAllAvailableProjects()
           
 List<Project> getAllProjects()
           
 Date getLatestIssueUpdatedDateByProjectId(Integer projectId)
           
 List<CustomField> getListOfProjectFields(Integer projectId)
           
 List<User> getListOfProjectOwners(Integer projectId)
           
 Project getProject(Integer projectId)
           
 Component getProjectComponent(Integer componentId)
           
 List<CustomField> getProjectFields(Integer projectId)
           
 List<CustomField> getProjectFields(Integer projectId, Locale locale)
           
 List<User> getProjectOwners(Integer projectId)
           
 ProjectScript getProjectScript(Integer scriptId)
           
 List<ProjectScript> getProjectScripts()
           
 Long[] getProjectStats(Integer projectId)
          Deprecated. count open/closed issues with new methods: getTotalNumberOpenIssuesByProject, getTotalNumberResolvedIssuesByProject
 Version getProjectVersion(Integer versionId)
           
 Long getTotalNumberIssuesByProject(Integer projectId)
           
 Long getTotalNumberOpenIssuesByProject(Integer projectId)
           
 Long getTotalNumberResolvedIssuesByProject(Integer projectId)
           
 Boolean isUniqueProjectName(String projectName, Integer updatedProjectId)
          Check if this project name is used by any of the projects which already exist in the database.
 boolean removeProjectComponent(Integer projectId, Integer componentId)
           
 boolean removeProjectScript(Integer projectId, Integer scriptId)
           
 boolean removeProjectVersion(Integer projectId, Integer versionId)
           
 boolean setProjectFields(Project project, Set<Integer> newFields)
           
 boolean setProjectOwners(Project project, Set<Integer> newOwners)
           
 Project updateProject(Project project, Integer userId)
          update a project, as the user with userId
 Component updateProjectComponent(Component component)
           
 ProjectScript updateProjectScript(ProjectScript projectScript)
           
 Version updateProjectVersion(Version version)
           
 

Method Detail

getProject

Project getProject(Integer projectId)

getAllProjects

List<Project> getAllProjects()

getAllAvailableProjects

List<Project> getAllAvailableProjects()

getProjectComponent

Component getProjectComponent(Integer componentId)

updateProjectComponent

Component updateProjectComponent(Component component)

addProjectComponent

Component addProjectComponent(Integer projectId,
                              Component component)

removeProjectComponent

boolean removeProjectComponent(Integer projectId,
                               Integer componentId)

getProjectVersion

Version getProjectVersion(Integer versionId)

updateProjectVersion

Version updateProjectVersion(Version version)

addProjectVersion

Version addProjectVersion(Integer projectId,
                          Version version)

removeProjectVersion

boolean removeProjectVersion(Integer projectId,
                             Integer versionId)

getProjectOwners

List<User> getProjectOwners(Integer projectId)

getListOfProjectOwners

List<User> getListOfProjectOwners(Integer projectId)

setProjectOwners

boolean setProjectOwners(Project project,
                         Set<Integer> newOwners)

getProjectFields

List<CustomField> getProjectFields(Integer projectId)

getListOfProjectFields

List<CustomField> getListOfProjectFields(Integer projectId)

getProjectFields

List<CustomField> getProjectFields(Integer projectId,
                                   Locale locale)

setProjectFields

boolean setProjectFields(Project project,
                         Set<Integer> newFields)

getProjectScript

ProjectScript getProjectScript(Integer scriptId)

getProjectScripts

List<ProjectScript> getProjectScripts()

updateProjectScript

ProjectScript updateProjectScript(ProjectScript projectScript)

addProjectScript

ProjectScript addProjectScript(Integer projectId,
                               ProjectScript projectScript)

removeProjectScript

boolean removeProjectScript(Integer projectId,
                            Integer scriptId)

countIssuesByComponent

Long countIssuesByComponent(Integer componentId)
Counts the number of issues for a given component.

Parameters:
componentId - Id of the component to which the issues must be associated
Returns:
0 if the component has no issues or doesn't exist

getTotalNumberIssuesByProject

Long getTotalNumberIssuesByProject(Integer projectId)

getTotalNumberOpenIssuesByProject

Long getTotalNumberOpenIssuesByProject(Integer projectId)

getTotalNumberResolvedIssuesByProject

Long getTotalNumberResolvedIssuesByProject(Integer projectId)

countIssuesByVersion

Long countIssuesByVersion(Integer versionId)
Counts the number of issues for a given version.

Parameters:
versionId - Id of the version to which the issues must be associated
Returns:
0 if the version has no issues or doesn't exist

getProjectStats

Long[] getProjectStats(Integer projectId)
Deprecated. count open/closed issues with new methods: getTotalNumberOpenIssuesByProject, getTotalNumberResolvedIssuesByProject

Returns the number of open and resolved issues in the given project.

PENDING: should use a class to hold statistics info to improve type- safety.

Returns:
int[0] = open issues, int[1] = resolved issues

getLatestIssueUpdatedDateByProjectId

Date getLatestIssueUpdatedDateByProjectId(Integer projectId)

createProject

Project createProject(Project project,
                      Integer userId)
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

updateProject

Project updateProject(Project project,
                      Integer userId)
update a project, as the user with userId

Parameters:
project -
userId -
Returns:
the updated project from Persistence

isUniqueProjectName

Boolean isUniqueProjectName(String projectName,
                            Integer updatedProjectId)
Check if this project name is used by any of the projects which already exist in the database.

Parameters:
projectName -
updatedProjectId - The updated project which will be use the new name.
Returns:
true if the name is unique.


Copyright © 2002-2012 itracker. All Rights Reserved.