User Tools

Site Tools


DzProductAssetContainer

Class for containing product assets.

More...

Inherits :

Enumerations

Properties

Static Methods

Methods

DAZ Script
voidcancelFromCloud ()
voidclearGroup ()
ArraygetCategories ( ProductMetadataType metaType=UserAndVendor, Boolean installedAssets=true )
SizegetIconSize ()
StringgetMetadataXML ( ProductMetadataType metaType=UserAndVendor )
StringgetMetadataXMLPath ( Boolean userData=false )
StringgetRealtiveInstallPath ()
ArraygetSupportFiles ( Boolean forceRefresh=false )
StringgetURL ()
voidinstallFromCloud ()
BooleanisGroup ( Number group )
BooleanloadDefaultIcon ()
BooleanloadProductImage ()
BooleanpushMetadata ()
voidsetIconImage ( Image map )
voidsetIconSize ( Size size )
voidsetURL ( String url )
voiduninstall ()
voiduninstallFromCloud ()
BooleanupdateChildren ()
voidupdateFromCloud ()
voidupdateMetaDataFromCloud ( Boolean force=false )

Detailed Description

This class is used to contain all assets related to a product

Enumerations


: ProductMetadataType

TODO: Add description.

  • User - TODO: Add description.
  • Vendor - TODO: Add description.
  • UserAndVendor - TODO: Add description.

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. (Read Only)

Since:

  • 4.9.0.2

Date : dateLastUpdated

Holds the date this product was last updated. (Read Only)

Since:

  • 4.9.0.2

Date : datePurchased

Holds the date this product was purchased. (Read Only)

Since:

  • 4.9.0.2

Date : dateReleased

Holds the date this product was released. (Read Only)

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

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 : 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

Number : platinumPrice

Deprecated

Value is always -1.


Number : price

Deprecated

Value is always -1.


Number : salePrice

Deprecated

Value is always -1.


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.

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:

  • relative path to which 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, false otherwise

Boolean : loadProductImage()

TODO: Add description.


Boolean : pushMetadata()

Pushes the metadata information into the asset system.

Since:

  • 4.9.0.2

void : setIconImage( Image map )

Sets the pixmap for this product.

Parameter(s):

  • map - The new pixmap for this product.

void : setIconSize( Size size )

Sets the icon size for this product container.

Parameter(s):

  • size - The new icon size.

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

Boolean : updateChildren()

Does nothing, since this container has no children.

Return Value:

  • true

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