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

Public Constructors
MockProject(GenericValue gv)
MockProject()
MockProject(long id)
MockProject(Long id)
MockProject(long id, String key)
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)
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<GenericValue> getComponents()
Returns the components for this Project.
Long getCounter()
String getDescription()
String getEmail()
GenericValue getGenericValue()
Long getId()
Collection<IssueType> getIssueTypes()
String getKey()
User getLead()
User getLeadUser()
Returns the Project Lead
String getLeadUserKey()
String getLeadUserName()
String getName()
String getOriginalKey()
GenericValue getProjectCategory()
ProjectCategory getProjectCategoryObject()
Collection<ProjectComponent> getProjectComponents()
Returns the components for this Project.
ApplicationUser getProjectLead()
String getUrl()
Collection<Version> getVersions()
int hashCode()
void setAssigneeType(Long assigneeType)
void setAvatar(Avatar avatar)
void setComponents(Collection<GenericValue> components)
void setCounter(Long counter)
void setDescription(String description)
MockProject setEmail(String email)
void setId(Long id)
MockProject setIssueTypes(String... types)
MockProject setIssueTypes(IssueType... types)
MockProject setIssueTypes(Collection<IssueType> types)
void setKey(String key)
void setLead(User lead)
void setLead(ApplicationUser lead)
void setName(String name)
void setProjectCategoryGV(GenericValue projectCategoryGV)
void setProjectComponents(Collection<ProjectComponent> projectComponents)
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, 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 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, never null.

public Collection<GenericValue> getComponents ()

Returns the components for this Project.

Returns
  • the components for this Project.

public Long getCounter ()

public String getDescription ()

public String getEmail ()

public GenericValue getGenericValue ()

public Long getId ()

public Collection<IssueType> getIssueTypes ()

public String getKey ()

public User getLead ()

public User getLeadUser ()

Returns the Project Lead

Returns
  • the Project Lead

public String getLeadUserKey ()

public String getLeadUserName ()

public String getName ()

public String getOriginalKey ()

public GenericValue getProjectCategory ()

public ProjectCategory getProjectCategoryObject ()

public Collection<ProjectComponent> getProjectComponents ()

Returns the components for this Project.

Returns
  • the components for this Project.

public ApplicationUser getProjectLead ()

public String getUrl ()

public Collection<Version> getVersions ()

public int hashCode ()

public void setAssigneeType (Long assigneeType)

public void setAvatar (Avatar avatar)

public void setComponents (Collection<GenericValue> components)

public void setCounter (Long counter)

public void setDescription (String description)

public MockProject setEmail (String email)

public void setId (Long id)

public MockProject setIssueTypes (String... types)

public MockProject setIssueTypes (IssueType... types)

public MockProject setIssueTypes (Collection<IssueType> types)

public void setKey (String key)

public void setLead (User lead)

public void setLead (ApplicationUser lead)

public void setName (String name)

public void setProjectCategoryGV (GenericValue projectCategoryGV)

public void setProjectComponents (Collection<ProjectComponent> projectComponents)

public void setUrl (String url)

public void setVersions (Collection<Version> versions)

public String toString ()