public class

ProjectResource

extends Object
java.lang.Object
   ↳ com.atlassian.jira.rest.v2.issue.ProjectResource

Summary

Public Constructors
ProjectResource(ProjectService projectService, JiraAuthenticationContext authContext, UriInfo uriInfo, VersionService versionService, ProjectComponentService projectComponentService, AvatarService avatarService, UserManager userManager, ProjectBeanFactory projectBeanFactory, VersionBeanFactory versionBeanFactory, PermissionManager permissionManager, ProjectManager projectManager, AvatarManager avatarManager, AvatarPickerHelper avatarPickerHelper, AttachmentHelper attachmentHelper, JiraBaseUrls jiraBaseUrls, WorkflowManager workflowManager, IssueTypeSchemeManager issueTypeSchemeManager, ResourceUriBuilder uriBuilder, StatusHelper statusHelper, ProjectFinder projectFinder, XsrfInvocationChecker xsrfChecker, JiraAvatarSupport jiraAvatarSupport)
Public Methods
Response createAvatarFromTemporary(String projectIdOrKey, AvatarCroppingBean croppingInstructions)
Converts temporary avatar into a real avatar
Response deleteAvatar(String projectIdOrKey, Long id)
Deletes avatar
Response getAllAvatars(String projectIdOrKey)
Returns all avatars which are visible for the currently logged in user.
Response getAllProjects(String expand)
Returns all projects which are visible for the currently logged in user.
Response getAllStatuses(String projectIdOrKey)
Get all issue types with valid status values for a project
Response getProject(String projectIdOrKey, String expand)
Contains a full representation of a project in JSON format.
Response getProjectComponents(String projectIdOrKey)
Contains a full representation of a the specified project's components.
Response getProjectVersions(String projectIdOrKey, String expand)
Contains a full representation of a the specified project's versions.
Response storeTemporaryAvatar(String projectIdOrKey, String filename, Long size, HttpServletRequest request)
Creates temporary avatar
Response storeTemporaryAvatarUsingMultiPart(String projectIdOrKey, FilePart filePart, HttpServletRequest request)
Creates temporary avatar using multipart.
Response updateProjectAvatar(String projectIdOrKey, AvatarBean avatarBean)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ProjectResource (ProjectService projectService, JiraAuthenticationContext authContext, UriInfo uriInfo, VersionService versionService, ProjectComponentService projectComponentService, AvatarService avatarService, UserManager userManager, ProjectBeanFactory projectBeanFactory, VersionBeanFactory versionBeanFactory, PermissionManager permissionManager, ProjectManager projectManager, AvatarManager avatarManager, AvatarPickerHelper avatarPickerHelper, AttachmentHelper attachmentHelper, JiraBaseUrls jiraBaseUrls, WorkflowManager workflowManager, IssueTypeSchemeManager issueTypeSchemeManager, ResourceUriBuilder uriBuilder, StatusHelper statusHelper, ProjectFinder projectFinder, XsrfInvocationChecker xsrfChecker, JiraAvatarSupport jiraAvatarSupport)

Public Methods

public Response createAvatarFromTemporary (String projectIdOrKey, AvatarCroppingBean croppingInstructions)

Converts temporary avatar into a real avatar

Parameters
projectIdOrKey project id or project key
croppingInstructions cropping instructions
Returns
  • created avatar

public Response deleteAvatar (String projectIdOrKey, Long id)

Deletes avatar

Parameters
projectIdOrKey Project id or project key
id database id for avatar
Returns
  • temporary avatar cropping instructions

public Response getAllAvatars (String projectIdOrKey)

Returns all avatars which are visible for the currently logged in user. The avatars are grouped into system and custom.

Parameters
projectIdOrKey project id or project key
Returns
  • all avatars for which the user has the BROWSE project permission.

public Response getAllProjects (String expand)

Returns all projects which are visible for the currently logged in user. If no user is logged in, it returns the list of projects that are visible when using anonymous access.

Parameters
expand the parameters to expand
Returns
  • all projects for which the user has the BROWSE project permission. If no user is logged in, it returns all projects, which are visible when using anonymous access.

public Response getAllStatuses (String projectIdOrKey)

Get all issue types with valid status values for a project

Parameters
projectIdOrKey Project id or project key
Returns
  • collection of issue types with possi

public Response getProject (String projectIdOrKey, String expand)

Contains a full representation of a project in JSON format.

All project keys associated with the project will only be returned if expand=projectKeys.

Parameters
projectIdOrKey the project id or project key
expand the parameters to expand
Returns
  • a project

public Response getProjectComponents (String projectIdOrKey)

Contains a full representation of a the specified project's components.

Parameters
projectIdOrKey the project id or project key
Returns
  • the passed project's components.

public Response getProjectVersions (String projectIdOrKey, String expand)

Contains a full representation of a the specified project's versions.

Parameters
projectIdOrKey the project id or project key
expand the parameters to expand
Returns
  • the passed project's versions.

public Response storeTemporaryAvatar (String projectIdOrKey, String filename, Long size, HttpServletRequest request)

Creates temporary avatar

Parameters
projectIdOrKey Project id or project key
filename name of file being uploaded
size size of file
request servlet request
Returns
  • temporary avatar cropping instructions

public Response storeTemporaryAvatarUsingMultiPart (String projectIdOrKey, FilePart filePart, HttpServletRequest request)

Creates temporary avatar using multipart. The response is sent back as JSON stored in a textarea. This is because the client uses remote iframing to submit avatars using multipart. So we must send them a valid HTML page back from which the client parses the JSON.

Parameters
projectIdOrKey Project id or project key
request servlet request
Returns
  • temporary avatar cropping instructions

public Response updateProjectAvatar (String projectIdOrKey, AvatarBean avatarBean)