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)
           
 
Method Summary
 javax.ws.rs.core.Response createAvatarFromTemporary(String key, AvatarCroppingBean croppingInstructions)
          Converts temporary avatar into a real avatar
 javax.ws.rs.core.Response deleteAvatar(String key, Long id)
          Deletes avatar
 javax.ws.rs.core.Response getAllAvatars(String key)
          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 getProject(String key)
          Contains a full representation of a project in JSON format.
 javax.ws.rs.core.Response getProjectComponents(String key)
          Contains a full representation of a the specified project's components.
 javax.ws.rs.core.Response getProjectVersions(String key, String expand)
          Contains a full representation of a the specified project's versions.
 javax.ws.rs.core.Response storeTemporaryAvatar(String key, String filename, Long size, javax.servlet.http.HttpServletRequest request)
          Creates temporary avatar
 javax.ws.rs.core.Response storeTemporaryAvatarUsingMultiPart(String key, 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 key, 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)
Method Detail

getProject

public javax.ws.rs.core.Response getProject(String key)
Contains a full representation of a project in JSON format.

Parameters:
key - the project key
Returns:
a project

getProjectVersions

public javax.ws.rs.core.Response getProjectVersions(String key,
                                                    String expand)
Contains a full representation of a the specified project's versions.

Parameters:
key - the project key
Returns:
the passed project's versions.

getProjectComponents

public javax.ws.rs.core.Response getProjectComponents(String key)
Contains a full representation of a the specified project's components.

Parameters:
key - the 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 key)
Returns all avatars which are visible for the currently logged in user. The avatars are grouped into system and custom.

Parameters:
key - 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 key,
                                                           AvatarCroppingBean croppingInstructions)
Converts temporary avatar into a real avatar

Parameters:
key - project key
croppingInstructions - cropping instructions
Returns:
created avatar

updateProjectAvatar

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

storeTemporaryAvatar

public javax.ws.rs.core.Response storeTemporaryAvatar(String key,
                                                      String filename,
                                                      Long size,
                                                      @Context
                                                      javax.servlet.http.HttpServletRequest request)
Creates temporary avatar

Parameters:
key - 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 key,
                                                                    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:
key - Project key
request - servlet request
Returns:
temporary avatar cropping instructions
Since:
v5.0

deleteAvatar

public javax.ws.rs.core.Response deleteAvatar(String key,
                                              Long id)
Deletes avatar

Parameters:
key - Project key
id - database id for avatar
Returns:
temporary avatar cropping instructions
Since:
v5.0


Copyright © 2002-2013 Atlassian. All Rights Reserved.