com.atlassian.jira.rest.client.api
Interface ProjectRestClient


public interface ProjectRestClient

The com.atlassian.jira.rest.client.api handling project resources.

Since:
v0.1

Method Summary
 com.atlassian.util.concurrent.Promise<java.lang.Iterable<BasicProject>> getAllProjects()
          Returns all projects, which are visible for the currently logged in user.
 com.atlassian.util.concurrent.Promise<Project> getProject(java.lang.String key)
          Retrieves complete information about given project.
 com.atlassian.util.concurrent.Promise<Project> getProject(java.net.URI projectUri)
          Retrieves complete information about given project.
 

Method Detail

getProject

com.atlassian.util.concurrent.Promise<Project> getProject(java.lang.String key)
Retrieves complete information about given project.

Parameters:
key - unique key of the project (usually 2+ characters)
Returns:
complete information about given project
Throws:
RestClientException - in case of problems (connectivity, malformed messages, etc.)

getProject

com.atlassian.util.concurrent.Promise<Project> getProject(java.net.URI projectUri)
Retrieves complete information about given project. Use this method rather than getProject(String) wheever you can, as this method is proof for potential changes of URI scheme used for exposing various resources by JIRA REST API.

Parameters:
projectUri - URI to project resource (usually get from self attribute describing component elsewhere
Returns:
complete information about given project
Throws:
RestClientException - in case of problems (connectivity, malformed messages, etc.)

getAllProjects

com.atlassian.util.concurrent.Promise<java.lang.Iterable<BasicProject>> 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:
projects which the currently logged user can see
Since:
com.atlassian.jira.rest.client.api: 0.2, server 4.3


Copyright © 2015 Atlassian. All Rights Reserved.