public interface Addons
MarketplaceClient.addons()
to access this API.| Modifier and Type | Method and Description |
|---|---|
boolean |
claimAccessToken(String addonKey,
String token)
Checks if the access token for the given add-on is valid for this application instance to use,
and if so, marks it as claimed by this instance (based on the current hostname).
|
Addon |
createAddon(Addon addon)
Creates a new add-on listing.
|
AddonVersion |
createVersion(String addonKey,
AddonVersion version)
Creates a new version for an existing add-on.
|
Page<AddonSummary> |
find(AddonQuery query)
Returns a list of add-ons.
|
Page<AddonReference> |
findBanners(AddonQuery query)
Similar to
find(com.atlassian.marketplace.client.api.AddonQuery), but further restricts the query to add-ons that have a banner image,
and returns minimal AddonReference results, whose AddonReference.getImage() method
will return the banner image. |
Page<AddonReference> |
findRecommendations(String addonKey,
AddonQuery query)
Returns add-ons that Marketplace considers similar to the specified add-on in some way,
optionally constrained by compatibility or other
AddonQuery properties. |
com.atlassian.fugue.Option<Addon> |
getByKey(String addonKey,
AddonQuery query)
Queries detail information for a single add-on.
|
com.atlassian.fugue.Option<AddonPricing> |
getPricing(String addonKey,
PricingType pricingType)
Queries the current pricing (the prices that are publicly visible on the Marketplace site) for
an add-on.
|
com.atlassian.fugue.Option<AddonVersion> |
getVersion(String addonKey,
AddonVersionSpecifier version,
AddonVersionsQuery query)
Queries one version of an add-on.
|
Addon |
updateAddon(Addon original,
Addon updated)
Attempts to modify an existing add-on.
|
AddonVersion |
updateVersion(AddonVersion original,
AddonVersion updated)
Attempts to modify an existing add-on version.
|
com.atlassian.fugue.Option<Addon> getByKey(String addonKey, AddonQuery query) throws MpacException
addonKey - the add-on's unique keyquery - an AddonQuery which may contain criteria to limit the search, such as the
compatible application version; use AddonQuery.any() if there are no additional criteriaOption.none() if there is no matchMpacException - if the server was unavailable or returned an errorPage<AddonSummary> find(AddonQuery query) throws MpacException
query - an AddonQueryMpacException - if the server was unavailable or returned an errorAddon createAddon(Addon addon) throws MpacException
Use ModelBuilders.addon() to build a new
Addon object. The add-on must include an initial version; to set this, use
ModelBuilders.AddonBuilder.version(Option).
addon - the add-on to createAddon representing the add-on in its initial state after being createdMpacException - if the server was unavailable or returned an errorAddon updateAddon(Addon original, Addon updated) throws MpacException
getByKey(String, com.atlassian.marketplace.client.api.AddonQuery);
then, build another instance that includes any changes you want to make, using
ModelBuilders.addon(Addon).original - the existing add-onupdated - a copy of the add-on that includes some changesMpacException - if the server was unavailable or returned an errorcom.atlassian.fugue.Option<AddonVersion> getVersion(String addonKey, AddonVersionSpecifier version, AddonVersionsQuery query) throws MpacException
addonKey - the add-on's unique keyversion - an AddonVersionSpecifier which designates either a specific
version or the latest versionquery - an AddonVersionsQuery which may contain criteria to limit the search, such as the
compatible application version; use AddonVersionsQuery.any() if there are no additional criteriaOption.none() if there is no matchMpacException - if the server was unavailable or returned an errorAddonVersion createVersion(String addonKey, AddonVersion version) throws MpacException
Use ModelBuilders.addonVersion() to build a new
AddonVersion object.
addonKey - unique key of the existing add-onversion - the add-on version to createAddonVersion representing the version in its initial state after being createdMpacException - if the server was unavailable or returned an errorAddonVersion updateVersion(AddonVersion original, AddonVersion updated) throws MpacException
getVersion(String, AddonVersionSpecifier, AddonVersionsQuery);
then, build another instance that includes any changes you want to make, using
ModelBuilders.addonVersion(AddonVersion).original - the existing add-on versionupdated - a copy of the version that includes some changesMpacException - if the server was unavailable or returned an errorcom.atlassian.fugue.Option<AddonPricing> getPricing(String addonKey, PricingType pricingType) throws MpacException
none() if the add-on is not paid via Atlassian, is not available
for the given hosting model, or has not yet been approved.addonKey - unique key of the add-onpricingType - specifies pricing for Cloud or ServerMpacExceptionPage<AddonReference> findBanners(AddonQuery query) throws MpacException
find(com.atlassian.marketplace.client.api.AddonQuery), but further restricts the query to add-ons that have a banner image,
and returns minimal AddonReference results, whose AddonReference.getImage() method
will return the banner image.query - an AddonQueryMpacException - if the server was unavailable or returned an errorPage<AddonReference> findRecommendations(String addonKey, AddonQuery query) throws MpacException
AddonQuery properties.addonKey - the add-on's unique keyquery - an AddonQuery which may contain criteria to limit the search, such as the
compatible application version; use AddonQuery.any() if there are no additional criteriaMpacException - if the server was unavailable or returned an errorboolean claimAccessToken(String addonKey, String token) throws MpacException
addonKey - the add-on's unique keytoken - the license token to checkMpacException - if the server was unavailable or returned an errorCopyright © 2016 Atlassian. All rights reserved.