User Tools

Site Tools


DzProductAssetContainer

A container for a collection of assets presented as a single entity.

More...

Inherits :

Enumerations

Properties

Static Methods

Methods

Detailed Description

The “Product” container type represents a collection of assets (and supporting files/metadata) that are presented as a single entity to the end-user. Each product is assigned a Globally Unique Idendtifier (GUID) that is used to identify that entity within the content ecosystem. Once a GUID has been assigned to a product (at creation), it does not (and should not) change.

While nearly all of the information that defines a product can be replicated into another, for logistical reasons a GUID can only be associated with one “Store” (source) at any single moment in its lifetime. This means that if more than one content package containing metadata that defines a given GUID is installed by an end-user, the last package installed will define the product in the database.

By default, all newly created assets are assigned to a “LOCAL USER” product. This product is represented by a GUID consisting entirely of zeros; i.e., “00000000-0000-0000-0000-000000000000”

The “LOCAL USER” product is associated with the “LOCAL USER” store (source); this cannot be modified.

See Also:

Enumerations


: ProductMetadataType

The different types of metadata for the product.

  • User - Metadata that is created, owned and maintained by the user.
  • Vendor - Metadata that is created, owned and maintained by the vendor (originating source).
  • UserAndVendor - Metadata that is created, owned and maintained by the vendor (originating source) and/or the user.

Properties


Array : artistNames

Holds the list of artist names associated with this product.

Since:

  • 4.9.0.2

Date : dateInstalled

Holds the date this product was installed. Can be set (since 4.11.0.193) if isLocalUserStore is true (except where isLocalUser is true).

Since:

  • 4.9.0.2

Date : dateLastUpdated

Holds the date this product was last updated. Can be set (since 4.11.0.193) if isLocalUserStore is true (except where isLocalUser is true).

Since:

  • 4.9.0.2

Date : datePurchased

Holds the date this product was purchased. Can be set (since 4.11.0.193) if isLocalUserStore is true (except where isLocalUser is true).

Since:

  • 4.9.0.2

Date : dateReleased

Holds the date this product was released. Can be set (since 4.11.0.193) if isLocalUserStore is true (except where isLocalUser is true).

Since:

  • 4.9.0.2

String : description

Holds the vendor description of this product.


Number : groupId

Holds the group identifier for the product. 0 = default, < 0 = app defined, > 0 = user defined.

Since:

  • 4.9.0.11

String : guid

Holds the Globally Unique Identifier (GUID) associated with this product. (Read Only)

Since:

  • 4.8.1.95

Boolean : hasCloudMetadata

Holds whether this product has metadata provided by the cloud. (Read Only)

Since:

  • 4.9.0.2

Boolean : hidden

Holds whether this product should be hidden in product views.

Since:

  • 4.9.0.2

String : iconPath

Holds the path of the icon for this product. (Read Only)

Since:

  • 4.11.0.193

Boolean : isCloudInstallable

Holds whether this product can be installed from the cloud. (Read Only)

Since:

  • 4.9.0.10

Boolean : isCloudInstalled

Holds whether this product is installed from the cloud. (Read Only)

Since:

  • 4.9.0.2

Boolean : isCloudOperationInProgress

Holds whether a cloud operation is currently occurring for this product. (Read Only)

Since:

  • 4.9.0.2

Boolean : isCloudOwned

Holds whether this product is managed by the cloud. (Read Only)

Since:

  • 4.9.0.2

Boolean : isDownloadingFromCloud

Holds whether this product is currently downloading from the cloud. (Read Only)

Since:

  • 4.9.0.2

Boolean : isInstalled

Holds whether this product is installed. (Read Only)

Since:

  • 4.9.0.2

Boolean : isLocalUser

Holds whether this product is the special product that holds locally created assets. (Read Only)

Since:

  • 4.9.0.18

Boolean : isLocalUserStore

Holds whether this product's store is the special store for locally created products. (Read Only)

Since:

  • 4.11.0.193

Boolean : isMetadataValid

Holds whether the metadata for this product is valid. (Read Only)

Since:

  • 4.9.0.2

Return Value:

  • true if the metadata is valid, otherwise false.

Since:

  • 4.9.0.2

Boolean : isVendor

Holds whether this product is owned by a vendor or by the user. (Read Only)


Boolean : needsCloudInstall

Holds whether this product needs to be installed from the cloud. (Read Only)

