com.atlassian.jira.project
Class MockProject

java.lang.Object
  extended by com.atlassian.jira.project.MockProject
All Implemented Interfaces:
WithId, WithKey, Project, Named, NamedWithDescription

public class MockProject
extends Object
implements Project

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


Constructor Summary
MockProject()
           
MockProject(org.ofbiz.core.entity.GenericValue gv)
           
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, org.ofbiz.core.entity.GenericValue projectGV)
           
MockProject(Long id, String key, String name, org.ofbiz.core.entity.GenericValue projectGV)
           
 
Method Summary
 boolean equals(Object o)
           
 Long getAssigneeType()
          Returns the default assignee for issues that get created in this project.
 Avatar getAvatar()
          Gives the currently-configured Avatar for this project.
 Collection<org.ofbiz.core.entity.GenericValue> getComponents()
          Returns the components for this Project.
 Long getCounter()
           
 String getDescription()
           
 String getEmail()
           
 org.ofbiz.core.entity.GenericValue getGenericValue()
           
 Long getId()
           
 Collection<IssueType> getIssueTypes()
           
 String getKey()
           
 com.atlassian.crowd.embedded.api.User getLead()
           
 com.atlassian.crowd.embedded.api.User getLeadUser()
          Returns the Project Lead
 String getLeadUserKey()
           
 String getLeadUserName()
           
 String getName()
           
 String getOriginalKey()
           
 org.ofbiz.core.entity.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<org.ofbiz.core.entity.GenericValue> components)
           
 void setCounter(Long counter)
           
 void setDescription(String description)
           
 MockProject setEmail(String email)
           
 void setId(Long id)
           
 MockProject setIssueTypes(Collection<IssueType> types)
           
 MockProject setIssueTypes(IssueType... types)
           
 MockProject setIssueTypes(String... types)
           
 void setKey(String key)
           
 void setLead(ApplicationUser lead)
           
 void setLead(com.atlassian.crowd.embedded.api.User lead)
           
 void setName(String name)
           
 void setProjectCategoryGV(org.ofbiz.core.entity.GenericValue projectCategoryGV)
           
 void setProjectComponents(Collection<ProjectComponent> projectComponents)
           
 void setUrl(String url)
           
 void setVersions(Collection<Version> versions)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MockProject

public MockProject(org.ofbiz.core.entity.GenericValue gv)

MockProject

public MockProject()

MockProject

public MockProject(long id)

MockProject

public MockProject(Long id)

MockProject

public MockProject(long id,
                   String key)

MockProject

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

MockProject

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

MockProject

public MockProject(long id,
                   String key,
                   String name,
                   org.ofbiz.core.entity.GenericValue projectGV)

MockProject

public MockProject(Long id,
                   String key,
                   String name,
                   org.ofbiz.core.entity.GenericValue projectGV)
Method Detail

getAssigneeType

public Long getAssigneeType()
Description copied from interface: Project
Returns the default assignee for issues that get created in this project. Returns AssigneeTypes.PROJECT_LEAD or AssigneeTypes.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:
getAssigneeType in interface Project
Returns:
the default assignee. NB: Can return NULL

setAssigneeType

public void setAssigneeType(Long assigneeType)

getProjectComponents

public Collection<ProjectComponent> getProjectComponents()
Description copied from interface: Project
Returns the components for this Project.

Specified by:
getProjectComponents in interface Project
Returns:
the components for this Project.

setProjectComponents

public void setProjectComponents(Collection<ProjectComponent> projectComponents)

getComponents

public Collection<org.ofbiz.core.entity.GenericValue> getComponents()
Description copied from interface: Project
Returns the components for this Project.

Specified by:
getComponents in interface Project
Returns:
the components for this Project.
See Also:
Project.getProjectComponents()

setComponents

public void setComponents(Collection<org.ofbiz.core.entity.GenericValue> components)

getCounter

public Long getCounter()
Specified by:
getCounter in interface Project
Returns:
the last number used to generate an issue key. E.g. Counter = 2, issue key: HSP-2

setCounter

public void setCounter(Long counter)

getDescription

public String getDescription()
Specified by:
getDescription in interface Project
Specified by:
getDescription in interface NamedWithDescription
Returns:
the project description

setDescription

public void setDescription(String description)

getId

public Long getId()
Specified by:
getId in interface WithId
Specified by:
getId in interface Project
Returns:
the id of the project

setId

public void setId(Long id)

getKey

public String getKey()
Specified by:
getKey in interface WithKey
Specified by:
getKey in interface Project
Returns:
the project key.

setKey

public void setKey(String key)

getName

public String getName()
Specified by:
getName in interface Project
Specified by:
getName in interface Named
Returns:
the name of the project.

setName

public void setName(String name)

getUrl

public String getUrl()
Specified by:
getUrl in interface Project
Returns:
the project URL

setUrl

public void setUrl(String url)

setEmail

public MockProject setEmail(String email)

getEmail

public String getEmail()
Specified by:
getEmail in interface Project
Returns:
the project email address from which email notifications are sent.

getVersions

public Collection<Version> getVersions()
Specified by:
getVersions in interface Project
Returns:
a Collection of Version for this project

getIssueTypes

public Collection<IssueType> getIssueTypes()
Specified by:
getIssueTypes in interface Project
Returns:
a Collection of IssueType for this project

setIssueTypes

public MockProject setIssueTypes(IssueType... types)

setIssueTypes

public MockProject setIssueTypes(Collection<IssueType> types)

setIssueTypes

public MockProject setIssueTypes(String... types)

getProjectCategory

public org.ofbiz.core.entity.GenericValue getProjectCategory()
Specified by:
getProjectCategory in interface Project
Returns:
a GV containing the project category information for this project.

getProjectCategoryObject

public ProjectCategory getProjectCategoryObject()
Specified by:
getProjectCategoryObject in interface Project
Returns:
the project category information for this project.

setProjectCategoryGV

public void setProjectCategoryGV(org.ofbiz.core.entity.GenericValue projectCategoryGV)

setVersions

public void setVersions(Collection<Version> versions)

getGenericValue

public org.ofbiz.core.entity.GenericValue getGenericValue()
Specified by:
getGenericValue in interface Project
Returns:
the GenericValue backing this project object

getLead

public com.atlassian.crowd.embedded.api.User getLead()
Specified by:
getLead in interface Project
Returns:
the Project Lead

getLeadUser

public com.atlassian.crowd.embedded.api.User getLeadUser()
Description copied from interface: Project
Returns the Project Lead

Specified by:
getLeadUser in interface Project
Returns:
the Project Lead

setLead

public void setLead(ApplicationUser lead)

setLead

public void setLead(com.atlassian.crowd.embedded.api.User lead)

getLeadUserName

public String getLeadUserName()
Specified by:
getLeadUserName in interface Project
Returns:
the user name of the project lead

getAvatar

@Nonnull
public Avatar getAvatar()
Description copied from interface: Project
Gives the currently-configured Avatar for this project.

Specified by:
getAvatar in interface Project
Returns:
the current Avatar, never null.

getProjectLead

public ApplicationUser getProjectLead()
Specified by:
getProjectLead in interface Project
Returns:
the Project Lead

getLeadUserKey

public String getLeadUserKey()
Specified by:
getLeadUserKey in interface Project
Returns:
the Project Lead's userkey

getOriginalKey

public String getOriginalKey()
Specified by:
getOriginalKey in interface Project
Returns:
the project key with which Project was originally created

setAvatar

public void setAvatar(Avatar avatar)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2014 Atlassian. All Rights Reserved.