public class

MockProjectManager

extends AbstractProjectManager
java.lang.Object
   ↳ com.atlassian.jira.project.AbstractProjectManager
     ↳ com.atlassian.jira.mock.MockProjectManager

Summary

Public Constructors
MockProjectManager()
Public Methods
void addProject(GenericValue gv)
void addProject(Project project)
static MockProjectManager createDefaultProjectManager()
Creates a "default" MockProjectManager.
Project createProject(String name, String key, String description, String lead, String url, Long assigneeType, Long avatarId)
ProjectCategory createProjectCategory(String name, String description)
Collection<ProjectCategory> getAllProjectCategories()
Set<String> getAllProjectKeys(Long projectId)
GenericValue getComponent(Long id)
GenericValue getComponent(GenericValue project, String name)
Collection<GenericValue> getComponents(GenericValue project)
long getCurrentCounterForProject(Long id)
long getNextId(Project project)
GenericValue getProject(Long id)
Project getProjectByCurrentKeyIgnoreCase(String projectKey)
GenericValue getProjectByKey(String key)
GenericValue getProjectByName(String name)
Collection<GenericValue> getProjectCategories()
GenericValue getProjectCategory(Long id)
ProjectCategory getProjectCategoryForProject(Project project)
GenericValue getProjectCategoryFromProject(GenericValue project)
ProjectCategory getProjectCategoryObject(Long id)
long getProjectCount()
Project getProjectObj(Long id)
Returns project object or null if project with that id doesn't exist.
Project getProjectObjByKey(String projectKey)
Project getProjectObjByKeyIgnoreCase(String projectKey)
Project getProjectObjByName(String projectName)
List<Project> getProjectObjects()
Collection<Project> getProjectObjectsFromProjectCategory(Long projectCategoryId)
Collection<Project> getProjectObjectsWithNoCategory()
Collection<GenericValue> getProjects()
Collection<GenericValue> getProjectsByLead(User leadUser)
Collection<GenericValue> getProjectsFromProjectCategory(GenericValue projectCategory)
Collection<Project> getProjectsFromProjectCategory(ProjectCategory projectCategory)
List<Project> getProjectsLeadBy(User leadUser)
List<Project> getProjectsLeadBy(ApplicationUser leadUser)
Collection<GenericValue> getProjectsWithNoCategory()
void refresh()
void removeProject(Project project)
void removeProjectCategory(Long id)
void removeProjectIssues(Project project)
void setCurrentCounterForProject(Project project, long counter)
void setProjectCategory(GenericValue project, GenericValue category)
void setProjectCategory(Project project, ProjectCategory category)
Project updateProject(Project updatedProject, String name, String description, String lead, String url, Long assigneeType, Long avatarId, String projectKey)
void updateProjectCategory(ProjectCategory projectCategory)
void updateProjectCategory(GenericValue projectCat)
[Expand]
Inherited Methods
From class com.atlassian.jira.project.AbstractProjectManager
From class java.lang.Object
From interface com.atlassian.jira.project.ProjectManager

Public Constructors

public MockProjectManager ()

Public Methods

public void addProject (GenericValue gv)

public void addProject (Project project)

public static MockProjectManager createDefaultProjectManager ()

Creates a "default" MockProjectManager.

This will include the following projects:

IDKey Name
1 HSP Homosapien
2 MNK Monkey
3 RAT Rattus
4 COW Bovine
5 DOG Canine
6 PIG Porcine

Returns
  • a "default" MockProjectManager.

public Project createProject (String name, String key, String description, String lead, String url, Long assigneeType, Long avatarId)

public ProjectCategory createProjectCategory (String name, String description)

public Collection<ProjectCategory> getAllProjectCategories ()

public Set<String> getAllProjectKeys (Long projectId)

public GenericValue getComponent (Long id)

public GenericValue getComponent (GenericValue project, String name)

public Collection<GenericValue> getComponents (GenericValue project)

public long getCurrentCounterForProject (Long id)

public long getNextId (Project project)

public GenericValue getProject (Long id)

public Project getProjectByCurrentKeyIgnoreCase (String projectKey)

public GenericValue getProjectByKey (String key)

public GenericValue getProjectByName (String name)

public Collection<GenericValue> getProjectCategories ()

public GenericValue getProjectCategory (Long id)

public ProjectCategory getProjectCategoryForProject (Project project)

public GenericValue getProjectCategoryFromProject (GenericValue project)

public ProjectCategory getProjectCategoryObject (Long id)

public long getProjectCount ()

public Project getProjectObj (Long id)

Returns project object or null if project with that id doesn't exist.

Parameters
id project id
Returns
  • project object or null if project with that id doesn't exist

public Project getProjectObjByKey (String projectKey)

public Project getProjectObjByKeyIgnoreCase (String projectKey)

public Project getProjectObjByName (String projectName)

public List<Project> getProjectObjects ()

public Collection<Project> getProjectObjectsFromProjectCategory (Long projectCategoryId)

public Collection<Project> getProjectObjectsWithNoCategory ()

public Collection<GenericValue> getProjects ()

public Collection<GenericValue> getProjectsByLead (User leadUser)

public Collection<GenericValue> getProjectsFromProjectCategory (GenericValue projectCategory)

public Collection<Project> getProjectsFromProjectCategory (ProjectCategory projectCategory)

public List<Project> getProjectsLeadBy (User leadUser)

public List<Project> getProjectsLeadBy (ApplicationUser leadUser)

public Collection<GenericValue> getProjectsWithNoCategory ()

public void refresh ()

public void removeProject (Project project)

public void removeProjectCategory (Long id)

public void removeProjectIssues (Project project)

public void setCurrentCounterForProject (Project project, long counter)

public void setProjectCategory (GenericValue project, GenericValue category)

public void setProjectCategory (Project project, ProjectCategory category)

public Project updateProject (Project updatedProject, String name, String description, String lead, String url, Long assigneeType, Long avatarId, String projectKey)

public void updateProjectCategory (ProjectCategory projectCategory)

public void updateProjectCategory (GenericValue projectCat)