ProjectService
public class ProjectServiceImpl extends Object implements ProjectService
Constructor | Description |
---|---|
ProjectServiceImpl(org.itracker.persistence.dao.ComponentDAO componentDAO,
org.itracker.persistence.dao.CustomFieldDAO customFieldDAO,
org.itracker.persistence.dao.ProjectDAO projectDAO,
org.itracker.persistence.dao.ProjectScriptDAO projectScriptDAO,
org.itracker.persistence.dao.UserDAO userDAO,
org.itracker.persistence.dao.VersionDAO versionDAO,
org.itracker.persistence.dao.IssueDAO issueDAO) |
Modifier and Type | Method | Description |
---|---|---|
org.itracker.model.Component |
addProjectComponent(Integer projectId,
org.itracker.model.Component component) |
|
org.itracker.model.ProjectScript |
addProjectScript(Integer projectId,
org.itracker.model.ProjectScript projectScript) |
|
org.itracker.model.Version |
addProjectVersion(Integer projectId,
org.itracker.model.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.
|
org.itracker.model.Project |
createProject(org.itracker.model.Project project,
Integer userId) |
|
List<org.itracker.model.Project> |
getAllAvailableProjects() |
|
List<org.itracker.model.Project> |
getAllProjects() |
|
Date |
getLatestIssueUpdatedDateByProjectId(Integer projectId) |
|
List<org.itracker.model.Project> |
getListOfAllAvailableProjects() |
|
List<org.itracker.model.CustomField> |
getListOfProjectFields(Integer projectId) |
|
List<org.itracker.model.User> |
getListOfProjectOwners(Integer projectId) |
|
org.itracker.model.Project |
getProject(Integer projectId) |
|
org.itracker.model.Component |
getProjectComponent(Integer componentId) |
|
List<org.itracker.model.CustomField> |
getProjectFields(Integer projectId) |
|
List<org.itracker.model.CustomField> |
getProjectFields(Integer projectId,
Locale locale) |
TODO: implement Locale-aware ProjectFields.
|
List<org.itracker.model.User> |
getProjectOwners(Integer projectId) |
|
org.itracker.model.ProjectScript |
getProjectScript(Integer scriptId) |
|
List<org.itracker.model.ProjectScript> |
getProjectScripts() |
|
Long[] |
getProjectStats(Integer projectId) |
Returns the number of open and resolved issues in the given project.
|
org.itracker.model.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(org.itracker.model.Project project,
Set<Integer> setOfNewsFieldIds) |
|
boolean |
setProjectOwners(org.itracker.model.Project project,
Set<Integer> setOfNewOwnerIds) |
|
org.itracker.model.Project |
updateProject(org.itracker.model.Project project,
Integer userId) |
update a project, as the user with userId
|
org.itracker.model.Component |
updateProjectComponent(org.itracker.model.Component component) |
|
org.itracker.model.ProjectScript |
updateProjectScript(org.itracker.model.ProjectScript projectScript) |
|
org.itracker.model.Version |
updateProjectVersion(org.itracker.model.Version version) |
public ProjectServiceImpl(org.itracker.persistence.dao.ComponentDAO componentDAO, org.itracker.persistence.dao.CustomFieldDAO customFieldDAO, org.itracker.persistence.dao.ProjectDAO projectDAO, org.itracker.persistence.dao.ProjectScriptDAO projectScriptDAO, org.itracker.persistence.dao.UserDAO userDAO, org.itracker.persistence.dao.VersionDAO versionDAO, org.itracker.persistence.dao.IssueDAO issueDAO)
public org.itracker.model.Project getProject(Integer projectId)
getProject
in interface ProjectService
public List<org.itracker.model.Project> getAllProjects()
getAllProjects
in interface ProjectService
public List<org.itracker.model.Project> getAllAvailableProjects()
getAllAvailableProjects
in interface ProjectService
public List<org.itracker.model.Project> getListOfAllAvailableProjects()
public org.itracker.model.Component updateProjectComponent(org.itracker.model.Component component)
updateProjectComponent
in interface ProjectService
public org.itracker.model.Component addProjectComponent(Integer projectId, org.itracker.model.Component component)
addProjectComponent
in interface ProjectService
public boolean removeProjectComponent(Integer projectId, Integer componentId)
removeProjectComponent
in interface ProjectService
public org.itracker.model.Component getProjectComponent(Integer componentId)
getProjectComponent
in interface ProjectService
public org.itracker.model.Version addProjectVersion(Integer projectId, org.itracker.model.Version version)
addProjectVersion
in interface ProjectService
public boolean removeProjectVersion(Integer projectId, Integer versionId)
removeProjectVersion
in interface ProjectService
public org.itracker.model.Version updateProjectVersion(org.itracker.model.Version version)
updateProjectVersion
in interface ProjectService
public org.itracker.model.Version getProjectVersion(Integer versionId)
getProjectVersion
in interface ProjectService
public List<org.itracker.model.User> getProjectOwners(Integer projectId)
getProjectOwners
in interface ProjectService
public boolean setProjectOwners(org.itracker.model.Project project, Set<Integer> setOfNewOwnerIds)
setProjectOwners
in interface ProjectService
public List<org.itracker.model.CustomField> getProjectFields(Integer projectId)
getProjectFields
in interface ProjectService
public List<org.itracker.model.CustomField> getProjectFields(Integer projectId, Locale locale)
getProjectFields
in interface ProjectService
public boolean setProjectFields(org.itracker.model.Project project, Set<Integer> setOfNewsFieldIds)
setProjectFields
in interface ProjectService
public org.itracker.model.ProjectScript getProjectScript(Integer scriptId)
getProjectScript
in interface ProjectService
public List<org.itracker.model.ProjectScript> getProjectScripts()
getProjectScripts
in interface ProjectService
public org.itracker.model.ProjectScript addProjectScript(Integer projectId, org.itracker.model.ProjectScript projectScript)
addProjectScript
in interface ProjectService
public boolean removeProjectScript(Integer projectId, Integer scriptId)
removeProjectScript
in interface ProjectService
public org.itracker.model.ProjectScript updateProjectScript(org.itracker.model.ProjectScript projectScript)
updateProjectScript
in interface ProjectService
public Long getTotalNumberIssuesByProject(Integer projectId)
getTotalNumberIssuesByProject
in interface ProjectService
public Long countIssuesByVersion(Integer versionId)
ProjectService
countIssuesByVersion
in interface ProjectService
versionId
- Id of the version to which the issues must be associatedpublic Long countIssuesByComponent(Integer componentId)
ProjectService
countIssuesByComponent
in interface ProjectService
componentId
- Id of the component to which the issues must be associatedpublic Long[] getProjectStats(Integer projectId)
ProjectService
PENDING: should use a class to hold statistics info to improve type- safety.
getProjectStats
in interface ProjectService
public List<org.itracker.model.CustomField> getListOfProjectFields(Integer projectId)
getListOfProjectFields
in interface ProjectService
public List<org.itracker.model.User> getListOfProjectOwners(Integer projectId)
getListOfProjectOwners
in interface ProjectService
public Long getTotalNumberOpenIssuesByProject(Integer projectId)
getTotalNumberOpenIssuesByProject
in interface ProjectService
public Long getTotalNumberResolvedIssuesByProject(Integer projectId)
getTotalNumberResolvedIssuesByProject
in interface ProjectService
public Date getLatestIssueUpdatedDateByProjectId(Integer projectId)
getLatestIssueUpdatedDateByProjectId
in interface ProjectService
public org.itracker.model.Project createProject(org.itracker.model.Project project, Integer userId)
createProject
in interface ProjectService
public org.itracker.model.Project updateProject(org.itracker.model.Project project, Integer userId)
ProjectService
updateProject
in interface ProjectService
public Boolean isUniqueProjectName(String projectName, Integer updatedProjectId)
ProjectService
isUniqueProjectName
in interface ProjectService
updatedProjectId
- The updated project which will be use the new name.Copyright © 2002–2019 itracker. All rights reserved.