Skip to content

A java library to install an Atlassian Connect cloud app to an Atlassian Cloud product (Confluence/Jira) for development/testing.

Notifications You must be signed in to change notification settings

cbromberg/upm-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SonarCloud

upm-client

A java library to install an Atlassian Connect cloud app to an Atlassian Cloud product (Confluence/Jira) for development/testing. Inspired by https://github.com/xat/upm-install. It can also retrieve information about installed apps and apply or remove private tokens.

upm-client-api

The API consists of the UpmClient interface, the json package is an optional representation for the responses.

upm-client-jaxrs

This is build on top of the JAX-RS 2.1 API. It does not have a dependency on a JAX-RS implementation, you have to choose your own. The integration tests for this are using Jersey. If you care to create a PR with tests using a different implementation feel free.

The only dependency this has is org.json

You can hand in a configured Client object on creation, it will not be changed by the code. Authentication is implemented stateless and has no side-effect on your client. This way you can also safely use any object-binding library, e.g. Jackson or GSON.

Usage

class InstallAndSetLicenseToken {

    public static void main(String[] args) {
        UpmClient.ProductAccess productAccess = new UpmClient.ProductAccess("https://upm-client.atlassian.net/wiki", "username", "apiToken");
        UpmClient upmClient = new JaxRsUpmClient(ClientBuilder.newClient(), productAccess);
        upmClient.install("https://my.app.net/atlassian-connect.json");
        upmClient.setLicenseToken("appkey", token, UpmClient.TokenState.ACTIVE_TRIAL.class, UpmTokenResponse.class);
        upmClient.uninstall("appkey");        
    }
}

About

A java library to install an Atlassian Connect cloud app to an Atlassian Cloud product (Confluence/Jira) for development/testing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages