![]() | InDesign SDK 20.5 |
#include <ICusDtLnkFacade.h>

Public Types | |
| enum | { kDefaultIID = IID_ICUSDTLNKFACADE } |
Public Member Functions | |
| virtual ErrorCode | SetKeyValuePair (const IWorkspace *ws, const PMString &key, const PMString &val, const PMIID &iid)=0 |
| virtual PMString | GetValueFromKey (const IWorkspace *ws, const PMString &key, const PMIID &iid) const =0 |
| virtual bool16 | IsOurCustomDataLink (const ClassID &classID) const =0 |
| virtual bool16 | IsOurCustomDataLink (const UIDRef &linkUIDRef) const =0 |
| virtual ErrorCode | AddAdornment (const UIDList &itemList)=0 |
| virtual ErrorCode | RemoveAdornment (const UIDList &itemList)=0 |
| virtual ErrorCode | AddAssetDataBase (const IWorkspace *ws, const PMString &dbName, const PMString &fullPath)=0 |
| virtual PMString | GetNthAssetDataBase (const IWorkspace *ws, int32 index) const =0 |
| virtual int32 | GetAssetDataBaseCount (const IWorkspace *ws) const =0 |
| virtual PMString | GetAssetDataBasePath (const IWorkspace *ws, const PMString &dbName) const =0 |
| virtual PMString | TruncatePath (const PMString &fullPath, bool16 useAnySeparator=kTrue, const PlatformChar &useThisOne=kTextChar_Solidus) const =0 |
| virtual UIDRef | ImportImageAndLoadPlaceGun (const UIDRef &docUIDRef, const PMString &path, const PMString &uniqueKey)=0 |
| virtual UIDRef | ImportImageAndLoadPlaceGun (const UIDRef &docUIDRef, const URI &uri)=0 |
| virtual PMString | GetCurrentlyChosenUniqueAssetKey (const IWorkspace *ws) const =0 |
| virtual ErrorCode | SetCurrentlyChosenUniqueAssetKey (const IWorkspace *ws, const PMString &newKey)=0 |
| virtual ErrorCode | InitializeDataLink (const IWorkspace *ws, IDataLink *dl, const IDFile &file, const PMString &formatName, const PMString &uniqueAssetKey)=0 |
| virtual bool | UniqueKeyToURI (const PMString &uk, URI &uri) const =0 |
| virtual bool | URIToIDFile (const URI &uri, IDFile &file) const =0 |
| virtual PMString | GetFirstPartOfPath (const PMString &p) const =0 |
| virtual IDFile | GetLocalFileFromAssetIdentifier (const IWorkspace *ws, const PMString &uniqueAssetKey) const =0 |
| virtual PMString | GetAssetDataBaseRecordFieldValue (const IDFile &databaseFile, const PMString &recordID, const PMString &fieldName) const =0 |
| virtual uint64 | GetAssetSizeFromAssetIdentifier (const IWorkspace *ws, const PMString &uniqueAssetKey) const =0 |
| virtual uint64 | GetAssetTimestampFromAssetIdentifier (const IWorkspace *ws, const PMString &uniqueAssetKey) const =0 |
| virtual PMString | GetAssetDescriptionFromAssetIdentifier (const IWorkspace *ws, const PMString &uniqueAssetKey) const =0 |
| virtual uint64 | GetAssetTimestampFromURI (const URI &uri) const =0 |
| virtual PMString | GetFieldValueFromAssetIdentifier (const IWorkspace *ws, const PMString &uniqueAssetKey, const PMString &fieldName) const =0 |
| virtual PMString | GetAssetDescriptionFromURI (const URI &uri) const =0 |
| virtual void | StoreUniqueKey (IDataLink *dataLink, const PMString &uniqueAssetKey)=0 |
| virtual PMString | RetrieveUniqueKey (IDataLink *dataLink) const =0 |
| PMString | GetRecordFieldValueFromURI (const URI &uri, PMString &whichField) const |
| virtual bool16 | NeedsOurAdornment (const UIDRef &pageItemUIDRef) const =0 |
| virtual bool16 | HasOurAdornment (const UIDRef &pageItemUIDRef) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
From SDK sample; facade interface that is used by both this plug-in and it's associated UI, CustomDataLinkUI sample. Provides methods to access and store persistent data, including the database files used by this sample. Also provides methods to work with the adornments added to the containers for custom datalinked layout objects.
| anonymous enum |
Default interface identifier for UseDefaultIID
| pure virtual |
Add our page item adornment to the list of layout objects
| itemList | specifies layout objects to add adornment to |
Implemented in CusDtLnkFacade.
| pure virtual |
Add a mapping from database name to where the database file is in the local filesystem, persisting this to the session workspace.
| dbName | the database name, e.g. alias-database-1.csv |
| fullPath | where the database file is located in the local file system |
Implemented in CusDtLnkFacade.
| pure virtual |
Determine how many databases are known about, that is, mapped through to database files in the local filesystem
Implemented in CusDtLnkFacade.
| pure virtual |
Given a name of a database, e.g. alias-database-1.csv, return a path to the database file in local filesystem as PMString
| dbName | identifies the database, found in the custom datalink as first part of the unique asset key for a custom datalink |
Implemented in CusDtLnkFacade.
| pure virtual |
Given a database (a flatfile database with a single, unnamed table) and a record identifier, retrieve a value for the named column in row identified by the recordID
| databaseFile | path to database file |
| recordID | identifies row within the file |
| fieldName | specifies a column |
Implemented in CusDtLnkFacade.
| pure virtual |
Determine the asset description given its unique identifier
| uniqueAssetKey |
Implemented in CusDtLnkFacade.
Determine the asset description given its URI
| uri |
Implemented in CusDtLnkFacade.
| pure virtual |
Determine size of asset given its unique identifier
| uniqueAssetKey |
Implemented in CusDtLnkFacade.
| pure virtual |
Determine the timestamp (includes date) of last modification for asset given its unique identifier
| uniqueAssetKey |
Implemented in CusDtLnkFacade.
| pure virtual |
| pure virtual |
Given a unique key, retrieve named field from associated record
| uniqueAssetKey | |
| fieldName |
Implemented in CusDtLnkFacade.
Given a path, return the first part up to a directory separator (like forward or reverse slash or colon) ; so given something like xyz/abc, return xyz
| p | path of interest |
Implemented in CusDtLnkFacade.
| pure virtual |
Determine the path in local filesystem to a "local replica" of asset given the unique identifier. Although we have no checkin/checkout protocol, we treat the path to the local replica as just another parameter from the database, rather than as a defining property of the link.
| uniqueAssetKey |
Implemented in CusDtLnkFacade.
| pure virtual |
| PMString ICusDtLnkFacade::GetRecordFieldValueFromURI | ( | const URI & | uri, |
| PMString & | whichField | ||
| ) | const |
Given a uri, retrieve named field from associated field key
| uri | the uri that reprents a record in some database (CSV) file. |
| whichField | the field key defined in CusDtLnkID.h |
| pure virtual |
Retrieve an option stored in the session workspace (kWorkspaceBoss).
| key | key to use when looking up the option (stored in a map) |
| iid | identifies the interface (on workspace) where we should look |
Implemented in CusDtLnkFacade.
| pure virtual |
Determine if the given layout object already has our page item adornment to signify it has a custom datalinked dependent
| pageItemUIDRef | identifies layout object of interest |
Implemented in CusDtLnkFacade.
| pure virtual |
Given a document and a path in local file system to image, load the placegun, initializing a custom datalink with the uniqueKey supplied
| docUIDRef | which document to target |
| path | refers to asset in local filesystem |
| uniqueKey | unique identifier for custom datalink to create pointing at asset |
Implemented in CusDtLnkFacade.
| pure virtual |
Given a document and an URI to image, load the placegun.
| docUIDRef | which document to target |
| uri | refers to asset uri |
Implemented in CusDtLnkFacade.
| pure virtual |
Initializes one of our custom datalinks so that it will behave correctly. Means that we don't have to use IDataLinkHelper::InitializeDataLink, which doesn't initialize our custom type in the way that is required.
| dl | datalink of interest, which should be one of our custom types |
| file | path to local replica of asset, if it exists |
| formatName | name of asset's format if known |
| uniqueAssetKey | unique key identifying asset in database |
Implemented in CusDtLnkFacade.
| pure virtual |
Determine if given ClassID is a custom datalink of our own type. In practice, we are looking to see if the class exposes an interface IBoolData with PMIID of IID_ICUSDTLNKDATALINKBOOLDATA. The rationale behind this was to allow multiple subclasses of our base type (kCusDtLnkBasicCustDataLinkBoss) to be identified through a marker interface, without explicitly examining ClassID.
| classID | the ClassID of a datalink of interest |
Implemented in CusDtLnkFacade.
| pure virtual |
Determine if given UIDRef of an ILink is an our own type. In practice, we are looking to see if the link resource associated with the ILink has an URL whose schema is of ours.
| linkUIDRef | the link of interest |
Implemented in CusDtLnkFacade.
| pure virtual |
Determine if the given layout object should have our page item adornment to signify it it has custom datalinked dependent
| pageItemUIDRef | identifies layout object of interest |
Implemented in CusDtLnkFacade.
| pure virtual |
Remove the page item adornment from list of layout objects
| itemList | specifies layout objects to remove our adornment from |
Implemented in CusDtLnkFacade.
Given a datalink, find the unique key associated with the asset it points to. For instance, this would be something like "alias-database-1.csv/1000141". This will only work for one of our own custom datalinks, with a normal datalink would just return an empty string.
| dataLink | specifies the datalink object of interest |
Implemented in CusDtLnkFacade.
| pure virtual |
Used only by the UI. Might consider refactoring out.
| newKey |
Implemented in CusDtLnkFacade.
| pure virtual |
Sets a persistent option on the session workspace (kWorkspaceBoss). These are stored in interface(s) of type ICusDtLnkOptions, differentiated by PMIID. These are:
| key | unique key to use when retrieving option |
| val | value to store |
| iid | identifies interface to use when storing value |
Implemented in CusDtLnkFacade.
| pure virtual |
Given a custom datalink, associate it with a unique key to identify an asset that it refers to.
| dataLink | |
| uniqueAssetKey |
Implemented in CusDtLnkFacade.
| pure virtual |
Given a path of some kind, return the original with the last part of the path removed
| fullPath | input path to process |
| useAnySeparator | if any path separator can be used |
| useThisOne | if !useAnySeparator, which path separator to use |
Implemented in CusDtLnkFacade.
See Convert an unique key to URI, this is mainly for phase 2 conversion: when we get an old kCusDtLnkAliasedDataLinkBoss during conversion, we will query its IDataLink and use it to get the unique key used in CS3 and earlier, then we need to convert this unique key into an URI, which is used to create the new link resource under the new CS4 link architecture
| uk | the unique key that represent an asset for our custom data link, it has the format of "alias-database-1.csv/1000141" |
| uri | the URI for the link resource, it has the format of CusDtLnk://database_fulloath?recordID |
Implemented in CusDtLnkFacade.
Converts an URI that represents our CSV based asset to an IDFile.
Implemented in CusDtLnkFacade.