One published version of a marketplace app, theme, library or recipe, holding the listing details and the git branch that version's code lives on. A MarketPlaceItem is the product; a MarketPlacePublishedItem is a single release of it, and an item accumulates one of these per publish. The marketplace shows the most recently published version for the current cluster, so only versions whose clusters field matches the running cluster are offered. Title, brief, description, price and the imagery are copies taken at publish time, which is why an older version can still show the wording it was published with. The version number and content hash are read from the branch rather than stored on the row.
Group: Database Entities
Implements: Serializable, IMarketPlaceItem
Properties
| Property | Returns | Description |
|---|---|---|
| app | boolean | Whether this item provides an app, determined from the repository behind the marketplace item. False if the item has no repository. |
| appId | String | The identifier of the item, which is the owning marketplace item's name. This is the portable, path safe key used to install and reference the app, as opposed to the free text title. |
| availMode | String | Availability mode of the item, delegated to the owning marketplace item. Blank or null means the item is available to all accounts, and subacc restricts it to sub accounts. |
| banner | ItemImage | The wide banner image for the item's marketplace page, or null if none was uploaded. |
| bannerHref | String | URL for the banner image, served from the hashes file path. Null if no banner has been set. |
| branch | Branch | The git branch holding this version's code. Its name is the version number and its head commit supplies the content hash, so both are read from here rather than stored on the row. |
| brief | String | Short summary shown in marketplace listings, up to 5000 characters. Use this rather than the description where space is limited. |
| clusters | String | Comma separated list of cluster names this version may be installed on, with no spaces. The literal value all means every cluster, and null or blank means the default cluster only. Use supportsCluster rather than parsing this yourself. |
| commit | Commit | The commit that was published, recorded at publish time. The hash actually served comes from the branch head rather than from here. |
| description | String | Long form description shown on the item's marketplace page, up to 100000 characters. Copied from the item at publish time, so it reflects the wording as at this version. |
| hash | String | Content hash of this version, read from the head commit of its branch. Null if the row has no branch or the branch has no head commit. It is guaranteed to correspond to the version returned by getPublishedVersion. |
| id | long | Database generated primary key for this published version. |
| lib | boolean | Whether this item is a library, meaning its repository provides none of theme, app or recipe. False if the item has no repository. |
| logo | ItemImage | The logo image shown against the item in marketplace listings, or null if none was uploaded. |
| logoHref | String | URL for the logo image, served from the hashes file path. Null if no logo has been set. |
| marketPlaceItem | MarketPlaceItem | The marketplace item this is a published version of. Required, and it is where the item's name, type and availability mode come from. |
| price | BigDecimal | Price of the item as at this version. Null for a free item. |
| publishedBy | Profile | The profile who published this version. |
| publishedDate | Date | When this version was published. The marketplace picks the version with the greatest published date for the current cluster, so this is what decides which version is current. |
| publishedVersion | String | Version number of this published item, taken from the name of its own branch. Note this is this row's branch, which is not necessarily the item's current published version, for example when the row has been looked up for a specific version; the version and the hash always come from the same branch so they are guaranteed to match each other. Null if the row has no branch. |
| recipe | boolean | Whether this item provides a recipe, determined from the repository behind the marketplace item. False if the item has no repository. |
| screenshotHrefs | List<String> | URLs for the screenshot images, in display order, skipping any image with no hash. Never null, but it can be empty. |
| screenshots | List<ItemImage> | The screenshots shown on the item's marketplace page, in display order. Null if none have been added, so check before iterating. |
| theme | boolean | Whether this item provides a theme, determined from the repository behind the marketplace item. False if the item has no repository. |
| title | String | Display title of the item as at this version. This is a free text label with no uniqueness guarantee; the identifier is the owning marketplace item's name, available as the app id. |
| type | String | The kind of marketplace item this is, taken from the owning item, for example an app or a theme. |
Methods
getId() · getMarketPlaceItem() · setMarketPlaceItem(MarketPlaceItem marketPlaceItem) · getBranch() · setBranch(Branch branch) · getCommit() · getDescription() · getTitle() · setTitle(String title) · setDescription(String description) · getBrief() · setBrief(String brief) · getPrice() · setPrice(BigDecimal price) · getPublishedBy() · setPublishedBy(Profile publishedBy) · getPublishedDate() · setPublishedDate(Date publishedDate) · getBanner() · setBanner(ItemImage banner) · getLogo() · setLogo(ItemImage logo) · getScreenshots() · setScreenshots(List<ItemImage> screenshots) · getClusters() · setClusters(String clusters) · getAppId() · getType() · getPublishedVersion() · getHash() · getLogoHref() · getBannerHref() · getAvailMode() · getScreenshotHrefs() · isTheme() · isLib() · isApp() · isRecipe() · supportsCluster(String clusterVersion, boolean isDefaultCluster)
getId()
Returns: long
Database generated primary key for this published version.
getMarketPlaceItem()
Returns: MarketPlaceItem
The marketplace item this is a published version of. Required, and it is where the item's name, type and availability mode come from.
setMarketPlaceItem(MarketPlaceItem marketPlaceItem)
Returns: void
Sets the marketplace item this is a published version of.
| Parameter | Description |
|---|---|
marketPlaceItem | the owning marketplace item, required |
getBranch()
Returns: Branch
The git branch holding this version's code. Its name is the version number and its head commit supplies the content hash, so both are read from here rather than stored on the row.
setBranch(Branch branch)
Returns: void
Sets the branch this version was published from. Since the version and the hash are both read from the branch, changing it changes both.
| Parameter | Description |
|---|---|
branch | the branch holding this version's code |
getCommit()
Returns: Commit
The commit that was published, recorded at publish time. The hash actually served comes from the branch head rather than from here.
getDescription()
Returns: String
Long form description shown on the item's marketplace page, up to 100000 characters. Copied from the item at publish time, so it reflects the wording as at this version.
getTitle()
Returns: String
Display title of the item as at this version. This is a free text label with no uniqueness guarantee; the identifier is the owning marketplace item's name, available as the app id.
setTitle(String title)
Returns: void
Sets the display title for this published version.
| Parameter | Description |
|---|---|
title | the display title |
setDescription(String description)
Returns: void
Sets the long form description for this published version.
| Parameter | Description |
|---|---|
description | the description text, up to 100000 characters |
getBrief()
Returns: String
Short summary shown in marketplace listings, up to 5000 characters. Use this rather than the description where space is limited.
setBrief(String brief)
Returns: void
Sets the short listing summary for this published version.
| Parameter | Description |
|---|---|
brief | the summary text, up to 5000 characters |
getPrice()
Returns: BigDecimal
Price of the item as at this version. Null for a free item.
setPrice(BigDecimal price)
Returns: void
Sets the price for this published version.
| Parameter | Description |
|---|---|
price | the price, or null for a free item |
getPublishedBy()
Returns: Profile
The profile who published this version.
setPublishedBy(Profile publishedBy)
Returns: void
Records the profile who published this version.
| Parameter | Description |
|---|---|
publishedBy | the publishing profile |
getPublishedDate()
Returns: Date
When this version was published. The marketplace picks the version with the greatest published date for the current cluster, so this is what decides which version is current.
setPublishedDate(Date publishedDate)
Returns: void
Sets the date this version was published. This determines which version the marketplace treats as current.
| Parameter | Description |
|---|---|
publishedDate | the publish date |
getBanner()
Returns: ItemImage
The wide banner image for the item's marketplace page, or null if none was uploaded.
setBanner(ItemImage banner)
Returns: void
Sets the banner image for this published version.
| Parameter | Description |
|---|---|
banner | the banner image, or null |
getLogo()
Returns: ItemImage
The logo image shown against the item in marketplace listings, or null if none was uploaded.
setLogo(ItemImage logo)
Returns: void
Sets the logo image for this published version.
| Parameter | Description |
|---|---|
logo | the logo image, or null |
getScreenshots()
Returns: List<ItemImage>
The screenshots shown on the item's marketplace page, in display order. Null if none have been added, so check before iterating.
setScreenshots(List<ItemImage> screenshots)
Returns: void
Replaces the list of screenshots for this published version.
| Parameter | Description |
|---|---|
screenshots | the screenshot images in display order |
getClusters()
Returns: String
Comma separated list of cluster names this version may be installed on, with no spaces. The literal value all means every cluster, and null or blank means the default cluster only. Use supportsCluster rather than parsing this yourself.
setClusters(String clusters)
Returns: void
Sets which clusters this version may be installed on.
| Parameter | Description |
|---|---|
clusters | a comma separated list of cluster names, all for every cluster, or null for the default cluster only |
getAppId()
Returns: String
The identifier of the item, which is the owning marketplace item's name. This is the portable, path safe key used to install and reference the app, as opposed to the free text title.
getType()
Returns: String
The kind of marketplace item this is, taken from the owning item, for example an app or a theme.
getPublishedVersion()
Returns: String
Version number of this published item, taken from the name of its own branch. Note this is this row's branch, which is not necessarily the item's current published version, for example when the row has been looked up for a specific version; the version and the hash always come from the same branch so they are guaranteed to match each other. Null if the row has no branch.
getHash()
Returns: String
Content hash of this version, read from the head commit of its branch. Null if the row has no branch or the branch has no head commit. It is guaranteed to correspond to the version returned by getPublishedVersion.
getLogoHref()
Returns: String
URL for the logo image, served from the hashes file path. Null if no logo has been set.
getBannerHref()
Returns: String
URL for the banner image, served from the hashes file path. Null if no banner has been set.
getAvailMode()
Returns: String
Availability mode of the item, delegated to the owning marketplace item. Blank or null means the item is available to all accounts, and subacc restricts it to sub accounts.
getScreenshotHrefs()
Returns: List<String>
URLs for the screenshot images, in display order, skipping any image with no hash. Never null, but it can be empty.
isTheme()
Returns: boolean
Whether this item provides a theme, determined from the repository behind the marketplace item. False if the item has no repository.
isLib()
Returns: boolean
Whether this item is a library, meaning its repository provides none of theme, app or recipe. False if the item has no repository.
isApp()
Returns: boolean
Whether this item provides an app, determined from the repository behind the marketplace item. False if the item has no repository.
isRecipe()
Returns: boolean
Whether this item provides a recipe, determined from the repository behind the marketplace item. False if the item has no repository.
supportsCluster(String clusterVersion, boolean isDefaultCluster)
Returns: boolean
Whether this version may be installed on the given cluster. A blank clusters value means the default cluster only, the literal value all means every cluster, and otherwise the cluster name must appear in the comma separated list. Matching is exact on the whole name, so a partial name does not match.
| Parameter | Description |
|---|---|
clusterVersion | the name of the cluster being checked |
isDefaultCluster | true if that cluster is the default one, which is what a blank clusters value allows |