com.atlassian.jira.rest.client
Interface ProjectRestClient


public interface ProjectRestClient

The client handling project resources.

Since:
v0.1

Method Summary
 Iterable<BasicProject> getAllProjects(ProgressMonitor progressMonitor)
          Returns all projects, which are visible for the currently logged in user.
 Project getProject(String key, ProgressMonitor progressMonitor)
          Retrieves complete information about given project.
 Project getProject(URI projectUri, ProgressMonitor progressMonitor)
          Retrieves complete information about given project.
 

Method Detail

getProject

Project getProject(String key,
                   ProgressMonitor progressMonitor)
Retrieves complete information about given project.

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

getProject

Project getProject(URI projectUri,
                   ProgressMonitor progressMonitor)
Retrieves complete information about given project. Use this method rather than getProject(String, ProgressMonitor) 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
progressMonitor - progress monitor
Returns:
complete information about given project
Throws:
RestClientException - in case of problems (connectivity, malformed messages, etc.)

getAllProjects

Iterable<BasicProject> getAllProjects(ProgressMonitor progressMonitor)
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:
progressMonitor - progress monitor
Returns:
projects which the currently logged user can see
Since:
client: 0.2, server 4.3


Copyright © 2011 Atlassian Pty Ltd. All Rights Reserved.