Package com.atlassian.jira.project
Class MockProject
java.lang.Object
com.atlassian.jira.project.MockProject
- All Implemented Interfaces:
WithId,WithKey,Project,Named,NamedWithDescription
Bean implementation of Project interface but doesn't believe in GenericValues. Equals and hashCode are based on
id alone.
-
Field Summary
Fields inherited from interface com.atlassian.jira.util.Named
NAME_COMPARATORFields inherited from interface com.atlassian.jira.entity.WithId
ID_COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionMockProject(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, org.ofbiz.core.entity.GenericValue projectGV) MockProject(Long id) MockProject(Long id, String key, String name) MockProject(Long id, String key, String name, org.ofbiz.core.entity.GenericValue projectGV) MockProject(Long id, String key, String name, org.ofbiz.core.entity.GenericValue projectGV, ProjectTypeKey projectTypeKey) MockProject(org.ofbiz.core.entity.GenericValue gv) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the default assignee for issues that get created in this project.Gives the currently-configuredAvatarfor this project.Returns the components for this Project.getEmail()org.ofbiz.core.entity.GenericValuegetId()getKey()getLead()getName()Returns the Project Category for this Project.Returns the components for this Project.Returns the key of the project type for this project.Returns the project's reply-to email address, where replies to messages will be received.getUrl()inthashCode()booleanvoidsetArchived(boolean archived) voidsetArchivedBy(ApplicationUser archivedBy) voidsetArchivedDate(Date archivedDate) voidsetAssigneeType(Long assigneeType) voidvoidsetDescription(String description) voidsetIssueTypes(IssueType... types) setIssueTypes(String... types) setIssueTypes(Collection<IssueType> types) voidvoidsetLead(ApplicationUser lead) voidvoidsetProjectCategory(ProjectCategory projectCategory) voidsetProjectComponents(Collection<ProjectComponent> projectComponents) voidsetProjectTypeKey(String projectTypeKey) setReplyToEmail(String replyToEmail) voidvoidsetVersions(Collection<Version> versions) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.jira.project.Project
getCreatedAt, getCreatedBy, getCreatorId, getLastUpdatedAt, getLastUpdatedBy, getLastUpdaterId
-
Constructor Details
-
MockProject
public MockProject(org.ofbiz.core.entity.GenericValue gv) -
MockProject
public MockProject() -
MockProject
public MockProject(long id) -
MockProject
-
MockProject
-
MockProject
-
MockProject
-
MockProject
-
MockProject
-
MockProject
-
MockProject
public MockProject(Long id, String key, String name, org.ofbiz.core.entity.GenericValue projectGV, ProjectTypeKey projectTypeKey)
-
-
Method Details
-
getAssigneeType
Description copied from interface:ProjectReturns the default assignee for issues that get created in this project. ReturnsAssigneeTypes.PROJECT_LEADorAssigneeTypes.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.
- Specified by:
getAssigneeTypein interfaceProject- Returns:
- the default assignee. NB: Can return NULL
-
getProjectTypeKey
Description copied from interface:ProjectReturns the key of the project type for this project.- Specified by:
getProjectTypeKeyin interfaceProject- Returns:
- The key of the project type for this project.
-
setAssigneeType
-
getProjectComponents
Description copied from interface:ProjectReturns the components for this Project.This is a synonym for
Project.getComponents()that exists for legacy reasons.- Specified by:
getProjectComponentsin interfaceProject- Returns:
- the components for this Project.
- See Also:
-
setProjectComponents
-
getComponents
Description copied from interface:ProjectReturns the components for this Project.- Specified by:
getComponentsin interfaceProject- Returns:
- the components for this Project.
-
getDescription
- Specified by:
getDescriptionin interfaceNamedWithDescription- Specified by:
getDescriptionin interfaceProject- Returns:
- the project description
-
setDescription
-
getId
-
setId
-
getKey
-
setKey
-
getName
-
setName
-
getUrl
-
setUrl
-
setEmail
-
getEmail
-
getReplyToEmail
Description copied from interface:ProjectReturns the project's reply-to email address, where replies to messages will be received. The default return value is null for projects created before this field was added, or if the creator was removed after the project's creation.- Specified by:
getReplyToEmailin interfaceProject- Returns:
Stringthe reply-to address of the project, or null by default.
-
setReplyToEmail
-
getVersions
- Specified by:
getVersionsin interfaceProject- Returns:
- a Collection of
Versionfor this project
-
getIssueTypes
- Specified by:
getIssueTypesin interfaceProject- Returns:
- a Collection of
IssueTypefor this project
-
setIssueTypes
-
setIssueTypes
-
setIssueTypes
-
getProjectCategory
- Specified by:
getProjectCategoryin interfaceProject- Returns:
- the project category information for this project.
-
getProjectCategoryObject
Description copied from interface:ProjectReturns the Project Category for this Project.This is a synonym for
Project.getProjectCategory()that exists for legacy reasons.- Specified by:
getProjectCategoryObjectin interfaceProject- Returns:
- the project category information for this project.
- See Also:
-
setProjectCategory
-
setVersions
-
getGenericValue
public org.ofbiz.core.entity.GenericValue getGenericValue()- Specified by:
getGenericValuein interfaceProject- Returns:
- the GenericValue backing this project object
-
getLead
-
setLead
-
getLeadUserName
- Specified by:
getLeadUserNamein interfaceProject- Returns:
- the user name of the project lead
-
getAvatar
Description copied from interface:ProjectGives the currently-configuredAvatarfor this project. -
getProjectLead
- Specified by:
getProjectLeadin interfaceProject- Returns:
- the Project Lead
-
getLeadUserKey
- Specified by:
getLeadUserKeyin interfaceProject- Returns:
- the Project Lead's userkey
-
getOriginalKey
- Specified by:
getOriginalKeyin interfaceProject- Returns:
- the project key with which Project was originally created
-
isArchived
public boolean isArchived()- Specified by:
isArchivedin interfaceProject- Returns:
- true if this project is archived.
-
getArchivedBy
- Specified by:
getArchivedByin interfaceProject- Returns:
- the user who archived this project, or null if it wasn't archived.
-
getArchivedDate
- Specified by:
getArchivedDatein interfaceProject- Returns:
Datewhen this project was archived, or null if it wasn't archived.
-
setAvatar
-
equals
-
hashCode
public int hashCode() -
toString
-
setProjectTypeKey
-
setArchived
public void setArchived(boolean archived) -
setArchivedBy
-
setArchivedDate
-