Download Method
Description
Downloads an asset and its related assets.
Syntax
Visual Basic
Public Function Download( _
   ByVal Condition As String, _
   ByVal FilterMask As Long _
) As String
Parameters
Condition
A user-defined string.
FilterMask
A user-defined bit mask.
Return Type
An XML string describing the items downloaded.
Remarks

If any assets or resources are used by the item being downloaded, they are also downloaded, depending on the value of the condition. If any AssetRepositoryItem objects are used by the item, the condition and filter must both match for the related AssetRepositoryItem objects to be downloaded.

This download of related items is recursive. That is, if a used item that qualifies to be downloaded with the primary item also owns relations, those relations are evaluated. The second-level used items are also downloaded if they qualify. If any of these second-level related items that qualify for download own relations, they too are evaluated, and so on.

The test for qualification at all levels is as follows:

The Condition argument is compared to the ASR_CONDITION field of the AssetRelation objects owned by the object being downloaded. If the Condition matches the ASR_CONDITION field, the relation qualifies. If Condition is an empty string, the relation's ASR_CONDITION field is ignored and the relation qualifies.

If the relation qualifies and the related entity is not an AssetRepositoryItem object, the related entity is downloaded.

If the relation qualifies and the related entity is an AssetRepositoryItem object, the filter is checked. A bit-wise AND is performed between the FilterMask argument and the ARI_FILTER field of the AssetRepositoryItem Object. If the result is not zero, the AssetRepositoryItem is downloaded.

See Also