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

PropertyReturnsDescription
appbooleanWhether this item provides an app, determined from the repository behind the marketplace item. False if the item has no repository.
appIdStringThe 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.
availModeStringAvailability 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.
bannerItemImageThe wide banner image for the item's marketplace page, or null if none was uploaded.
bannerHrefStringURL for the banner image, served from the hashes file path. Null if no banner has been set.
branchBranchThe 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.
briefStringShort summary shown in marketplace listings, up to 5000 characters. Use this rather than the description where space is limited.
clustersStringComma 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.
commitCommitThe commit that was published, recorded at publish time. The hash actually served comes from the branch head rather than from here.
descriptionStringLong 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.
hashStringContent 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.
idlongDatabase generated primary key for this published version.
libbooleanWhether this item is a library, meaning its repository provides none of theme, app or recipe. False if the item has no repository.
logoItemImageThe logo image shown against the item in marketplace listings, or null if none was uploaded.
logoHrefStringURL for the logo image, served from the hashes file path. Null if no logo has been set.
marketPlaceItemMarketPlaceItemThe marketplace item this is a published version of. Required, and it is where the item's name, type and availability mode come from.
priceBigDecimalPrice of the item as at this version. Null for a free item.
publishedByProfileThe profile who published this version.
publishedDateDateWhen 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.
publishedVersionStringVersion 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.
recipebooleanWhether this item provides a recipe, determined from the repository behind the marketplace item. False if the item has no repository.
screenshotHrefsList<String>URLs for the screenshot images, in display order, skipping any image with no hash. Never null, but it can be empty.
screenshotsList<ItemImage>The screenshots shown on the item's marketplace page, in display order. Null if none have been added, so check before iterating.
themebooleanWhether this item provides a theme, determined from the repository behind the marketplace item. False if the item has no repository.
titleStringDisplay 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.
typeStringThe 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.

ParameterDescription
marketPlaceItemthe 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.

ParameterDescription
branchthe 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.

ParameterDescription
titlethe display title

setDescription(String description)

Returns: void

Sets the long form description for this published version.

ParameterDescription
descriptionthe 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.

ParameterDescription
briefthe 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.

ParameterDescription
pricethe 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.

ParameterDescription
publishedBythe 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.

ParameterDescription
publishedDatethe 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.

ParameterDescription
bannerthe banner image, or null

Returns: ItemImage

The logo image shown against the item in marketplace listings, or null if none was uploaded.

Returns: void

Sets the logo image for this published version.

ParameterDescription
logothe 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.

ParameterDescription
screenshotsthe 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.

ParameterDescription
clustersa 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.

ParameterDescription
clusterVersionthe name of the cluster being checked
isDefaultClustertrue if that cluster is the default one, which is what a blank clusters value allows
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.