public class

MockProject

extends Object
implements Project
java.lang.Object
   ↳ com.atlassian.jira.project.MockProject

Class Overview

Bean implementation of Project interface but doesn't believe in GenericValues. Equals and hashCode are based on id alone.

Summary

[Expand]
Inherited Fields
From interface com.atlassian.jira.entity.WithId
From interface com.atlassian.jira.util.Named
Public Constructors
MockProject(GenericValue gv)
MockProject()
MockProject(long id)
MockProject(Long id)
MockProject(long id, String key)
MockProject(long id, String key, ProjectTypeKey projectTypeKey)
MockProject(long id, String key, String name)
MockProject(Long id, String key, String name)
MockProject(long id, String key, String name, GenericValue projectGV)
MockProject(Long id, String key, String name, GenericValue projectGV)
MockProject(Long id, String key, String name, GenericValue projectGV, ProjectTypeKey projectTypeKey)
Public Methods
boolean equals(Object o)
Long getAssigneeType()
Returns the default assignee for issues that get created in this project.
@Nonnull Avatar getAvatar()
Gives the currently-configured Avatar for this project.
Collection<ProjectComponent> getComponents()
Returns the components for this Project.
String getDescription()
String getEmail()
GenericValue getGenericValue()
Long getId()
Collection<IssueType> getIssueTypes()
String getKey()
ApplicationUser getLead()
String getLeadUserKey()
String getLeadUserName()
String getName()
String getOriginalKey()
ProjectCategory getProjectCategory()
ProjectCategory getProjectCategoryObject()
Returns the Project Category for this Project.
Collection<ProjectComponent> getProjectComponents()
Returns the components for this Project.
ApplicationUser getProjectLead()
ProjectTypeKey getProjectTypeKey()
Returns the key of the project type for this project.
String getUrl()
Collection<Version> getVersions()
int hashCode()
void setAssigneeType(Long assigneeType)
void setAvatar(Avatar avatar)
void setDescription(String description)
MockProject setEmail(String email)
void setId(Long id)
MockProject setIssueTypes(Collection<IssueType> types)
MockProject setIssueTypes(String... types)
MockProject setIssueTypes(IssueType... types)
void setKey(String key)
void setLead(ApplicationUser lead)
void setName(String name)
void setProjectCategory(ProjectCategory projectCategory)
void setProjectComponents(Collection<ProjectComponent> projectComponents)
void setProjectTypeKey(String projectTypeKey)
void setUrl(String url)
void setVersions(Collection<Version> versions)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.entity.WithId
From interface com.atlassian.jira.entity.WithKey
From interface com.atlassian.jira.project.Project
From interface com.atlassian.jira.util.Named
From interface com.atlassian.jira.util.NamedWithDescription

Public Constructors

public MockProject (GenericValue gv)

public MockProject ()

public MockProject (long id)

public MockProject (Long id)

public MockProject (long id, String key)

public MockProject (long id, String key, ProjectTypeKey projectTypeKey)

public MockProject (long id, String key, String name)

public MockProject (Long id, String key, String name)

public MockProject (long id, String key, String name, GenericValue projectGV)

public MockProject (Long id, String key, String name, GenericValue projectGV)

public MockProject (Long id, String key, String name, GenericValue projectGV, ProjectTypeKey projectTypeKey)

Public Methods

public boolean equals (Object o)

public Long getAssigneeType ()

Returns the default assignee for issues that get created in this project. Returns PROJECT_LEAD or UNASSIGNED. Can return NULL if the default assignee has not been set for this project and this means the PROJECT LEAD is the default assignee.

TODO: Write upgrade task to ensure default assignee is always set.

Returns
  • the default assignee. NB: Can return NULL

@Nonnull public Avatar getAvatar ()

Gives the currently-configured Avatar for this project.

Returns
  • the current Avatar (or default if the current one is removed), never null.

public Collection<ProjectComponent> getComponents ()

Returns the components for this Project.

Returns
  • the components for this Project.

public String getDescription ()

public String getEmail ()

public GenericValue getGenericValue ()

public Long getId ()

public Collection<IssueType> getIssueTypes ()

public String getKey ()

public ApplicationUser getLead ()

public String getLeadUserKey ()

public String getLeadUserName ()

public String getName ()

public String getOriginalKey ()

public ProjectCategory getProjectCategory ()

public ProjectCategory getProjectCategoryObject ()

Returns the Project Category for this Project.

This is a synonym for getProjectCategory() that exists for legacy reasons.

Returns
  • the project category information for this project.

public Collection<ProjectComponent> getProjectComponents ()

Returns the components for this Project.

This is a synonym for getComponents() that exists for legacy reasons.

Returns
  • the components for this Project.

public ApplicationUser getProjectLead ()

public ProjectTypeKey getProjectTypeKey ()

Returns the key of the project type for this project.

Returns
  • The key of the project type for this project.

public String getUrl ()

public Collection<Version> getVersions ()

public int hashCode ()

public void setAssigneeType (Long assigneeType)

public void setAvatar (Avatar avatar)

public void setDescription (String description)

public MockProject setEmail (String email)

public void setId (Long id)

public MockProject setIssueTypes (Collection<IssueType> types)

public MockProject setIssueTypes (String... types)

public MockProject setIssueTypes (IssueType... types)

public void setKey (String key)

public void setLead (ApplicationUser lead)

public void setName (String name)

public void setProjectCategory (ProjectCategory projectCategory)

public void setProjectComponents (Collection<ProjectComponent> projectComponents)

public void setProjectTypeKey (String projectTypeKey)

public void setUrl (String url)

public void setVersions (Collection<Version> versions)

public String toString ()