com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client
Class ProjectClient

java.lang.Object
  extended by com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient<ProjectClient>
      extended by com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.ProjectClient

public class ProjectClient
extends RestApiClient<ProjectClient>

Client class for the Project resource.

Since:
v4.3

Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
RestApiClient.Method
 
Field Summary
 
Fields inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
REST_VERSION
 
Constructor Summary
ProjectClient(JIRAEnvironmentData environmentData)
          Constructs a new ProjectClient for a JIRA instance.
 
Method Summary
 Project get(String projectKey)
          GETs the project having the given key.
 Avatar getAvatar(String key, Long id)
          GETs a single avatar, associated with the passed project
 Map<String,List<Avatar>> getAvatars(String key)
          GETs a map of avatars, associated with the passed project.
 List<Component> getComponents(String key)
          GETs a list of components, associated with the passed project.
 List<Project> getProjects()
          GETs a list of versions, which are visible to the current user.
 Response getResponse(String projectKey)
          GETs the project having the given key, and returns a Response.
 List<Version> getVersions(String key)
          GETs a list of versions, associated with the passed project.
 Response getVersionsResponse(String projectKey)
          GETs the versions associated with the passed project.
protected  com.sun.jersey.api.client.WebResource projectComponentWithKey(String projectKey)
          Returns a WebResource for the versions gi
protected  com.sun.jersey.api.client.WebResource projects()
          Returns a WebResource for the projects visible to the current user.
protected  com.sun.jersey.api.client.WebResource projectVersionWithKey(String projectKey)
          Returns a WebResource for the versions gi
protected  com.sun.jersey.api.client.WebResource projectWithKey(String projectKey)
          Returns a WebResource for the project having the given key.
 
Methods inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
anonymous, createResource, errorResponse, expanded, loginAs, loginAs, percentEncode, resourceRoot, setOf, toResponse, toResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectClient

public ProjectClient(JIRAEnvironmentData environmentData)
Constructs a new ProjectClient for a JIRA instance.

Parameters:
environmentData - The JIRA environment data
Method Detail

get

public Project get(String projectKey)
            throws com.sun.jersey.api.client.UniformInterfaceException
GETs the project having the given key.

Parameters:
projectKey - a String containing the project key
Returns:
a Project
Throws:
com.sun.jersey.api.client.UniformInterfaceException - if there is a problem

getProjects

public List<Project> getProjects()
GETs a list of versions, which are visible to the current user.

Returns:
a map of projects.

getVersions

public List<Version> getVersions(String key)
GETs a list of versions, associated with the passed project.

Parameters:
key - the key of the project to query.
Returns:
a list of versions.

getAvatars

public Map<String,List<Avatar>> getAvatars(String key)
GETs a map of avatars, associated with the passed project.

Parameters:
key - the key of the project to query.
Returns:
a map of avatars, system and custom

getAvatar

public Avatar getAvatar(String key,
                        Long id)
GETs a single avatar, associated with the passed project

Parameters:
key - the key of the project to query
id - the database id of the avatar
Returns:
avatar

getResponse

public Response getResponse(String projectKey)
GETs the project having the given key, and returns a Response.

Parameters:
projectKey - a String containing the project key
Returns:
a Response

getVersionsResponse

public Response getVersionsResponse(String projectKey)
GETs the versions associated with the passed project.

Parameters:
projectKey - a String containing the project key
Returns:
a Response

getComponents

public List<Component> getComponents(String key)
GETs a list of components, associated with the passed project.

Parameters:
key - the key of the project to query.
Returns:
a list of components.

projectWithKey

protected com.sun.jersey.api.client.WebResource projectWithKey(String projectKey)
Returns a WebResource for the project having the given key.

Parameters:
projectKey - a String containing the project key
Returns:
a Response

projectVersionWithKey

protected com.sun.jersey.api.client.WebResource projectVersionWithKey(String projectKey)
Returns a WebResource for the versions gi

Parameters:
projectKey - a String containing the project key
Returns:
a Response

projectComponentWithKey

protected com.sun.jersey.api.client.WebResource projectComponentWithKey(String projectKey)
Returns a WebResource for the versions gi

Parameters:
projectKey - a String containing the project key
Returns:
a Response

projects

protected com.sun.jersey.api.client.WebResource projects()
Returns a WebResource for the projects visible to the current user.

Returns:
a Response


Copyright © 2002-2012 Atlassian. All Rights Reserved.