InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IManageableAsset Class Referenceabstract

#include <IManageableAsset.h>

Inheritance diagram for IManageableAsset:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IMANAGEABLEASSET }
 
enum  AssetType { enUndefined = 0, enDocument = 1, enLinked = 2, enUnmanageable = 3 }
 

Public Member Functions

virtual IAssetMonitorGetAssetMonitor ()=0
 
virtual bool16 GetAssetURL (PMString &outURL)=0
 
virtual IAMLockableGetLockable ()=0
 
virtual bool16 GetReadFile (IDFile &file)=0
 
virtual ClassID GetServiceProviderClass () const =0
 
virtual IAssetStateMachineGetStateMachine ()=0
 
virtual IManagedStatusGetStatus ()=0
 
virtual IManageableAsset::AssetType GetType ()=0
 
virtual bool16 GetWriteFile (IDFile &file)=0
 
virtual bool16 HasVersionedContent () const =0
 
virtual bool16 IsBound () const =0
 
virtual bool16 IsTemporary ()=0
 
virtual bool16 IsVersioned () const =0
 
virtual void SetAssetMonitor (IAssetMonitor *assetMonitor)=0
 
virtual void SetAssetURL (const PMString &url)=0
 
virtual void SetHasVersionedContent (bool16 b)=0
 
virtual void SetIsBound (bool16 b=kTrue)=0
 
virtual void SetIsVersioned (bool16 b)=0
 
virtual void SetLockable (IAMLockable *lock)=0
 
virtual void SetReadFile (const IDFile &file)=0
 
virtual void SetServiceProviderClass (ClassID id)=0
 
virtual void SetStateMachine (IAssetStateMachine *sm)=0
 
virtual void SetStatus (IManagedStatus *status)=0
 
virtual void SetType (IManageableAsset::AssetType t)=0
 
virtual void SetWriteFile (const IDFile &file)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

The IManageableAsset interface represents a managed asset. A "managed asset" is one that is under the control of an asset management system (for example, Version Cue).

The IManageableAsset interface is added to any boss whose content can reside in an asset management system. InDesign documents may reside in an asset managment system, and IDataLinks may refer to content in an asset management system, so both the kDocBoss and the kDataLinkBoss aggregate this interface.

The default implementation for this interface is kManageableAssetImpl; for most applications, the default implementation can be used rather than creating a new implementation.

Member Enumeration Documentation

The AssetType defines how an IManageableAsset is used within InDesign.
Enumerator
enUndefined 

No type has been assigned

enDocument 

Identifies a document asset

enLinked 

Identifies a linked asset

enUnmanageable 

Identifies an unmanaged instance; asset management capability will not be bound to it.

Member Function Documentation

virtual IAssetMonitor* IManageableAsset::GetAssetMonitor ()
pure virtual

This method retrieves the IAssetMonitor bound to this asset.

Returns
valid pointer to an IAssetMonitor or nil if no asset monitor was found that could monitor the asset.
virtual bool16 IManageableAsset::GetAssetURL (PMStringoutURL)
pure virtual

This method retrieves the asset URL if it has been set.

Parameters
outURLis PMString to be populated with the URL.
Returns
kTrue if there is a URL, kFalse otherwise.
See Also
IManageableAsset::SetAssetURL.
virtual IAMLockable* IManageableAsset::GetLockable ()
pure virtual

This method retrieves the IAMLockable instance for this IManageableAsset instance.

Returns
a valid pointer to an IAMLockable instance or nil. Returning nil indicates that this asset is not lockable.
See Also
IAMLockable.
virtual bool16 IManageableAsset::GetReadFile (IDFilefile)
pure virtual

This method applies only to a file-based asset. Retrieves the IDFile of the location that the asset was read from. The IDFile may be for a temporary file, so this method should never be used to obtain the file to write to; use GetWriteFile() instead.

Parameters
fileis set to the IDFile that the asset was read from.
Returns
kTrue if the file param was set to a valid path.
See Also
IManageableAsset::GetWriteFile.
virtual ClassID IManageableAsset::GetServiceProviderClass () const
pure virtual

This method retrieves the ClassID for the IAMServiceProvider for this asset that was set during binding.

Returns
kInvalidClass until a service provider is bound to this instance. After binding, returns the IAMServiceProvider that recognizes this asset.
See Also
IAMSPManager::BindAsset.
virtual IAssetStateMachine* IManageableAsset::GetStateMachine ()
pure virtual

This method retrieves the IAssetStateMachine that can process IManagedStatus changes for the asset.

Returns
a valid pointer to an IAssetStateMachine instance or nil if not set.
virtual IManagedStatus* IManageableAsset::GetStatus ()
pure virtual

This method retrieves the IManagedStatus instance for the asset. May legally return nil if the AMSP implementation does not support status monitoring of assets.

Returns
a valid pointer to an IManagedStatus instance or nil.
See Also
IManagedStatus.
virtual IManageableAsset::AssetType IManageableAsset::GetType ()
pure virtual

This method retrieves the AssetType that was set during binding.

Returns
one of the predefined AssetTypes.
See Also
IAMSPManager::BindAsset.
virtual bool16 IManageableAsset::GetWriteFile (IDFilefile)
pure virtual

This method applies only to a file-based asset. Retrieves the IDFile of the location that the asset can be written to. Only writeable assets like documents and stories have a write file.

Parameters
fileis set to the IDFile of the write file.
Returns
kTrue if the file param was set to a valid path.
virtual bool16 IManageableAsset::HasVersionedContent () const
pure virtual

