@PublicApi public interface

Project

implements WithId WithKey Named NamedWithDescription
com.atlassian.jira.project.Project
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Defines a project in JIRA.

Summary

Public Methods
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()
This method is deprecated. Use getProjectComponents(). Since v4.1.
Long getCounter()
This method is deprecated. (since 5.0) The counter is not something users of project information should concern themselves with. This call delegates through to ProjectManager.getCurrentCounterForProject().
String getDescription()
String getEmail()
GenericValue getGenericValue()
This method is deprecated. only use this if you need to utilize an older API method
Long getId()
Collection<IssueType> getIssueTypes()
String getKey()
User getLead()
This method is deprecated. Use getProjectLead(), which returns application users, instead. Since v6.0.
User getLeadUser()
This method is deprecated. Use getLead() instead.
String getLeadUserKey()
String getLeadUserName()
String getName()
@Internal String getOriginalKey()
GenericValue getProjectCategory()
This method is deprecated. Use getProjectCategoryObject() instead. Since v5.1.
ProjectCategory getProjectCategoryObject()
Collection<ProjectComponent> getProjectComponents()
Returns the components for this Project.
ApplicationUser getProjectLead()
String getUrl()
Collection<Version> getVersions()
[Expand]
Inherited Methods
From interface com.atlassian.jira.entity.WithId
From interface com.atlassian.jira.entity.WithKey
From interface com.atlassian.jira.util.Named
From interface com.atlassian.jira.util.NamedWithDescription

Public Methods

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 ()

This method is deprecated.
Use getProjectComponents(). Since v4.1.

Returns the components for this Project.

Returns
  • the components for this Project.

public Long getCounter ()

This method is deprecated.
(since 5.0) The counter is not something users of project information should concern themselves with. This call delegates through to ProjectManager.getCurrentCounterForProject().

Returns
  • the last number used to generate an issue key. E.g. Counter = 2, issue key: HSP-2

public String getDescription ()

Returns
  • the project description

public String getEmail ()

Returns
  • the project email address from which email notifications are sent.

public GenericValue getGenericValue ()

This method is deprecated.
only use this if you need to utilize an older API method

Returns
  • the GenericValue backing this project object

public Long getId ()

Returns
  • the id of the project

public Collection<IssueType> getIssueTypes ()

Returns

public String getKey ()

Returns
  • the project key.

public User getLead ()

This method is deprecated.
Use getProjectLead(), which returns application users, instead. Since v6.0.

Returns
  • the Project Lead

public User getLeadUser ()

This method is deprecated.
Use getLead() instead.

Returns the Project Lead

Returns
  • the Project Lead

public String getLeadUserKey ()

Returns
  • the Project Lead's userkey

public String getLeadUserName ()

Returns
  • the user name of the project lead

public String getName ()

Returns
  • the name of the project.

@Internal public String getOriginalKey ()

@Internal

This method is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

Returns
  • the project key with which Project was originally created

public GenericValue getProjectCategory ()

This method is deprecated.
Use getProjectCategoryObject() instead. Since v5.1.

Returns
  • a GV containing the project category information for this project.

public ProjectCategory getProjectCategoryObject ()

Returns
  • the project category information for this project.

public Collection<ProjectComponent> getProjectComponents ()

Returns the components for this Project.

Returns
  • the components for this Project.

public ApplicationUser getProjectLead ()

Returns
  • the Project Lead

public String getUrl ()

Returns
  • the project URL

public Collection<Version> getVersions ()

Returns
  • a Collection of Version for this project