AssetUtilitiesInterface Class Reference

#include <asset_utilities.h>

Detailed Description

Helper Interface for Asset functions.

Static Public Member Functions

static MAXON_METHOD Result< StringIncreaseAssetVersion (const String &currentVersion)
 
static MAXON_METHOD Result< void > AssetSetMetaData (const AssetDescription &asset, const String &assetName, const String &assetVersion, const Id &assetCategory)
 
static MAXON_METHOD Result< UrlGetAssetIcon (const AssetDescription &asset)
 
static MAXON_METHOD Result< EnumDataTypeGetEnumTypeForVersions (const AssetRepositoryRef &repo, const AssetType &type, const Id &assetId)
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (AssetUtilitiesInterface, MAXON_REFERENCE_STATIC, "net.maxon.asset.helperinterface")
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( AssetUtilitiesInterface  ,
MAXON_REFERENCE_STATIC  ,
"net.maxon.asset.helperinterface"   
)
private

◆ IncreaseAssetVersion()

static MAXON_METHOD Result<String> IncreaseAssetVersion ( const String currentVersion)
static

IncreaseAssetVersion description.

Parameters
[in]currentVersionIncreases the version string by one. e.g. "1.0" -> "1.1" or "1.0.99" -> "1.1.00"
Returns
New Version String on success.

◆ AssetSetMetaData()

static MAXON_METHOD Result<void> AssetSetMetaData ( const AssetDescription &  asset,
const String assetName,
const String assetVersion,
const Id assetCategory 
)
static

Sets the asset meta data for the given asset.

Parameters
[in]assetAsset to modify
[in]assetNameHuman readable asset name.
[in]assetVersionAsset version to set.
[in]assetCategoryAsset category to set.
Returns
OK on success.

◆ GetAssetIcon()

static MAXON_METHOD Result<Url> GetAssetIcon ( const AssetDescription &  asset)
static

Returns the asset icon. It returns the preview stored under ASSETMETADATA::ASSET_PREVIEWIMAGEURL

Parameters
[in]assetAsset to use.
Returns
Url to the preview icon on success.

◆ GetEnumTypeForVersions()

static MAXON_METHOD Result<EnumDataType> GetEnumTypeForVersions ( const AssetRepositoryRef &  repo,
const AssetType &  type,
const Id assetId 
)
static

Returns an EnumDataType which contains all versions of the asset, plus an additional "latest" entry.

Parameters
[in]repoThe asset repository for the lookup.
[in]typeThe asset type of the asset.
[in]assetIdThe asset id to look for.
Returns
An enum type which has "latest" as first entry and all found versions of the asset as following entries.