com.atlassian.jira.rest.v2.issue
Class ProjectResource

java.lang.Object
  extended by com.atlassian.jira.rest.v2.issue.ProjectResource

public class ProjectResource
extends Object

Since:
4.2

Constructor Summary
ProjectResource(ProjectService projectService, JiraAuthenticationContext authContext, javax.ws.rs.core.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)
           
 
Method Summary
 javax.ws.rs.core.Response createAvatarFromTemporary(String projectIdOrKey, AvatarCroppingBean croppingInstructions)
          Converts temporary avatar into a real avatar
 javax.ws.rs.core.Response deleteAvatar(String projectIdOrKey, Long id)
          Deletes avatar
 javax.ws.rs.core.Response getAllAvatars(String projectIdOrKey)
          Returns all avatars which are visible for the currently logged in user.
 javax.ws.rs.core.Response getAllProjects()
          Returns all projects which are visible for the currently logged in user.
 javax.ws.rs.core.Response getAllStatuses(String projectIdOrKey)
          Get all issue types with valid status values for a project
 javax.ws.rs.core.Response getProject(String projectIdOrKey, String expand)
          Contains a full representation of a project in JSON format.
 javax.ws.rs.core.Response getProjectComponents(String projectIdOrKey)
          Contains a full representation of a the specified project's components.
 javax.ws.rs.core.Response getProjectVersions(String projectIdOrKey, String expand)
          Contains a full representation of a the specified project's versions.
 javax.ws.rs.core.Response storeTemporaryAvatar(String projectIdOrKey, String filename, Long size, javax.servlet.http.HttpServletRequest request)
          Creates temporary avatar
 javax.ws.rs.core.Response storeTemporaryAvatarUsingMultiPart(String projectIdOrKey, com.atlassian.plugins.rest.common.multipart.FilePart filePart, javax.servlet.http.HttpServletRequest request)
          Creates temporary avatar using multipart.
 javax.ws.rs.core.Response updateProjectAvatar(String projectIdOrKey, AvatarBean avatarBean)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectResource

public ProjectResource(ProjectService projectService,
                       JiraAuthenticationContext authContext,
                       javax.ws.rs.core.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)
Method Detail

getProject

public javax.ws.rs.core.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
Returns:
a project

getProjectVersions

public javax.ws.rs.core.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
Returns:
the passed project's versions.

getProjectComponents

public javax.ws.rs.core.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.

getAllProjects

public javax.ws.rs.core.Response getAllProjects()
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.

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.
Since:
v4.3

getAllAvatars

public javax.ws.rs.core.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.
Since:
v5.0

createAvatarFromTemporary

public javax.ws.rs.core.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

updateProjectAvatar

public javax.ws.rs.core.Response updateProjectAvatar(String projectIdOrKey,
                                                     AvatarBean avatarBean)

storeTemporaryAvatar

public javax.ws.rs.core.Response storeTemporaryAvatar(String projectIdOrKey,
                                                      String filename,
                                                      Long size,
                                                      @Context
                                                      javax.servlet.http.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
Since:
v5.0

storeTemporaryAvatarUsingMultiPart

public javax.ws.rs.core.Response storeTemporaryAvatarUsingMultiPart(String projectIdOrKey,
                                                                    com.atlassian.plugins.rest.common.multipart.FilePart filePart,
                                                                    @Context
                                                                    javax.servlet.http.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
Since:
v5.0

deleteAvatar

public javax.ws.rs.core.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
Since:
v5.0

getAllStatuses

public javax.ws.rs.core.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
Since:
v6.0


Copyright © 2002-2014 Atlassian. All Rights Reserved.