This method tests if this IManageable asset represents versioned content. "Versioned" in this case refers to historical versions rather than, say, different language versions.

Returns
kTrue if versioned; kFalse otherwise.
See Also
IManageableAsset::SetHasVersionedContent.
virtual bool16 IManageableAsset::IsBound () const
pure virtual

This method tests if this IManageableAsset instance has been properly bound and can be used successfully in workgroup API calls.

Returns
kTrue if bound; kFalse if not.
See Also
IAMSPManager::BindAsset.
virtual bool16 IManageableAsset::IsTemporary ()
pure virtual

This method applies only to a file-based asset. It tests if the IManageableAsset instance was created from a temporary file supplied by the asset management system. For Version Cue assets, this method returns kTrue for an IManageableAsset representing an historical version.

Returns
kTrue if temporary asset file; fFalse otherwise.
virtual bool16 IManageableAsset::IsVersioned () const
pure virtual

This method tests if this asset is versioned; i.e., tests if the asset maintains a history of revisions. This method is similar to the IManageableAsset::HasVersionedContent method; however, this method will return kFalse for an IManageableAsset::enLinked asset (even when linked to versioned content) unless the link itself is versioned. For enDocument assets, this method returns the same as the HasVersionedContent method.

Returns
kTrue if versioned; kFalse if not.
See Also
IManageableAsset::HasVersionedContent.
virtual void IManageableAsset::SetAssetMonitor (IAssetMonitorassetMonitor)
pure virtual

This method sets the current IAssetMonitor. The method is called during binding.

Parameters
assetMonitoris a valid pointer to an IAssetMonitor instance or nil.
See Also
IAMSPManager::BindAsset.
virtual void IManageableAsset::SetAssetURL (const PMStringurl)
pure virtual

This method sets the current URL for the asset. url is a PMString with a valid URL.

virtual void IManageableAsset::SetHasVersionedContent (bool16 b)
pure virtual

This method sets a flag indicating that a versioned asset (content) is associated with this IManageableAsset instance. This method is typically called by an IAMServiceProvider::enInitialize service implementation.

Parameters
bis kTrue if versioned content; kFalse if not.
See Also
IManageableAsset::HasVersionedContent.
IAMServiceProvider.
virtual void IManageableAsset::SetIsBound (bool16 b = kTrue)
pure virtual

This method flags that the IManageableAsset instance has been bound. This method is called during execution of the IAMSPManager::BindAsset method. An instance must be bound before it can be used in IAMService requests, monitored, etc.

Parameters
bis kTrue if bound; kFalse if not.
See Also
IAMSPManager::BindAsset.
virtual void IManageableAsset::SetIsVersioned (bool16 b)
pure virtual

This method sets a flag indicating that the IManageableAsset is versioned. This method is typically called by an IAMServiceProvider::enInitialize service implementation. Do not call this method with kTrue for a enLinked assets unless the link itself is versioned; use SetHasVersionedContent instead.

Parameters
bis kTrue if versioned; kFalse if not.
virtual void IManageableAsset::SetLockable (IAMLockablelock)
pure virtual

This method sets the IAMLockable instance for this IManageableAsset instance. An IAMLockable instance should be set for story assets in order to participate correctly in the LiveEdit workflow.

Parameters
lockis a valid pointer to an IAMLockable instance or nil if the asset is not lockable. When non-nil, the pointer is assumed to be valid for the life of the IManageableAsset instance unless reset by another call to this method.
virtual void IManageableAsset::SetReadFile (const IDFilefile)
pure virtual

This method applies only to a file-based asset. Sets the IDFile for the location that the asset was read from. This method is typically called within the IAMServiceProvider::enInitialize service.

Parameters
filean IDFile with a valid path to a file in the asset management system's local asset cache (for Version Cue assets, this is the local replica file in a Version Cue project folder).
See Also
IAMServiceProvider.
virtual void IManageableAsset::SetServiceProviderClass (ClassID id)
pure virtual

This method is called during binding provided that an IAMServiceProvider is found that recognizes the asset.

Parameters
idis the ClassID of the IAMServiceProvider.
See Also
IAMSPManager::BindAsset.
IAMServiceProvider.
virtual void IManageableAsset::SetStateMachine (IAssetStateMachinesm)
pure virtual

This method sets the IAssetStateMachine instance that can process IManagedStatus changes for the asset. This method is typically called within the IAMServiceProvider::enInitialize service.

Parameters
smis a valid pointer to an IAssetStateMachine instance or nil. The non-nil pointer is assumed to be valid for the life of this IManageableAsset instance unless reset with another call to this method.
virtual void IManageableAsset::SetStatus (IManagedStatusstatus)
pure virtual

This method sets the IManagedStatus instance for the IManageableAsset. An IManagedStatus instance may not be set on more than one IManageableAsset instance; that is, two IManageableAsset instances may not share an IManagedStatus instance.

Parameters
statusis a valid pointer to an IManagedStatus instance or nil.
virtual void IManageableAsset::SetType (IManageableAsset::AssetType t)
pure virtual

This method sets the AssetType. This method is called during binding.

Parameters
tis the AssetType.
See Also
IAMSPManager::BindAsset.
virtual void IManageableAsset::SetWriteFile (const IDFilefile)
pure virtual

This method applies only to a writeable, file-based asset. Sets the IDFile for the location that the asset model changes can be written to. This method is typically called within the IAMServiceProvider::enInitialize service.

Parameters
filean IDFile with a valid path to a file in the asset management system's local asset cache (for Version Cue assets, this is the local replica file in a Version Cue project folder).
See Also
IAMServiceProvider.