public interface MarketplaceClient extends Closeable
Construct a concrete implementation of the client (DefaultMarketplaceClient)
and use that instance for all API requests.
| Modifier and Type | Method and Description |
|---|---|
AddonCategories |
addonCategories()
Returns an API object that provides access to add-on categories.
|
Addons |
addons()
Returns an API object that provides access to add-on listings.
|
Applications |
applications()
Returns an API object that provides access to application listings.
|
Assets |
assets()
Returns an API object that provides file uploading capabilities.
|
void |
close()
Should be called when finished with client to release resources
|
HttpTransport |
getHttp()
Provides access to the underlying HTTP transport mechanism.
|
<T> Page<T> |
getMore(PageReference<T> ref)
Queries a page of a result set from a previous query, for any resource that provides paginated
results (such as
Addons.find(com.atlassian.marketplace.client.api.AddonQuery)). |
Links |
getRootLinks()
Returns the top-level API resource links, such as "addons".
|
boolean |
isReachable()
Checks whether the MPAC service is available, by attempting to get the root resource.
|
LicenseTypes |
licenseTypes()
Returns an API object that provides access to software license types.
|
Products |
products()
Returns an API object that provides access to product listings (which are called "applications" in the administrative UI).
|
<T> String |
toJson(T entity)
Attempts to convert the specified model object to a JSON string.
|
Vendors |
vendors()
Returns an API object that provides access to vendors.
|
boolean isReachable()
Addons addons() throws MpacException
MpacExceptionAddonCategories addonCategories() throws MpacException
MpacExceptionApplications applications() throws MpacException
MpacExceptionAssets assets() throws MpacException
MpacExceptionLicenseTypes licenseTypes() throws MpacException
MpacExceptionProducts products() throws MpacException
MpacExceptionVendors vendors() throws MpacException
MpacException<T> Page<T> getMore(PageReference<T> ref) throws MpacException
Addons.find(com.atlassian.marketplace.client.api.AddonQuery)). The PageReference is obtained by calling
Page.getPrevious(), Page.getNext(), or Page.getReference() on an existing
Page of results.Page containing the resultsMpacException - if the server was unavailable or returned an errorLinks getRootLinks() throws MpacException
Links objectMpacException - if the server was unavailable or returned an errorHttpTransport getHttp()
<T> String toJson(T entity) throws MpacException
entity - a model objectMpacException - if the object could not be serialized as JSON (for instance, because it
is not an instance of any of this library's model classes)void close()
close in interface AutoCloseableclose in interface CloseableCopyright © 2016 Atlassian. All rights reserved.