public interface Assets
MarketplaceClient.assets() to access this API.
Asset uploads are managed as follows:
MarketplaceClientFactory, you provided
an HttpConfiguration with HttpConfiguration.Credentials).
| Modifier and Type | Method and Description |
|---|---|
ArtifactId |
uploadAddonArtifact(File artifactFile)
Uploads an add-on artifact (.jar or .obr) to the Marketplace server, which can then
be used for an add-on version that you are planning to create.
|
ImageId |
uploadImage(File imageFile,
ImagePurpose imageType)
Uploads an image file to the Marketplace server, which can then be used for an image
property of a model object that you are planning to create or update.
|
ArtifactId uploadAddonArtifact(File artifactFile) throws MpacException
If successful, you will receive an ArtifactId, which you can pass to
ModelBuilders.AddonVersionBuilder#artifact.
Note that if the artifact is available online (for instance, an Atlassian Connect
descriptor), you can instead use ArtifactId.fromUri(java.net.URI) to
tell Marketplace where to get the artifact.
artifactFile - a local file containing the artifactArtifactId that uniquely identifies the new asset resourceMpacException - if the server was unavailable or returned an errorImageId uploadImage(File imageFile, ImagePurpose imageType) throws MpacException
If successful, you will receive an ImageId, which you can pass to one of the
ModelBuilders methods such as ModelBuilders.AddonBuilder#logo(com.atlassian.fugue.Option)
or ModelBuilders.ScreenshotBuilder#image(ImageId).
Note that if the image is available online, you do not have to upload it, but can
instead use ImageId.fromUri(java.net.URI) to tell Marketplace where
to get the image.
imageFile - a local file containing the image dataimageType - specifies what kind of property the image will be used for; this
determines how it will be scaledImageId that uniquely identifies the new asset resourceMpacException - if the server was unavailable or returned an errorCopyright © 2016 Atlassian. All rights reserved.