maxon.KeywordAssetInterface

Description

An Asset represents digital content which can be managed by an maxon.AssetRepositoryRef “asset repository”. The management includes versioning, meta data and automatic updates.

Inheritance diagram

Inheritance

Parent Class:

Child Class:

Methods Signature

AddKeyword(target, keywordId, userScope, …)

Adds a keyword to an asset.

Create()

return

A new reference of maxon.KeywordAssetInterface.

GetDefaultAsset(type, lookupRepository)

Returns the default preset for the given type.

GetDefaultAssetState(ad)

Checks if the given asset is a preset.

IsFavouriteAsset(ad)

Returns true if the given asset is a favourite.

RemoveKeyword(target, keywordId, userScope)

Removes a keyword from an asset.

SetDefaultAsset(ad, on)

Sets the default state of the given preset asset.

Methods Definition

static KeywordAssetInterface.AddKeyword(target, keywordId, userScope, updateUsageRepository)

Adds a keyword to an asset.

Parameters
Returns

True if a keyword was added. False if the keyword was not added - that means it already exists.

Return type

bool

static KeywordAssetInterface.Create()
Returns

A new reference of maxon.KeywordAssetInterface.

Return type

maxon.KeywordAsset.

static KeywordAssetInterface.GetDefaultAsset(type, lookupRepository)

Returns the default preset for the given type.

Parameters
Returns

AssetDescription on success.

Return type

maxon.AssetDescription

static KeywordAssetInterface.GetDefaultAssetState(ad)

Checks if the given asset is a preset.

Parameters

ad (maxon.AssetDescription) – Asset to look at.

Returns

First: True if it is an preset, Second: True if the asset is the default asset.

Return type

maxon.Tuple [bool, bool]

static KeywordAssetInterface.IsFavouriteAsset(ad)

Returns true if the given asset is a favourite.

Parameters

ad (maxon.AssetDescription) – Asset to inspect.

Returns

True if favourite.

Return type

bool

static KeywordAssetInterface.RemoveKeyword(target, keywordId, userScope)

Removes a keyword from an asset.

Parameters
Returns

True if a keyword was found and removed. False if the keyword was not found on the asset.

Return type

bool

static KeywordAssetInterface.SetDefaultAsset(ad, on)

Sets the default state of the given preset asset. Every type can only have one preset as default.

Parameters
  • ad (maxon.AssetDescription) – Asset to modify.

  • on (bool) – True to make this preset the default. False to make it no longer the default.