public interface

JiraSetupService

com.atlassian.bitbucket.jira.JiraSetupService

Class Overview

Encapsulates Jira interactions for:

  1. creating a reciprocated (2-way) Application Link;
  2. authenticating that link with Trusted Applications; and
  3. (optionally) creating a user directory from the selected Jira server.
This has been designed and tested with the setup process in mind, and makes the assumption that both the local application and the remote Jira server have identical user bases and trust.

Summary

Public Methods
void createLink(URI remoteRpcUrl, URI localRpcUrl, String username, String password, boolean setupUserManagement)
Create an authenticated, reciprocated Application Link to a Jira server, and optionally set up a Jira user directory for it.

Public Methods

public void createLink (URI remoteRpcUrl, URI localRpcUrl, String username, String password, boolean setupUserManagement)

Create an authenticated, reciprocated Application Link to a Jira server, and optionally set up a Jira user directory for it.

Parameters
remoteRpcUrl RPC URL of the remote Jira application
localRpcUrl RPC URL of the local Jira application that is resolvable by the remote Jira application
username Jira administrator username
password password corresponding to the supplied username
setupUserManagement if true, create a local user directory backed by the remote Jira server
Throws
JiraSetupException if something goes wrong with link creation, authentication or Crowd delegation. Clients should display the exception message to the user and log the exception.