KeywordAssetInterface Class Reference

#include <asset_keyword.h>

Inheritance diagram for KeywordAssetInterface:

Static Public Member Functions

static MAXON_METHOD Result< KeywordAsset > Create ()
 
static MAXON_METHOD Result< BoolAddKeyword (const AssetDescription &target, const Id &keywordId, Bool userScope, const AssetRepositoryRef &updateUsageRepository)
 
static MAXON_METHOD Result< BoolRemoveKeyword (const AssetDescription &target, const Id &keywordId, Bool userScope)
 
static MAXON_METHOD Bool IsFavouriteAsset (const AssetDescription &ad)
 
static MAXON_METHOD Result< Tuple< Bool, Bool > > GetDefaultAssetState (const AssetDescription &ad)
 
static MAXON_METHOD Result< AssetDescription > GetDefaultAsset (const Id &type, const AssetRepositoryRef &lookupRepository)
 
static MAXON_METHOD Result< void > SetDefaultAsset (const AssetDescription &ad, Bool on)
 

Private Member Functions

 MAXON_INTERFACE (KeywordAssetInterface, MAXON_REFERENCE_COPY_ON_WRITE, "net.maxon.interface.keywordasset")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( KeywordAssetInterface  ,
MAXON_REFERENCE_COPY_ON_WRITE  ,
"net.maxon.interface.keywordasset"   
)
private

◆ Create()

static MAXON_METHOD Result<KeywordAsset> Create ( )
static

◆ AddKeyword()

static MAXON_METHOD Result<Bool> AddKeyword ( const AssetDescription &  target,
const Id keywordId,
Bool  userScope,
const AssetRepositoryRef &  updateUsageRepository 
)
static

AddKeyword adds a keyword to an asset.

Parameters
[in]targetAsset to add keywords.
[in]keywordIdKeyword Id to add.
[in]userScopeTrue to use ASSETMETADATA::UserKeywords other wise ASSETMETADATA::Keywords.
Returns
True if a keyword was added. False if the keyword was not added - that means it already exists. Error if it was not possible to add the keyword.

◆ RemoveKeyword()

static MAXON_METHOD Result<Bool> RemoveKeyword ( const AssetDescription &  target,
const Id keywordId,
Bool  userScope 
)
static

RemoveKeyword removes a keyword from an asset.

Parameters
[in]targetAsset to remove keywords.
[in]keywordIdKeyword Id to remove.
[in]userScopeTrue to use ASSETMETADATA::UserKeywords other wise ASSETMETADATA::Keywords.
Returns
True if a keyword was found and removed. False if the keyword was not found on the asset. Error if it was not possible to remove the keyword.

◆ IsFavouriteAsset()

static MAXON_METHOD Bool IsFavouriteAsset ( const AssetDescription &  ad)
static

IsFavouriteAsset returns true if the given asset is a favourite.

Parameters
[in]adAsset to inspect.
Returns
True if favourite.

◆ GetDefaultAssetState()

static MAXON_METHOD Result<Tuple<Bool, Bool> > GetDefaultAssetState ( const AssetDescription &  ad)
static

◆ GetDefaultAsset()

static MAXON_METHOD Result<AssetDescription> GetDefaultAsset ( const Id type,
const AssetRepositoryRef &  lookupRepository 
)
static

◆ SetDefaultAsset()

static MAXON_METHOD Result<void> SetDefaultAsset ( const AssetDescription &  ad,
Bool  on 
)
static