Since:

  • 4.9.0.10

Boolean : needsCloudUpdate

Holds whether this product needs to be updated from the cloud. (Read Only)

Since:

  • 4.9.0.2

String : store

Holds the name of the store for this product. (Read Only)

Since:

  • 4.9.0.2

String : title

Holds the title/name of this product.

Since:

  • 4.9.0.2

String : token

Holds the token (i.e. SKU) for this product. (Read Only)

Since:

  • 4.9.0.2

Static Methods


Size : getDefaultStoreIconSize()

Return Value:

  • The default store icon size.

Since:

  • 4.9.3.110

Methods


void : cancelFromCloud()

Cancels any pending cloud operation on the product, if any.

Since:

  • 4.9.0.21

void : clearGroup()

Sets the product as belonging to the default group identifier; 0.

Since:

  • 4.9.0.11

Array : getCategories( ProductMetadataType metaType=UserAndVendor, Boolean installedAssets=true )

Parameter(s):

  • metaType - The type of categories to get.
  • installedAssets - If true, only the categories of installed assets are included in the list, otherwise the categories of all assets regardless of installed state are included.

Return Value:

  • A list of the category paths associated with this product.

Since:

  • 4.9.0.54

Size : getIconSize()

Return Value:

  • The current icon size.

Image : getImage()

Return Value:

  • The image that is used to draw the icon for this product.

Since:

  • 4.11.0.193

String : getMetadataXML( ProductMetadataType metaType=UserAndVendor )

Parameter(s):

  • metaType - The type of metadata to get.

Return Value:

  • The metadata for this product, in an XML string.

Since:

  • 4.9.0.11

String : getMetadataXMLPath( Boolean userData=false )

Parameter(s):

  • userData - If true, the basename of the file will reflect the user rather than the store.

Return Value:

  • The relative file path of the XML metadata file for this product.

Since:

  • 4.9.0.2

String : getRealtiveInstallPath()

Return Value:

  • The relative path that this product installs too.

Since:

  • 4.9.0.46

Array : getSupportFiles( Boolean forceRefresh=false )

Parameter(s):

  • forceRefresh - If true, ignores any previously cached list of support files and causes the database to be queried explicitly.

Return Value:

  • The list of files in this product that are not user facing.

Since:

  • 4.9.0.2

String : getURL()

Return Value:

  • The URL associated with this product.

void : installFromCloud()

Installs a product from the cloud if it is not currently installed. The user will be prompted to authenticate if necessary.

Since:

  • 4.9.0.2

Boolean : isGroup( Number group )

Return Value:

  • true if the product is belongs to group, otherwise false.

Attention:

  • 0 = default, < 0 = app defined, > 0 = user defined

Since:

  • 4.9.0.11

Boolean : loadDefaultIcon()

Loads the default icon for this product.

Return Value:

  • true if the icon was loaded, otherwise false.

Boolean : loadProductImage()

Causes the product image to be loaded.

Return Value:

  • true if the product image is loaded, otherwise false.

Boolean : pushMetadata()

Pushes the metadata information into the database.

Return Value:

  • true if the metadata was successfully pushed to the database, otherwise false.

Attention:

  • This method retrieves data from the database immediately prior to updating the title, artist names, and description using locally set values and pushing the data back into the database.

Since:

  • 4.9.0.2

void : setIconSize( Size size )

Sets the icon size for this product container.

Parameter(s):

  • size - The new icon size.

void : setImage( Image img )

Sets the image that will be used to draw the icon for this product.

Parameter(s):

  • img - The new image for this product.

See Also:

Since:

  • 4.11.0.193

void : setURL( String url )

Sets the URL for this asset container

Parameter(s):

  • url - The URL to use for this container

void : uninstall()

Uninstalls the product if it is currently installed.

Since:

  • 4.9.0.2

void : uninstallFromCloud()

Uninstalls the product if it is currently installed.

Since:

  • 4.9.0.2

void : updateFromCloud()

Updates the product if no other operations are currently being performed on it. The user will be prompted to authenticate if necessary.

Since:

  • 4.9.0.2

void : updateMetaDataFromCloud( Boolean force=false )

Updates the metadata for this product. The user will be prompted to authenticate if necessary.

Parameter(s):

  • force - If true, any cached data will be discarded and force a connection to be made.

Since:

  • 4.9.0.32