An asset which is a combination of fields and relationships to other assets rather than a stored file. It extends Asset without adding members of its own, so it carries the same unique id, name, format, asset types and relations as any other asset, while its field values are held by the implementation as XML and read back through the asset service. Because it is not created by uploading a file, the asset manager's upload methods never return one; server side JavaScript gets one from createContentItem, which builds an item for a given content type, or from contentSearch, which searches the library for existing content items.

Group: Assets

Extends: Asset


Inherited from Asset

Properties

PropertyReturnsDescription
allRelationsList<Relation>Every relation which points from this asset to another one, for example the thumbnail of a video. This reads the relations from the database, so treat it as a query rather than as a cheap field read.
assetTypesList<String>The asset type names this asset is tagged with, which is how the library is filtered into groups such as banners or product shots. Types are applied when the asset is uploaded and can be added afterwards, and the list is empty rather than null when the asset has none.
authorProfileIdLongIdentifier of the profile which created the asset, where that was recorded. Null for assets which were not attributed to a person.
createdDateDateWhen the asset was first added to the library. Duplicating an asset keeps the created date of the asset it was copied from.
formatStringThe media format of the asset, for example image, video, text, or a media type such as text and html. Treat it as the asset's type; searching the library matches on this as well as on the name, and uploading through the asset manager routes on it to decide whether an image, a video or a plain binary file is created.
languageStringLanguage code for the asset's content, used to pick the right variant when the same asset exists in several languages. Null when the asset is not language specific.
modifiedDateDateWhen the asset was last changed. It is set by whatever updates the asset, so it is only as accurate as the code which maintains it.
nameStringHuman readable name for the asset, used when searching the library and when listing assets. It is not guaranteed to be unique within a tenant.
notesStringFree text notes about the asset, describing what it is or how it should be used. Set when the asset is uploaded, and null when nothing has been recorded.
relatedEntityIdLongIdentifier of a profile or organisation this asset relates to, typically set when the asset is a contract document belonging to one specific person or organisation. Null for a general library asset. It can be set when uploading through the asset manager by passing a related entity id.
uniqueIdStringA globally unique identifier for the asset, usually a UUID. This is the stable handle to refer to an asset by, so use it rather than a database id when linking to an asset from content, and note that a duplicated asset is given a fresh one.

Methods

getUniqueId() · getName() · getAuthorProfileId() · getRelatedEntityId() · getCreatedDate() · getModifiedDate() · getFormat() · getNotes() · getAssetTypes() · getLanguage() · getAllRelations() · getRelations(String predicate) · getRelationsTo(String predicate)

getUniqueId()

Returns: String

A globally unique identifier for the asset, usually a UUID. This is the stable handle to refer to an asset by, so use it rather than a database id when linking to an asset from content, and note that a duplicated asset is given a fresh one.

getName()

Returns: String

Human readable name for the asset, used when searching the library and when listing assets. It is not guaranteed to be unique within a tenant.

getAuthorProfileId()

Returns: Long

Identifier of the profile which created the asset, where that was recorded. Null for assets which were not attributed to a person.

getRelatedEntityId()

Returns: Long

Identifier of a profile or organisation this asset relates to, typically set when the asset is a contract document belonging to one specific person or organisation. Null for a general library asset. It can be set when uploading through the asset manager by passing a related entity id.

getCreatedDate()

Returns: Date

When the asset was first added to the library. Duplicating an asset keeps the created date of the asset it was copied from.

getModifiedDate()

Returns: Date

When the asset was last changed. It is set by whatever updates the asset, so it is only as accurate as the code which maintains it.

getFormat()

Returns: String

The media format of the asset, for example image, video, text, or a media type such as text and html. Treat it as the asset's type; searching the library matches on this as well as on the name, and uploading through the asset manager routes on it to decide whether an image, a video or a plain binary file is created.

getNotes()

Returns: String

Free text notes about the asset, describing what it is or how it should be used. Set when the asset is uploaded, and null when nothing has been recorded.

getAssetTypes()

Returns: List<String>

The asset type names this asset is tagged with, which is how the library is filtered into groups such as banners or product shots. Types are applied when the asset is uploaded and can be added afterwards, and the list is empty rather than null when the asset has none.

getLanguage()

Returns: String

Language code for the asset's content, used to pick the right variant when the same asset exists in several languages. Null when the asset is not language specific.

getAllRelations()

Returns: List<Relation>

Every relation which points from this asset to another one, for example the thumbnail of a video. This reads the relations from the database, so treat it as a query rather than as a cheap field read.

getRelations(String predicate)

Returns: List<Relation>

Finds the relations of one kind which point from this asset to another, for example the thumb relation from a video to its thumbnail image. This reads from the database, so treat it as a query rather than as a cheap field read.

ParameterDescription
predicatethe name of the relationship to match, usually the type of the relationship to the object, for example "thumb"

getRelationsTo(String predicate)

Returns: List<Relation>

Finds the relations of one kind which point at this asset from other assets, in other words the reverse of getRelations. This reads from the database, so treat it as a query rather than as a cheap field read.

ParameterDescription
predicatethe name of the relationship to match, for example "thumb" to find the assets which use this asset as their thumbnail
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.