OScript API/Built-in Package Index

Class: DAPI

DAPI (Document Application Programming Interface) maintains a hierarchical database of nodes and their related attributes. Each node can have multiple versions of data, in the form of BLOBs (Binary Large Objects). A common form of versioned data stored at the nodes are electronic files of any format.

Node management is very much like a file system in that creation, updating, deleting, moving, and copying of nodes is supported.

DAPI protects access to all nodes through both the User, Group, System, World permissions and ACL (Access Control Lists).

DAPI supports for Aliases for nodes and Generations for versions. Aliases provide shortcuts to other nodes stored in the DAPI databases. Generations provide a reference to a specific version of a node.

Note: The DAPI category functionality supports the legacy node category features. Most of the current set of DAPI category attributes functions are not used for the current more sophisticated category features which are implemented in OScript. However, a few of the functions are used to support the additional node attributes feature.

The followings are types of DAPI object handles used with the DAPI functions:

The DAPI Package contains a formidable number of functions. The following table describes the bulk of the functionality provided:

Create

Get/Set/Count/List

Move/Copy/Fetch

Update

Delete

Special

Node

AllocCloneNode(), AllocNode(), ClearNodeCache(), CloneNode(), CreateNode(), CreateRootNode(), CreateSingleObject()

GetNode(), GetNodeByID(), GetNodeByGUID(), GetRecycledNodeByID(), NumSubNodes(), ListSubNodes(), ListContents(), GetNodesByIDs()

CopyNode, CopyANode(), MoveNode()

UpdateNode(), UpdateChildCount(), RenameNode()

ClearPurgeFlag(), DeleteNode(), GetPurgeFlag(), PurgeNode(), SetPurgeFlag()

GetParentNode(), GetMultilingualName(), SetMultilingualName(), GetMultilingualComment(), SetMultilingualComment(), ReserveNode(), UnreserveNode(), RefreshNode(), IsInTree()

Version

AllocCloneVersion(), AllocVersion(), AddVersion(), AddVersionFromStream(), AddValAsVersion(), CloneVersion()

GetVersion(), GetVersionByID(), GetVersionByGUID(), GetVersionByName(), NumVersions(), ListVersions()

CopyVersion(), FetchVersion(), FetchVersionAsVal(), FetchVersionToStream(), FetchVersionRangeToStream(), FetchVersionRangesToStream(), SetVersionFetchMode()

UpdateVersion()

DeleteVersion(), PurgeVersions()

GetVersionSize(), LockVersion(), MoveProviderData(), RefreshVersion(), UnlockVersion(), VersionFetchable()

Rendition

AddRendition(), AddRenditionFromStream()

GetRendition(), NumRenditions(), ListRenditions()

FetchRendition(), FetchRenditionToStream(), FetchRenditionRangeToStream(), FetchRenditionRangesToStream()

DeleteRendition()

GetOriginalNode(), GetRenditionSize()

Thumbnail

AddThumbnail(), AddThumbnailFromStream()

GetThumbnail(), NumThumbnails(), ListThumbnails()

FetchThumbnail(), FetchThumbnailToStream(), FetchThumbnailAsBytes(), FetchThumbnailAsBase64()

DeleteThumbnail(), DeleteThumbnails()

HasThumbnail()

Alias

AliasNode()

NumAliasNodes(), ListAliasNodes()

GetOriginalNode()

Generation

CreateGeneration()

NumGenerations(), NumGensFromRelease(), NumGensFromVersion(), ListGenerations(), ListGensFromRelease(), ListGensFromVersion()

GetOriginalNode()

Category

AddCategory()

ListCategories()

CopyCategory()

UpdCategory()

DelCategory()

Category Attributes

AddCategoryAttr(), AddAttrToCategory()

ListCategoryAttrs()

CopyCategory()

UpdCategoryAttr()

DelCategoryAttr()

Permissions

GetNodePermissions()

Rights

AddNodeRight()

GetNodeRight(), GetNodeRights()

UpdateNodeRight()

DeleteNodeRight()

User Attributes

GetNodeUserAttr(), GetVersionUserAttr(),

CopyNodeUserAttrs(), CopyVersionUserAttrs()

Columns

AddNodeUserColumn(), AddVersionUserColumn()

GetNodeColumnNames(), GetVersionColumnNames()

Version Stream

OpenReadVerStream(), OpenWriteVerStream()

VerStreamRead(), VerStreamWrite()

VerStreamLenGet()

Class Attributes

The subtype of an alias node.

Specify to include all columns, including the system and user columns.

Specifies an attribute of type date.

Specifies an attribute of type fixed length text.

Specifies an attribute of type Integer.

Specifies an attribute of type long length text.

Specifies an attribute of type Real.

Specify to include both the system and category attributes.

Specify to include only the category attributes.

Specify to include only the system attributes.

Specifies an attribute of type variable length text.

The auditing event when a version is added to a node.

The auditing event when a node is aliased.

The auditing event when the system or category attributes of a node has changed.

The auditing event when the ordering of a compound document's child node has changed.

The auditing event when a node is copied.

The auditing event when a node is created.

The auditing event when a generation is created for a node.

The auditing event when a release is created for a compound document.

The auditing event when a rendition is added to a version of a node.

The auditing event when a revision is created for a compound document.

The auditing event when a node is deleted.

The auditing event when a release of a compound document is deleted.

The auditing event when a rendition of a version is deleted.

The auditing event when a revision of a compound document is deleted.

The auditing event when a version of a node is deleted.

The auditing event when a version of a node is fetched.

The auditing event when a user logs in to the system.

The auditing event when a user logs out of the system.

The auditing event when a node is moved.

The auditing event when the permissions of a node have changed.

The auditing event when versions of a node are purged.

The auditing event when a node is renamed.

The auditing event when a node is reserved.

The auditing event when a node is unreserved.

The auditing section identifier used in system initialization.

A provider callback reason constant which indicates the reading of a block of blob data from the database.

A provider callback reason constant which indicates the writing of a block of blob data to the database.

Specify to operate based unique node ID.

A return status constant used by the callback to cancel an operation without causing an error to occur.

A DAPI callback reason constant which indicates a version of a node will be copied.

A DAPI callback reason constant which indicates a node will be created.

A DAPI callback reason constant which indicates a version of a node will be deleted.

A DAPI callback reason constant which indicates one or more nodes are fetched for application node filtering.

A DAPI callback reason constant which indicates a new version will be added to a node.

A DAPI callback reason constant to filter out unwanted notifications.

A DAPI callback reason constant which indicates the owner of a node is updated.

A DAPI callback reason constant which indicates a version is ready for content filtering.

A provider callback reason constant which indicates the closing of a blob after opening for reading or writing.

A copy option for copying only the specified node without copying its child nodes

A copy option for copying only the current version of all nodes.

A copy option indicating that the copied node will have the same category as the destination parent node.

A copy option indicating that the copied node will have the same permissions as the destination parent node.

A copy option indicating that the copied node will have the same user attributes as the destination parent node.

A copy option indicating that a node's category and its attributes should not be copied.

A copy option indicating that a node's user attributes should not be copied.

A copy option indicating that version information should not be copied.

A DAPI callback reason constant which indicates a node was encountered and will be copied.

A copy option indicating that only the published version will be copied.

A copy option for setting the copied node's creator to the current user.

A copy option for copying a specific version of a node.

A copy option indicating that the copied node will have the same permissions as the source node.

A copy option indicating that all copied versions will be unlocked.

A copy option indicating that all copied nodes will be unreserved.

The DapiNode type number.

The DapiSession type number.

The DapiStream type number.

The DapiVersion type number.

A permission bit which enables deletion of a version.

A permission bit which enables access to a version's blob data contents.

A permission bit which enables access of the version attributes.

Another permission bit for a custom defined version privileges.

A permission bit for a custom defined version privileges.

A permission bit which enables the modification of the version attributes.

A provider callback reason constant which indicates the deletion of a blob.

A delete option to skip child count updating.

A DAPI callback reason constant which indicates a node was encountered and will be deleted.

A return status constant used by the callback to abort an operation.

A provider callback reason constant which indicates querying whether the blob content is fetchable.

Used to fetch raw version data.

Standard version data fetch mode.

A provider callback reason constant which indicates the reading of a blob from the database.

A provider callback reason constant which indicates the writing of a blob from the database.

An Integer mask representing full permissions.

The subtype of a generation node.

The default version locked flag.

A DAPI cbMoveOptions flag for moving items into a structure with permissions controllers.

A DAPI cbMoveOptions flag for moving items within a structure with permissions controllers.

A DAPI callback reason constant which indicates a node was encountered and will be moved.

Internal usage.

Internal usage.

A permission bit which enables the addition of child nodes.

A permission bit which enables the addition of a new major version to a node.

A permission bit which enables the a node's permissions to be viewed and edited.

A permission bit which enables the deletion of the child nodes.

A permission bit which enables node deletion.

A permission bit which enables the modification of the category attributes of a node.

The default subtype of a node.

The default node unreserved flag.

A permission bit which enables access of the content and attributes of a node.

A permission bit which allows a user to see the node.

A permission bit for custom defined privileges.

A permission bit for custom defined privileges.

The change notification constant for adding an ACL to a node.

The change notification constant for deleting an ACL from a node.

The change notification constant for modifying an ACL of a node.

The change notification constant for copying a node.

The change notification constant for creating a node.

The change notification constant for creating a root node.

The change notification constant for deleting a node.

The change notification constant for deleting a node version.

The change notification constant for moving a node.

The change notification constant for renaming a node.

The change notification constant for modifying a node.

The integer status indicating success.

A provider callback reason constant which indicates opening a blob data for reading.

A provider callback reason constant which indicates opening a blob data for writing.

A permission level constant for permissions up to delete privileges.

A permission level constant for only see privilege.

A permission level constant for permissions up to see contents privileges

A return status constant used by the callback to change a node permissions in a RWD setting in a move operation.

A permission level constant for permissions up to modify privileges.

The permission type for ACL permissions.

The permission type for group permissions.

The permission type for system permissions.

The permission type for user permissions.

The permission type for world permissions.

The Macintosh platform.

The UNIX platform.

An unknown platform.

The Windows platform.

The default node reserved flag.

A provider callback reason constant which indicates setting the position of blob data.

A provider callback reason constant which indicates the retrieval of object size.

A return status constant used by the callback to skip a copy of a node in a copy operation without causing an error.

Specify to include system columns only.

An integer value indicating that an attribute is unused.

Specify to include user columns only.

A version copy option for setting the copied version's creator to the current user.

A version copy option indicating that user attributes should not be copied.

A version copy option to copy the renditions with the version.

A version copy option indicating that the copied version should be unlocked.

A constant to indicate the creation of a major version.

A constant to indicate the retrieval of the current version.

A constant to indicate the retrieval of the current major version.

A constant to indicate tthe retrieval of the current published version.

The default version unlocked flag.

A return status constant used to indicate that a version's blob content has not yet been loaded.

Class Methods

AddAttrToCategory( DAPISESSION session, String category, String attribute, Boolean optFlag )

Adds the specified attribute to the specified category.

AddCategory( DAPISESSION session, String category, String displayName, String tableName )

Adds a new category.

AddCategoryAttr( DAPISESSION session, String attribute, Integer type, Integer length, List extendList )

Adds a new category attribute.

AddNodeRight( DAPINODE node, Integer rightID, Integer permissions )

Adds a user or group access right to the specified node.

AddNodeUserColumn( DAPISESSION session, String columnName, String columnType )

Adds a new column to the DTree table.

AddProvider( DAPISESSION session, String provider, Boolean logical, Dynamic script, [Dynamic object] )

Adds a custom provider for blob data storage to the current session.

AddRendition( DAPIVERSION version, DAPIVERSION rendition, String provider, String localFilePath )

Adds a new rendition to the specified version.

AddRenditionFromStream( DAPIVERSION version, String renditionType, String provider, Socket aSocket, Assoc renditionAttr )

Adds a new rendition to the specified version by getting data from the specified Socket object.

AddThumbnail( DAPIVERSION version, DAPIVERSION thumbnail, String provider, String localFilePath )

Adds a new thumbnail to the specified version.

AddThumbnailFromStream( DAPIVERSION version, String thumbnailName, String provider, DAPISTREAM DAPISTREAM, Assoc thumbnailAttr, Integer pageNum )

Adds a new thumbnail to the specified version by getting data from the specified DAPISTREAM object.

AddValAsVersion( DAPINODE node, DAPIVERSION version, String provider, Dynamic value, [Boolean isFirstVersion], [Boolean isCloneVersion] )

Adds a value as a version to the specified node.

AddVersion( DAPINODE node, DAPIVERSION version, String provider, String localFilePath, [Boolean isFirstVersion], [Boolean isCloneVersion] )

Adds a version to the specified node.

AddVersionFromStream( DAPINODE node, DAPIVERSION version, String provider, Socket aSocket, Assoc versionAttr, [Boolean isFirstVersion] )

Adds a version to the specified node by getting data from the specified Socket object.

AddVersionUserColumn( DAPISESSION session, String columnName, String columnType )

Adds a new column to the DVersData table.

AliasNode( DAPINODE original, DAPINODE parent, DAPINODE new, [Boolean copyAcls] )

Creates a new node that is an alias of the specified node.

AllocCloneNode( DAPISESSION session, Assoc originalNode )

Allocates a new DAPINODE cloned object in memory.

AllocCloneVersion( DAPISESSION session, Assoc originalVersion )

Allocates a new DAPIVERSION cloned object in memory.

AllocNode( DAPISESSION session )

Allocates a new DAPINODE object in memory.

AllocSession( CAPILOGIN login, [Boolean notifyChange] )

Allocates a DAPISESSION object for a login user.

AllocVersion( DAPISESSION session )

Allocates a new DAPIVERSION object in memory.

Audit( Dynamic nodeOrSession, String userEvent, String description )

Records a custom auditing event.

Clean up the DAPINODE cache for the calling thread.

Sets purge flag to false.

CloneNode( DAPINODE new, DAPINODE parent, Assoc originalNode, [DAPILONG options] )

Clone a node with original node attributes.

CloneVersion( DAPINODE node, DAPIVERSION clonedVersion, Assoc originalVersion )

Clones a version to the specified node.

CopyANode( DAPINODE original, DAPINODE parent, DAPINODE new, [Integer options], [Integer versionNum] )

Copies a node but not its child nodes.

CopyCategory( DAPINODE original, DAPINODE node )

Copies the category and attributes of one node to another.

CopyNode( DAPINODE original, DAPINODE parent, [Integer options], [Dynamic newNames] )

Copies a node and its child nodes.

CopyNodeUserAttrs( DAPINODE original, DAPINODE node )

Copies the user attributes of one node to another.

CopyVersion( DAPIVERSION originalVersion, DAPINODE node, DAPIVERSION newVersion, [Integer options], String provider )

Copies a specified version as a new version of the specified node.

CopyVersionUserAttrs( DAPIVERSION original, DAPIVERSION version )

Copies the user attributes of one version to another.

CreateGeneration( DAPINODE original, DAPINODE parent, DAPINODE new, [Boolean rootOnly], [Boolean copyAcls] )

Creates a new node that is a generation of the specified node.

CreateNode( DAPINODE new, DAPINODE parent, [Boolean copyAcls] )

Creates a new node.

CreateRootNode( DAPINODE new )

Creates a root node for a volume.

CreateSingleObject( DAPISESSION session, DAPINODE parent, Assoc objectDetails )

Creates a single object.

DelAttrFromCategory( DAPISESSION session, String category, String attribute )

Deletes an attribute from a category.

DelCategory( DAPISESSION session, String category, Boolean dropTable )

Deletes a category.

DelCategoryAttr( DAPISESSION session, String attribute, [Boolean checkUsage] )

Deletes an attributes.

DeleteNode( DAPINODE node, [Integer options] )

Deletes the specified node and its child nodes.

DeleteNodeRight( DAPINODE node, Integer rightID )

Deletes a user or group access right from the specified node.

DeleteRendition( DAPIVERSION version, String renditionType )

Deletes the specified rendition of a specified version.

DeleteThumbnail( DAPIVERSION version, String thumbnailType, Integer pageNum )

Deletes the specified thumbnail of the specified version.

DeleteThumbnails( DAPIVERSION version )

Deletes all thumbnails of the specified version.

Deletes the specified version.

Copies the specified version rendition contents to a file on the local machine.

FetchRenditionRangesToStream( DAPIVERSION version, Socket aSocket, String renditionType, List rangesData, String headerData )

Reads multiple portions of the version rendition contents and writes it to the specified Socket object.

FetchRenditionRangeToStream( DAPIVERSION version, Socket aSocket, String renditionType, List rangeData )

Reads a portion of the version rendition contents and writes it to the specified Socket object.

FetchRenditions( DAPIVERSION version, String renditionType, String localFilePath )
FetchRenditionToStream( DAPIVERSION version, Socket aSocket, String renditionType )

Reads the version rendition contents and writes it to the specified Socket object.

FetchThumbnail( DAPIVERSION version, String thumbnailType, String localFilePath, Integer pageNum )

Copies the specified thumbnail to a file on the local machine.

FetchThumbnailAsBase64( DAPIVERSION version, String thumbnailType, Integer pageNum )

Returns the specified thumbnail as a base64 encoded string.

FetchThumbnailAsBytes( DAPIVERSION version, String thumbnailType, Integer pageNum )

Returns the specified thumbnail as a byte array.

FetchThumbnailToStream( DAPIVERSION version, DAPISTREAM outStream, String thumbnailType, Integer pageNum )

Reads the thumbnail and writes it to the specified DAPISTREAM objec.

FetchVersion( DAPIVERSION version, String localFilePath )

Copies the specified version contents to a file on the local host.

FetchVersionAsVal( DAPIVERSION version )

Retrieves the version of a node as a value.

FetchVersionRangesToStream( DAPIVERSION version, Socket aSocket, List rangesData, String headerData )

Reads multiple portions of the version contents and writes it to the specified Socket object.

FetchVersionRangeToStream( DAPIVERSION version, Socket aSocket, List rangeData )

Reads a portion of the version contents and writes it to the specified Socket object.

FetchVersionToStream( DAPIVERSION version, Socket aSocket )

Reads the version contents and writes it to the specified Socket object.

GetExternalSource( DAPSESSION session, String extSrcName )

Retrieves the external source information specified by the external source name

GetExternalSourceByID( DAPSESSION session, String extSrcID )

Retrieves the external source information specified by the external source ID number

GetMultilingualComment( DAPINODE node, String languageCode )

Retrieves the comment of a DAPINODE for the specified language.

GetMultilingualName( DAPINODE node, String languageCode )

Retrieves the name of a DAPINODE for the specified language.

GetNode( String namePath, DAPINODE startNode, [Boolean autoExpand ] )

Retrieves a node by specifying a name or a relative path.

GetNodeByGUID( DAPISESSION session, GUID GUID, [Boolean autoExpand], [Boolean includeRecycled] )

Retrieves a node based on its GUID.

GetNodeByID( DAPISESSION session, Integer volumeID/nodeID, [Integer nodeID], [Boolean autoExpand ] )

Retrieves a node based on its unique ID.

GetNodeColumnNames( DAPISESSION session, Integer columnType )

Returns a List of column names in the DTree table.

GetNodePermissions( DAPINODE node )

Returns the permissions mask that the current user has on the specified node.

GetNodeRight( DAPINODE node, Integer rightID )

Returns a user or group access right for the specified node.

GetNodeRights( DAPINODE node )

Returns all user or group access rights for the specified node.

GetNodesByIDs( DAPISESSION dapiSess, List dataIDs, [Assoc extendedSettings] )

Returns a List of DAPINODE objects for the given DataID list.

GetNodeUserAttr( DAPINODE node, String attrName, [Integer attrType] )

Returns a user attribute value for the specified node.

GetOriginalNode( DAPINODE arg1 )

Retrieves the original node referenced by the specified alias or generation node.

GetParentNode( DAPINODE node )

Retrieves the parent node of the specified node.

Gets the current purge flag.

GetRecycledNodeByID( DAPISESSION session, Integer volumeID/nodeID, [Integer nodeID], [Boolean autoExpand ] )

Retrieves a recycled node (i.e., a node deleted logically but not purged yet) based on its unique ID.

GetRendition( DAPIVERSION version, String renditionType )

Retrieves a rendition of the specified version.

GetRenditionSize( DAPIVERSION version, String renditionType )

Get the size of the specified rendition.

GetThumbnail( DAPIVERSION version, String thumbnailType, Integer pageNum )
GetVersion( DAPINODE node, Integer versionNum )

Retrieves a specific version of the specified node.

GetVersionByGUID( GUID GUID, DAPISESSION session )

Retrieves a version based on its GUID.

GetVersionByID( Integer versionID, DAPISESSION session )

Retrieves a version based on unique ID.

GetVersionByName( DAPINODE node, String versionName )

Retrieves a version based on the unique version name of a node.

GetVersionColumnNames( DAPISESSION session, Integer columnType )

Returns a List of column names of the DVersData table.

GetVersionSize( DAPIVERSION version )

Get the size of the specified version.

GetVersionUserAttr( DAPIVERSION version, String attrName )

Returns a user attribute value for the specified version.

HasThumbnail( DAPIVERSION version, String thumbnailType, Integer pageNum )

Returns true if the version has the specified thumbnail else false..

IsInTree( DAPINODE node, DAPINODE tree )

Checks if a node is a descendant of another.

ListAliasNodes( DAPINODE node, [Integer permissions] )

Returns a List of all the aliases to the specified node.

ListCategories( DAPISESSION session )

Returns a RecArray containing information about all existing categories.

ListCategoryAttrs( DAPISESSION session, [String category] )

Returns a RecArray containing information about attributes.

ListContents( DAPISESSION session, Integer volumeID, Integer nodeID, String viewName, String query, Integer permissions )

Returns a RecArray containing the child nodes Records of a specified node.

ListGenerations( DAPINODE node, [Integer permissions] )

Returns a List of all the generations of the specified node.

ListGensFromRelease( DAPINODE node, Integer major, Integer minor, [Integer permissions] )

Returns a List of all generations of the specified release or revision of a compound document.

ListGensFromVersion( DAPIVERSION version, [Integer permissions] )

Returns a List of all generations of the specified version.

ListRenditions( DAPIVERSION version )

Returns a List of all renditions of the specified version.

ListSubNodes( DAPINODE node, [String query], [String category], [String catAttrQuery], [Boolean autoExpand], [Integer permissions] )

Returns a List of the child nodes of a specified node.

ListThumbnails( DAPIVERSION version )

Returns a List of all thumbnails of the specified version.

ListVersions( DAPINODE node, [Integer offset], [Integer limit] )

Returns a List of all versions of the specified node.

LockVersion( DAPIVERSION version, Integer lockFlag )

Locks the specified version.

MoveNode( DAPINODE node, DAPINODE parent, [Dynamic newNames], [Boolean forceInheritPerm] )

Relocates the specified node and its child nodes.

MoveProviderData( DAPIVERSION version, String providerName, Integer providerMoveType )

Changes the data provider of the specified version.

NextOrderingPos( DAPINODE node )

Returns the next available ordering position in a compound document.

NumAliasNodes( DAPINODE node )

Returns the number of aliases to the specified node.

NumGenerations( DAPINODE node )

Returns the number of generations of the specified node.

NumGensFromRelease( DAPINODE node, Integer major, Integer minor )

Returns the number of generations of the specified release or revision of a compound document.

NumGensFromVersion( DAPIVERSION version )

Returns the number of generations of the specified version.

NumRenditions( DAPIVERSION version )

Returns the number of rendition types associated with a specified version.

NumSubNodes( DAPINODE node )

Returns the number of child nodes of the specified node.

NumThumbnails( DAPIVERSION version )

Returns the number of thumbnails associated with a specified version.

Returns the number of versions of the specified node.

OpenReadVerStream( DAPIVERSION version, [Boolean resourceFork] )

Opens a stream for reading the contents of the specified version.

OpenWriteVerStream( DAPINODE node, DAPIVERSION version, Integer dataLen, String provider, Boolean resourceFork )

Opens a stream for writing the contents of the specified version.

PurgeNode( DAPINODE node, [Integer options] )

Purges the specified node and its child nodes.

PurgeVersions( DAPINODE node, [Integer numToKeep] )

Deletes one or more versions from the specified node.

RefreshNode( DAPINODE node )

Forces a retrieval of the most recent node information from the database.

RefreshVersion( DAPIVERSION version )

Forces a retrieval of the most recent version information from the database.

RenameNode( DAPINODE node, Dynamic newNames )

Renames the specified node.

ReserveNode( DAPINODE node, Integer reserveFlag, [Integer userID] )

Reserves the specified node.

SetCallback( DAPISESSION session, Dynamic script, [Dynamic object] )

Establishes a callback script for node events.

SetDefaultProvider( DAPISESSION session, String provider )

Sets a default provider to use during a session.

SetMultilingualComment( DAPINODE node, String languageCode, String newValue )

Sets the comment of a DAPINODE for the specified language.

SetMultilingualName( DAPINODE node, String languageCode, String newValue )

Sets the name of a DAPINODE for the specified language.

SetNodeUserAttr( DAPINODE node, String attrName, Dynamic value, [Integer attrType] )

Assigns a value to the specified user attribute of the specified node.

Sets purge flag to true.

SetVersionFetchMode( DAPIVERSION version, Integer mode )

Set the mode used to fetch version data

SetVersionUserAttr( DAPIVERSION version, String attrName, Dynamic value )

Assigns a value to the specified user attribute of the specified version.

UnlockVersion( DAPIVERSION version )

Unlocks the specified version.

UnreserveNode( DAPINODE node )

Unreserves the specified node.

UpdateChildCount( DAPINODE node, Integer numAdded, [Boolean callNotifyCallback] )

Updates the childcount of the specified node.

UpdateNode( DAPINODE node, Boolean changeModifyDate )

Updates modified node attributes of the specified node.

UpdateNodeRight( DAPINODE node, Integer rightID, Integer permissions )

Updates the user or group access right of the specified node.

UpdateVersion( DAPIVERSION version )

Updates modified version attributes of the specified version.

UpdCategory( DAPISESSION session, Record categoryRec )

Updates a category.

UpdCategoryAttr( DAPISESSION session, Record attributeRec )

Updates an attribute.

VersionFetchable( DAPIVERSION version )

Determines whether the specified version's blob content has been loaded.

VerStreamClose( DAPIVERSION version, DAPISTREAM stream )

Closes the specified open stream for reading or writing.

VerStreamLenGet( DAPISTREAM stream )

Returns the length of an opened version stream.

VerStreamRead( DAPISTREAM stream, Integer dataLen )

Reads a portion of data from an opened version stream.

VerStreamWrite( DAPISTREAM stream, Bytes theBytes )

Writes a portion of data to an opened version stream.

Class Attributes

Integer ALIAS_NODE

The subtype of an alias node. The value is 1.

Integer ALL_COLUMNS

Specify to include all columns (both system and user columns). Used by DAPI.GetNodeColumnNames() and DAPI.GetVersionColumnNames().

Integer ATTR_DATE

Specifies that an attribute type is a Date. Used by DAPI.AddCategoryAttr().

Integer ATTR_FCHAR

Specifies that an attribute type is text of a fixed length. Used by DAPI.AddCategoryAttr().

Integer ATTR_INT

Specifies that the attribute type is an Integer. Used by DAPI.AddCategoryAttr().

Integer ATTR_LCHAR

Specifies than an attribute type is long length text. Used by DAPI.AddCategoryAttr().

Integer ATTR_REAL

Specifies that the attribute type is a Real number. Used by DAPI.AddCategoryAttr().

Integer ATTR_SET_ALL

Specify to include both the system and category attributes. Used by DAPI.GetNodeUserAttr() and DAPI.SetNodeUserAttr().

Integer ATTR_SET_CAT

Specify to include only the category attributes. Used by DAPI.GetNodeUserAttr() and DAPI.SetNodeUserAttr().

Integer ATTR_SET_SYS

Specify to include only the system attribute. Used by DAPI.GetNodeUserAttr() and DAPI.SetNodeUserAttr().

Integer ATTR_VCHAR

Specifies that the attribute type is variable length text. Used by DAPI.AddCategoryAttr().

The auditing event recorded when a version is added to a node, as with DAPI.AddVersion() or DAPI.AddValAsVersion().

The auditing event recorded when a node is aliased, as with DAPI.AliasNode().

The auditing event recorded when the system or category attributes of a node have changed, as with DAPI.SetNodeUserAttr() or DAPI.UpdateNode().

The auditing event recorded when the ordering of a compound document's child node has changed, as with DAPI.UpdateNode()

The auditing event recorded when a node is copied, as with DAPI.CopyNode().

The auditing event recorded when a node is created, as with DAPI.AliasNode() or DAPI.CreateNode().

The auditing event recorded when a generation is created for a node, as with DAPI.CreateGeneration().

The auditing event recorded when a release is created for a compound document, as with DAPI.CreateNode() called with a subtype of 138.

The auditing event recorded when a rendition is added to a version of a node, as with DAPI.AddRendition() or DAPI.AddRenditionFromStream().

The auditing event recorded when a revision is created for a compound document, as with DAPI.CreateNode() with a subtype of 139.

The auditing event recorded when a node is deleted, as with DAPI.DeleteNode().

The auditing event recorded when a release of a compound document is deleted, as with DAPI.DeleteNode() with a subtype of 138.

The auditing event recorded when a rendition of a version is deleted, as with DAPI.DeleteRendition().

The auditing event recorded when a revision of a compound document is deleted, as with DAPI.DeleteNode() with a subtype of 139.

The auditing event recorded when a version of a node is deleted, as with DAPI.DeleteVersion().

The auditing event recorded when a version of a node is fetched, as with DAPI.FetchVersion(), DAPI.FetchVersionToStream(), or DAPI.FetchVersionRangesToStream().

The auditing event recorded when a user logs in to the system. This event is not recorded by any DAPI function.

The auditing event recorded when a user logs out of the system. This event is not recorded by any DAPI function.

The auditing event recorded when a node is moved, as with DAPI.MoveNode().

The auditing event recorded when the permissions of a node has changed, as with DAPI.UpdateNode(), DAPI.AddNodeRight(), DAPI.UpdateNodeRight(), or DAPI.DeleteNodeRight().

The auditing event recorded when versions of a node is purged, as with DAPI.PurgeVersions().

The auditing event recorded when a node is renamed, as with DAPI.RenameNode().

The auditing event recorded when a node is reserved, as with DAPI.ReserveNode().

The auditing event recorded when a node is unreserved, as with DAPI.UnreserveNode().

The auditing section identifier used in system initialization. It is used to record the auditing events of a node type in the KIni table. The value of the identifier is 'Livelink.Auditing'

Integer BLK_READ

A provider callback reason constant which indicates the reading of a block of blob data from the database.

Integer BLK_WRITE

A provider callback reason constant which indicates the writing of a block of blob data to the database.

Integer BY_DATAID

Specify to operate based on the unique node ID. Used by DAPI.GetNodeByID().

Integer CANCEL

A return status constant used by the callback to cancel an operation without causing an error.

A DAPI callback reason constant which indicates a version of a node will be copied.

A DAPI callback reason constant which indicates a node will be created.

A DAPI callback reason constant which indicates a version of a node will be deleted.

A DAPI callback reason constant which indicates one or more nodes are fetched for application node filtering.

A DAPI callback reason constant which indicates a new version will be added to a node.

A DAPI callback reason constant to filter out unwanted notifications.

A DAPI callback reason constant which indicates the owner of a node is updated. This is when the DAPINODE.pUserID field is updated by DAPI.UpdateNode().

A DAPI callback reason constant which indicates a version is ready for content filtering. This is called during the version fetch process to enable or disable a content filter.

Integer CLOSE

A provider callback reason constant which indicates the closing of a blob after opening for reading or writing.

Integer COPY_A_NODE

A copy option for copying only the specified node without copying its child nodes. Used by DAPI.CopyNode().

A copy option for copying only the current version of all nodes. Used by DAPI.CopyNode() and DAPI.CopyANode().

Integer COPY_DST_CAT

A copy option to indicate that the copied node will have the same category as the destination parent node. Used by DAPI.CopyANode().

A copy option indicating that the copied node will have the same permissions as the destination parent node. Used by DAPI.CopyANode().

A copy option indicating that the copied node will have the same user attributes as the destination parent node. Used by DAPI.CopyANode().

Integer COPY_NO_CAT

A copy option indicating that the category and its attributes should not be copied. Used by DAPI.CopyANode().

A copy option indicating that the user attributes should not be copied. Used by DAPI.CopyANode().

Integer COPY_NO_VER

A copy option indicating that version information will not be copied. Used by DAPI.CopyANode().

Integer COPY_NODE

A DAPI callback reason constant indicating encountered nodes will be copied. The callback is issued by DAPI.CopyNode() and DAPI.CopyANode().

A copy option indicating that only the published version will be copied. Used by DAPI.CopyNode().

A copy option which sets the copied node's creator to the current user. Used by DAPI.CopyANode().

A copy option for copying a specific version of a node. Used by DAPI.CopyANode().

A copy option indicating that the copied node will have the same permissions as the source node. Used by DAPI.CopyNode().

Integer COPY_UNLOCKV

A copy option indicating that all copied versions will be unlocked. Used by DAPI.CopyANode().

A copy option indicating that all copied nodes will be unreserved. Used by DAPI.CopyNode() and DAPI.CopyANode().

Integer DapiNodeType

The DapiNode type number.

The DapiSession type number.

The DapiStream type number.

The DapiVersion type number.

Integer DATA_DELETE

A permission bit which enables version deletion.

Integer DATA_FETCH

A permission bit which enables access to a version's blob data contents.

Integer DATA_READ

A permission bit which enables access to version attributes.

Integer DATA_USER1

A permission bit for custom version permission use.

Integer DATA_USER2

A permission bit for custom version permission use.

Integer DATA_WRITE

A permission bit which enables modification of version attributes.

Integer DELETE

A provider callback reason constant which indicates the deletion of a blob.

A delete option for DeleteNode() to skip the child count update.

Integer DELETE_NODE

A DAPI callback reason constant indicating the encountered node will be deleted. The callback is issued by DAPI.DeleteNode().

Integer ERROR

A return status constant used by a callback to abort an operation.

Integer FETCHABLE

A provider callback reason constant which indicates querying whether the blob content is fetchable.

Constant used with SetVersionFetchMode() to fetch unaltered version data as it is stored.

Constant used with SetVersionFetchMode() to perform a standard version fetch.

Integer FILE_GET

A provider callback reason constant which indicates the reading of a blob from the database.

Integer FILE_PUT

A provider callback reason constant which indicates the writing of a blob from the database.

An Integer mask which represents full permissions.

The subtype of a generation node. The value is 2.

Integer LOCK_VERSION

The default version locked flag. The value is 128.

If this flag is set in the cbMoveOptions returned to the DAPI move callback, nodes will not have their own perms after the move, but will instead be controlled by (have permID set to) the same node as the destination of the move if that destination node has a permID, and otherwise by: the target itself, if MOVE_CB_PERM_CONTROLLER_SUBTREES is also set; or the node's parent, if MOVE_CB_PERM_CONTROLLER_SUBTREES is not set. This flag is appropriate when a move occurs from an acl-controlled area into a permID-controlled area.

Similar to MOVE_CB_PERM_CONTROLLER except that it handles subtrees, with their own perm-controlling roots, within the tree of moving nodes. This means that:

  1. forceInheritPerm is ignored.
  2. Nodes that do not have a perm-controller (i.e. have their own ACLs) before the move will not have their perms changed except for reparenting their ACLs if necessary. These nodes will be perm-controllers for their descendants.
  3. Nodes with a perm-controller before the move will also have one after the move.
  4. The default perm-controller is the perm-controller of the destination if present, or the target itself otherwise (as for this flag with MOVE_CB_PERM_CONTROLLER)
  5. Each perm-controlled node after the move will be controlled by the closest ancestor in the moved tree which is a perm-controller, or by the default perm-controller if there is no such ancestor in the moved subtree. This flag should be set for all nodes when a move occurs within an area with one or more perm-controllers. Intuitively, its effect is to correctly maintain the structure of nested perm-controlled subtrees (where a "perm-controlled subtree" is a root node with ACLs and the descendants which have their permIDs set to that root).
Integer MOVE_NODE

A DAPI callback reason constant which indicates a node was encountered and will be moved. The callback is issued by DAPI.MoveNode().

Internal usage.

Internal usage.

A permission bit which enables the child node addition.

A permission bit which enables the addition of a new major version to a node.

Integer NODE_CONTROL

A permission bit which enables node permission viewing and editing.

A permission bit which enables deletion of child nodes for this node.

Integer NODE_DELETE

A permission bit which enables deletion of the node.

A permission bit which enables category attribute modification.

Integer NODE_NODE

The default subtype of a node. The value is 0.

The default node unreserved flag. The value is 0.

Integer NODE_READ

A permission bit which enables access to the node's content and attributes.

A permission bit which enables a user to see the node.

Integer NODE_USER1

A permission bit for a custom node permissions.

Integer NODE_USER2

A permission bit for a custom node permissions.

The change notification constant for the addition of an ACL to a node. It is used in the NType column of the DTreeNotify table. The value is 8.

The change notification constant for the deleting of an ACL from a node. It is used in column NType of the DTreeNotify table. The value is 10.

The change notification constant for the modification of an ACL of a node. It is used in column NType of the DTreeNotify table. The value is 9.

Integer NOTIFY_COPY

The change notification constant for the copying of a node. It is used in column NType of the DTreeNotify table. The value is 2.

The change notification constant for the creation of a node. It is used in column NType of the DTreeNotify table. The value is 1.

The change notification constant for the creation of a root node. It is used in column NType of the DTreeNotify table. The value is 3.

The change notification constant for deleting a node. It is used in column NType of the DTreeNotify table. The value is 4.

The change notification constant for deleting a node version. It is used in column NType of the DTreeNotify table. The value is 2004.

Integer NOTIFY_MOVE

The change notification constant for moving a node. It is used in column NType of the DTreeNotify table. The value is 5.

The change notification constant for renaming a node. It is used in column NType of the DTreeNotify table. The value is 6.

The change notification constant for the modification of a node. It is used in column NType of the DTreeNotify table. The value is 7.

Integer OK

The status constant indicating success. Returned by DAPI functions to indicate that a call was completed successfully. The value is 0.

Integer OPEN_IN

A provider callback reason constant which indicates opening blob data for reading.

Integer OPEN_OUT

A provider callback reason constant which indicates the opening of blob data for writing.

Integer PERM_DELETE

A permission level constant enabling permissions up to, and including, deletion. It is used in the See column of the DTreeACL table. The value is 4.

Integer PERM_SEE

A permission level constant enabling see privileges only. It is used in the See column of the DTreeACL table. The value is 1.

A permission level constant enabling permissions up to, and including, see contents privileges. It is used in the See column of the DTreeACL table. The value is 2.

Integer PERM_TO_RWD

A return status constant used by the callback to change a node permissions in a RWD setting in a move operation.

Integer PERM_WRITE

A permission level constant enabling permissions up to, and including, modify privileges. It is used in the See column of the DTreeACL table. The value is 3.

Integer PERMTYPE_ACL

The permission type enabling ACL permissions. It is used in column ACLType of the DTreeACL table. The value is 0.

The permission type enabling group permissions. It is used in column ACLType of the DTreeACL table. The value is 2.

The permission type enabling system permissions. It is used in column ACLType of the DTreeACL table. The value is 4.

The permission type enabling user permissions. It is used in column ACLType of the DTreeACL table. The value is 1.

The permission type enabling world permissions. It is used in column ACLType of the DTreeACL table. The value is 3.

Integer PLATFORM_MAC

The Macintosh platform. This constant is used in the platform attribute of a version.

The UNIX platform. This constant is used in the platform attribute of a version.

An unknown platform. This constant is used in the platform attribute of a version.

The Windows platform. This constant is used in the platform attribute of a version.

Integer RESERVE_NODE

The default node reserved flag. The value is 128.

Integer SEEK

A provider callback reason constant which indicates the setting of a blob data position.

Integer SIZE_GET

A provider callback reason constant which indicates the retrieval of object size.

Integer SKIP

A return status constant used by the callback to skip a copy of a node in a copy operation without causing an error.

Specify to include the system columns only. Used by DAPI.GetNodeColumnNames() and DAPI.GetVersionColumnNames().

Integer UNUSED

An integer value indicating that an attribute is unused. The value is -1. For example, if a node does not contain any versions, the maximum number of versions is set to unused.

Integer USER_COLUMNS

Specify to include the user columns only. Used by DAPI.GetNodeColumnNames() and DAPI.GetVersionColumnNames().

Integer VCOPY_ADDVER

A version copy option for setting the copied version's creator to the current user. Used by DAPI.CopyVersion().

A version copy option indicating that user attributes should not be copied. Used by DAPI.CopyVersion().

A version copy option to copy the renditions with the version.

Integer VCOPY_UNLOCK

A version copy option indicating that the copied version will be unlocked. Used by DAPI.CopyVersion().

A constant to indicate the creation of a major version. A major version will be created if this constant is assigned to the DAPINODE.pVerMajor field of a newly allocated DAPIVERSION handler used in DAPI.AddVersion() and DAPI.CopyVersion().

A constant to indicate the retrieval of the current version. It is used in DAPI.GetVersion() to get the current version of a standard versioning node or the current version (either major or minor) of a major and minor versioning node.

A constant to indicate the retrieval of the current major version. It is used in DAPI.GetVersion() to get the current major version of a major and minor versioning node.

A constant to indicate tthe retrieval of the current published version. It is used in DAPI.GetVersion() to get the current version of a standard versioning node or the current major version of a major and minor versioning node.

The default version unlocked flag. The value is 0.

A return status constant which indicates that the version's blob content has not yet been loaded. Used by $WebDoc.WebDocUtils.NodeToWeb().

Class Methods

AddAttrToCategory

Integer AddAttrToCategory( DAPISESSION session,
                           String category,
                           String attribute,
                           Boolean optFlag )

Adds the specified attribute to the specified category.

This inserts a row into the DCatAttrs table. Both the category and the attribute specified must exist or the function will fail. Attributes can be added to more than one category.

Parameters

session

The DAPISESSION object handle.

category

The name of the category to which the attribute will be added. The category specified must have previously been created using DAPI.AddCategory().

attribute

The name of the attribute to add. The attribute specified must have previously been created using DAPI.AddCategoryAttr().

optFlag

TRUE to indicate that the specified attribute is required.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AddCategory

Integer AddCategory( DAPISESSION session,
                     String category,
                     String displayName,
                     String tableName )

Adds a new category.

This inserts a row into the DCategories table and modifies the database schema by creating the table specified by tableName. The structure of this table is modified as attributes are added to the category using DAPI.AddAttrToCategory().

Parameters

session

The DAPISESSION object handle.

category

The name of the new category.

displayName

The name to display when the category is used in the application.

tableName

The name of the table in which the attribute data associated with this category should be stored.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AddCategoryAttr

Integer AddCategoryAttr( DAPISESSION session,
                         String attribute,
                         Integer type,
                         Integer length,
                         List extendList )

Adds a new category attribute.

This inserts a row into the DAttributes table. New attributes must be added to a category before they can be used. An attribute can be added to more than one category, if desired.

Parameters

session

The DAPISESSION object handle.

attribute

The name of the new attribute.

type

Specifies a constant indicating the DAPI attribute data type. Acceptable values are:

length

An Integer indicating the length of the attribute. The type must be the DAPI.ATTR_FCHAR or DAPI.ATTR_VCHAR or it is ignored.

extendList

Specifies an optional List of extended argument values. The DAttributes table must first be modified (using interactive SQL) to accept the values specified in this List. The data types of the values in the List must correspond to the data types of the columns added to the DAttributes table.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AddNodeRight

Integer AddNodeRight( DAPINODE node,
                      Integer rightID,
                      Integer permissions )

Adds a user or group access right to the specified node.

This inserts a row into the DTreeACL table.

Parameters

node

The DAPINODE object handle.

rightID

The user or group ID.

permissions

The permissions bit mask which is one or more node permission constants joined by bitwise OR operators.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AddNodeUserColumn

Integer AddNodeUserColumn( DAPISESSION session,
                           String columnName,
                           String columnType )

Adds a new column to the DTree table.

This is most often used during system configuration to properly set up the database.

Parameters

session

The DAPISESSION object handle.

columnName

The name of the new column.

columnType

The data type of the new column.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AddProvider

Integer AddProvider( DAPISESSION session,
                     String provider,
                     Boolean logical,
                     Dynamic script,
                     [Dynamic object] )

Adds a custom provider for blob data storage to the current session.

Parameters

session

The DAPISESSION object handle.

provider

The name of the custom provider.

logical

TRUE to indicate non-blob storage.

script

An OScript script reference. This script must contain functions to handle getting, writing, and deleting the blob data.

object

The specific OSpace object of the script.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AddRendition

Integer AddRendition( DAPIVERSION version,
                      DAPIVERSION rendition,
                      String provider,
                      String localFilePath )

Adds a new rendition to the specified version.

Parameters

version

The DAPIVERSION object handle.

rendition

The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the rendition.

provider

The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.

localFilePath

The local file path of the rendition file.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AddRenditionFromStream

Integer AddRenditionFromStream( DAPIVERSION version,
                                String renditionType,
                                String provider,
                                Socket aSocket,
                                Assoc renditionAttr )

Adds a new rendition to the specified version by getting data from the specified Socket object.

Parameters

version

The DAPIVERSION object handle.

renditionType

The name of the new rendition.

provider

The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.

aSocket

The Socket object from which the rendition contents are read.

renditionAttr

An Assoc object containing the file attributes of the rendition.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AddThumbnail

Integer AddThumbnail( DAPIVERSION version,
                      DAPIVERSION thumbnail,
                      String provider,
                      String localFilePath )

Adds a new thumbnail to the specified version.

Parameters

version

The DAPIVERSION object handle.

thumbnail

The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the thumbnail.

provider

The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.

localFilePath

The local file path of the thumbnail file.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AddThumbnailFromStream

Integer AddThumbnailFromStream( DAPIVERSION version,
                                String thumbnailName,
                                String provider,
                                DAPISTREAM DAPISTREAM,
                                Assoc thumbnailAttr,
                                Integer pageNum )

Adds a new thumbnail to the specified version by getting data from the specified DAPISTREAM object.

Parameters

version

The DAPIVERSION object handle.

thumbnailName

The name of the new thumbnail.

provider

The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.

DAPISTREAM

The DAPISTREAM object from which the thumbnail is read.

thumbnailAttr

An Assoc object containing the file attributes of the thumbnail.

pageNum

The page number of the thumbnail.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AddValAsVersion

Integer AddValAsVersion( DAPINODE node,
                         DAPIVERSION version,
                         String provider,
                         Dynamic value,
                         [Boolean isFirstVersion],
                         [Boolean isCloneVersion] )

Adds a value as a version to the specified node.

Parameters

node

The DAPINODE object handle.

version

The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the version.

provider

The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.

value

The value to be store as a version. Acceptable values are Boolean, Date, Integer, List, Real, and String. The Assoc, RecArray, and Record data types are currently not supported.

isFirstVersion

Used to force this version to be treated as the first version of the specified node. Defaults to FALSE.

isCloneVersion

Used to clone this version to the specified node. Defaults to FALSE.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AddVersion

Integer AddVersion( DAPINODE node,
                    DAPIVERSION version,
                    String provider,
                    String localFilePath,
                    [Boolean isFirstVersion],
                    [Boolean isCloneVersion] )

Adds a version to the specified node.

Parameters

node

The DAPINODE object handle.

version

The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the version.

provider

The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.

localFilePath

The local file path of the file to be stored as a version.

isFirstVersion

Used to force this version to be treated as the first version of the specified node. Defaults to FALSE.

isCloneVersion

Used to clone this version to the specified node. Defaults to FALSE.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AddVersionFromStream

Integer AddVersionFromStream( DAPINODE node,
                              DAPIVERSION version,
                              String provider,
                              Socket aSocket,
                              Assoc versionAttr,
                              [Boolean isFirstVersion] )

Adds a version to the specified node by retrieving data from the specified Socket object.

Parameters

node

The DAPINODE object handle.

version

The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the version.

provider

The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.

aSocket

The Socket object from which the version contents are read.

versionAttr

An Assoc object contains the file attributes of the version.

isFirstVersion

Used to force this version to be treated as the first version of the specified node. Defaults to FALSE.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AddVersionUserColumn

Integer AddVersionUserColumn( DAPISESSION session,
                              String columnName,
                              String columnType )

Adds a new column to the DVersData table.

This is most often used during system configuration to properly set up the database.

Parameters

session

The DAPISESSION object handle.

columnName

The name of the new column.

columnType

The data type of the new column.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AliasNode

Integer AliasNode( DAPINODE original,
                   DAPINODE parent,
                   DAPINODE new,
                   [Boolean copyAcls] )

Creates a new node that is an alias of the specified node.

A unique ID is automatically assigned to the new node if successful.

Parameters

original

The DAPINODE object handle of the node for which an alias is created.

parent

The DAPINODE object handle of the node that will be the parent of the new alias node.

new

The newly allocated DAPINODE object handle. This allows node attributes to be pre-assigned to the node.

copyAcls

TRUE if the the alias will inherit the access control list (ACL) from the parent node; FALSE otherwise. FALSE is the default.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

AllocCloneNode

DAPINODE AllocCloneNode( DAPISESSION session,
                         Assoc originalNode )

Allocates a new DAPINODE object in memory.

Once a new node object has been allocated, values can be assigned to the node properties before the actual creation of the node.

Parameters

session

The DAPISESSION object handle.

originalNode

The original node attributes.

Returns:

The DAPINODE object handle if successful; Error otherwise.

AllocCloneVersion

DAPIVERSION AllocCloneVersion( DAPISESSION session,
                               Assoc originalVersion )

Allocates a new DAPIVERSION object in memory.

Once a new version object has been allocated, values can be assigned to the version properties before the actual creation of the version.

Parameters

session

The DAPISESSION object handle.

originalVersion

The original version attributes.

Returns:

The DAPIVERSION object handle if successful; Error otherwise.

AllocNode

DAPINODE AllocNode( DAPISESSION session )

Allocates a new DAPINODE object in memory.

Once a new node object has been allocated, values can be assigned to the node properties before the actual creation of the node.

Parameters

session

The DAPISESSION object handle.

Returns:

The DAPINODE object handle if successful; Error otherwise.

AllocSession

DAPISESSION AllocSession( CAPILOGIN login,
                          [Boolean notifyChange] )

Allocates a DAPISESSION object for a login user.

A DAPISESSION contains information pertaining node management. A DAPISESSION is a required argument for most DAPI functions.

Parameters

login

The CAPILOGIN object handle specifically for the login user.

notifyChange

TRUE to enable the recording of node change events for text search indexing procedures, FALSE otherwise. The default is TRUE.

Returns:

The DAPISESSION object handle; Error otherwise.

AllocVersion

DAPIVERSION AllocVersion( DAPISESSION session )

Allocates a new DAPIVERSION object in memory.

Once a new version object has been allocated, values can be assigned to the version properties before the actual creation of the version.

Parameters

session

The DAPISESSION object handle.

Returns:

The DAPIVERSION object handle if successful; Error otherwise.

Audit

Integer Audit( Dynamic nodeOrSession,
               String userEvent,
               String description )

Records a custom auditing event.

This inserts a row in the DAudit table. If the first parameter is a DAPINODE object handle, then the ID and the name of the node will be recorded. If the first parameter is a DAPISESSION object handle, then the ID will be 0 and the name will be undefined.

Parameters

nodeOrSession

The DAPINODE object handle or the DAPISESSION object handle.

userEvent

A string indicating the event.

description

A string giving a detailed description of the event.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

ClearNodeCache

Boolean ClearNodeCache()

Clean up the DAPINODE cache.

Each Content Server thread maintains its own DAPINODE cache so calling this fuction will only affect the thread that is executing the function.

In general, application developers don't need to call this function because it has been called by the framework. The only exception might be the case where a lot of DAPINODE objects would be retrieved and used by long-running background agents.

Returns:

DAPI.OK TRUE if successful; FALSE otherwise.

ClearPurgeFlag

Boolean ClearPurgeFlag()

Sets purge flag to false.

Returns:

true regardless. Thus, there is no need to check the return value.

CloneNode

Integer CloneNode( DAPINODE new,
                   DAPINODE parent,
                   Assoc originalNode,
                   [DAPILONG options] )

Clone a node with original node attributes.

Parameters

new

The newly allocated DAPINODE object handle. This allows node attributes to be pre-assigned to the node.

parent

The DAPINODE object handle of the node that will be the parent of the new node.

originalNode

The original node attributes.

options

Either as the copyAcls flag or an integer containing the new options

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

CloneVersion

Integer CloneVersion( DAPINODE node,
                      DAPIVERSION clonedVersion,
                      Assoc originalVersion )

Clones a version to the specified node.

Parameters

node

The DAPINODE object handle.

clonedVersion

The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the version.

originalVersion

The original version attributes.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

CopyANode

Integer CopyANode( DAPINODE original,
                   DAPINODE parent,
                   DAPINODE new,
                   [Integer options],
                   [Integer versionNum] )

Copies a node but not its child nodes.

DAPI will issue a callback for the node it copied by calling a script setup by DAPI.SetCallback().

Parameters

original

The DAPINODE object handle of the node to copy.

parent

The DAPINODE object handle of the node that will be the parent of the copied node.

new

The newly allocated DAPINODE object handle. This allows node attributes to be pre-assigned to the node.

versionNum

The specific version to be copied with the node. Used only if the option DAPI.COPY_SPECIFICV is used in options.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

CopyCategory

Integer CopyCategory( DAPINODE original,
                      DAPINODE node )

Copies the category and attributes of one node to another.

Call DAPI.UpdateNode() after this function to save the changes to the database.

Parameters

original

The DAPINODE object handle of the node whose category attributes are to be copied.

node

The DAPINODE object handle of the node to which the original node's category attributes are to be copied.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

CopyNode

DAPINODE CopyNode( DAPINODE original,
                   DAPINODE parent,
                   [Integer options],
                   [Dynamic newNames] )

Copies a node and its child nodes.

DAPI will issue a callback for each node it encounters by calling a script setup by DAPI.SetCallback().

Parameters

original

The DAPINODE object handle of the node to copy.

parent

The DAPINODE object handle of the node that will be the parent of the copied node.

options

An optional flag for copy options. This flag can be joined by bitwise OR operators using the following constants: * DAPI.COPY_A_NODE * DAPI.COPY_CURRENTV * DAPI.COPY_UNLOCKV * DAPI.COPY_UNRESERVE

newNames

An optional String indicating a name for the copied node, or an Assoc of multilingual names, keyed by language code.

Defaults to the name of the original node if not specified.

Returns:

The DAPINODE object handle of the copied node if successful; Error otherwise.

CopyNodeUserAttrs

Integer CopyNodeUserAttrs( DAPINODE original,
                           DAPINODE node )

Copies the user attributes of one node to another.

Call DAPI.UpdateNode() after this function to save the changes to the database.

Parameters

original

The DAPINODE object handle of the node whose user attributes are to be copied.

node

The DAPINODE object handle of the node to which the original node's user attributes are to be copied.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

CopyVersion

Integer CopyVersion( DAPIVERSION originalVersion,
                     DAPINODE node,
                     DAPIVERSION newVersion,
                     [Integer options],
                     String provider )

Copies a specified version as a new version of the specified node.

Parameters

originalVersion

The DAPIVERSION object handle of the version to copy.

node

The DAPINODE object handle of the node where the new version is stored.

newVersion

The newly allocated DAPIVERSION object handle. This allows version attributes to be pre-assigned to the version.

options

An optional flag for copy options. This flag can be joined by bitwise OR operators using the following constants:

provider

The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

CopyVersionUserAttrs

Integer CopyVersionUserAttrs( DAPIVERSION original,
                              DAPIVERSION version )

Copies the user attributes of one version to another.

Call DAPI.UpdateVersion() after the this function to save modifying the database.

Parameters

original

The DAPIVERSION object handle of the version whose user attributes are to be copied.

version

The DAPIVERSION object handle of the version to which the original version's user attributes are to be copied.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

CreateGeneration

Integer CreateGeneration( DAPINODE original,
                          DAPINODE parent,
                          DAPINODE new,
                          [Boolean rootOnly],
                          [Boolean copyAcls] )

Creates a new node that is a generation of the specified node.

A generation is a reference to the specific version, release, or revision of a node. It causes a system lock on the specific version, release, or revision. A unique ID is automatically assigned to the new node upon successful completion.

This function will create a generation of the current version, release, or revision unless the current version, major, or minor attributes are set in the newly allocated DAPINODE object.

Parameters

original

The DAPINODE object handle of the node for which a new generation is created.

parent

The DAPINODE object handle of the node that will be the parent of the new generation node

new

The newly allocated DAPINODE object handle. This allows node attributes to be pre-assigned to the node.

rootOnly

An optional flag where TRUE indicates that only the root node is to be included in the creation of generations. Defaults to FALSE if not specified.

copyAcls

TRUE if the generation will inherit the access control list (ACL) from the parent node; FALSE otherwise. The default is FALSE

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

CreateNode

Integer CreateNode( DAPINODE new,
                    DAPINODE parent,
                    [Boolean copyAcls] )

Creates a new node.

A unique ID is automatically assigned to the new node upon successful completion.

Parameters

new

The newly allocated DAPINODE object handle. This allows node attributes to be pre-assigned to the node.

parent

The DAPINODE object handle of the node that will be the parent of the new node.

copyAcls

TRUE if the new node will inherit the access control list (ACL) from the parent node; FALSE otherwise. The default is FALSE.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

CreateRootNode

Integer CreateRootNode( DAPINODE new )

Creates a root node for a volume.

A unique ID is automatically assigned to the new node upon successful execution of this function. To create a root node with a specific volume ID, preset the volume ID in the newly allocated DAPINODE object.

Parameters

new

The newly allocated DAPINODE object handle. This allows node attributes to be pre-assigned to the node.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

CreateSingleObject

Integer CreateSingleObject( DAPISESSION session,
                            DAPINODE parent,
                            Assoc objectDetails )

Creates a single object in the parent specified.

A unique ID is automatically assigned to the new node upon successful execution of this function.

Parameters

session

The DAPISESSION object handle,

parent

The parent DAPINODE object.

objectDetails

The details of the object to be created.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

DelAttrFromCategory

Integer DelAttrFromCategory( DAPISESSION session,
                             String category,
                             String attribute )

Deletes an attribute from a category.

This deletes a row from the DCatAttrs table.

Parameters

session

The DAPISESSION object handle.

category

The name of the category from which the attribute is removed.

attribute

The name of the attribute to delete.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

DelCategory

Integer DelCategory( DAPISESSION session,
                     String category,
                     Boolean dropTable )

Deletes a category.

This deletes a row from the DCategories table.

Parameters

session

The DAPISESSION object handle.

category

The name of the category to delete.

dropTable

TRUE if the associated category table should be deleted upon successful deletion of the category.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

DelCategoryAttr

Integer DelCategoryAttr( DAPISESSION session,
                         String attribute,
                         [Boolean checkUsage] )

Deletes an attributes.

This deletes a row in the DAttributes table.

Parameters

session

The DAPISESSION object handle.

attribute

The name of the attribute to delete.

checkUsage

TRUE to force a check on the usage of this attribute so that the function will fail if it is used by any category.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

DeleteNode

Integer DeleteNode( DAPINODE node,
                    [Integer options] )

Deletes the specified node and its child nodes.

This will fail if the specified node (or any of its child nodes) are reserved, referenced by a generation, or contain locked versions.

DAPI will issue a callback for each node it encounters by calling a script setup by DAPI.SetCallback().

Parameters

node

The DAPINODE object handle of the node to delete.

options

An optional flag for delete options. This flag can be joined by bitwise OR operators using the following constants:

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

DeleteNodeRight

Integer DeleteNodeRight( DAPINODE node,
                         Integer rightID )

Deletes a user or group access right from the specified node.

This deletes a row from the DTreeACL table.

Parameters

node

The DAPINODE object handle.

rightID

The user or group ID.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

DeleteRendition

Integer DeleteRendition( DAPIVERSION version,
                         String renditionType )

Deletes the specified rendition of a specified version.

Parameters

version

The DAPIVERSION object handle.

renditionType

The type of the rendition.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

DeleteThumbnail

Integer DeleteThumbnail( DAPIVERSION version,
                         String thumbnailType,
                         Integer pageNum )

Deletes the specified thumbnail of the specified version.

Parameters

version

The DAPIVERSION object handle of the version from which the spcecified thumbnail will be deleted.

thumbnailType

The type of the thumbnail.

pageNum

The page number of the thumbnail.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

DeleteThumbnails

Integer DeleteThumbnails( DAPIVERSION version )

Deletes all thumbnails of the specified version.

Parameters

version

The DAPIVERSION object handle of the version whose thumbnails to be deleted.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

DeleteVersion

DeleteVersion()

Returns:

FetchRendition

FetchRendition()

Returns:

FetchRenditionRangesToStream

Integer FetchRenditionRangesToStream( DAPIVERSION version,
                                      Socket aSocket,
                                      String renditionType,
                                      List rangesData,
                                      String headerData )

Writes multiple portions of the version rendition contents to the specified Socket object.

Parameters

version

The DAPIVERSION object handle.

aSocket

The Socket object to which the rendition contents are written.

renditionType

The type of the rendition.

rangesData

A List of entries in which each element is a List with two integers representing a range. The first integer is the starting position and the second integer is the end position.

headerData

An HTML header for the specified ranges.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

FetchRenditionRangeToStream

Integer FetchRenditionRangeToStream( DAPIVERSION version,
                                     Socket aSocket,
                                     String renditionType,
                                     List rangeData )

Writes a portion of the version rendition contents to the specified Socket object.

Parameters

version

The DAPIVERSION object handle.

aSocket

The Socket object to which the rendition contents are written.

renditionType

The type of the rendition.

rangeData

A List of two integers representing the range. The first integer is the starting position and the second integer is the end position.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

FetchRenditions

Integer FetchRenditions( DAPIVERSION version,
                         String renditionType,
                         String localFilePath )

Copies the specified version rendition contents to a file on the local host.

Parameters

version

The DAPIVERSION object handle.

renditionType

The type of the rendition.

localFilePath

The local file path to which the rendition contents are copied.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

FetchRenditionToStream

Integer FetchRenditionToStream( DAPIVERSION version,
                                Socket aSocket,
                                String renditionType )

Writes the version rendition contents to the specified Socket.

Parameters

version

The DAPIVERSION object handle.

aSocket

The Socket object to which the rendition contents are written.

renditionType

The type of the rendition.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

FetchThumbnail

Integer FetchThumbnail( DAPIVERSION version,
                        String thumbnailType,
                        String localFilePath,
                        Integer pageNum )

Copies the specified thumbnail contents to the specified file on the local host.

Parameters

version

The DAPIVERSION object handle.

thumbnailType

The type of the thumbnail.

localFilePath

The local file path to which the rendition contents are copied.

pageNum

The page number of the thumbnail to be fetched.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

FetchThumbnailAsBase64

String FetchThumbnailAsBase64( DAPIVERSION version,
                               String thumbnailType,
                               Integer pageNum )

Returns the specified thumbnail as a base64 encoded string.

Parameters

version

The DAPIVERSION object handle.

thumbnailType

The type of the thumbnail.

pageNum

The page number of the thumbnail.

Returns:

a string representation of the specified thumbnail if successful; Error otherwise.

FetchThumbnailAsBytes

Bytes FetchThumbnailAsBytes( DAPIVERSION version,
                             String thumbnailType,
                             Integer pageNum )

Returns the specified thumbnail as a byte array.

Parameters

version

The DAPIVERSION object handle.

thumbnailType

The type of the thumbnail.

pageNum

The page number of the thumbnail.

Returns:

a Byte arrary if successful; Error otherwise.

FetchThumbnailToStream

Integer FetchThumbnailToStream( DAPIVERSION version,
                                DAPISTREAM outStream,
                                String thumbnailType,
                                Integer pageNum )

Writes a portion of the thumbnail to the specified DAPISTREAM object.

Parameters

version

The DAPIVERSION object handle.

outStream

The DAPISTREAM object to which the thumbnail contents are written.

thumbnailType

The type of the thumbnail.

pageNum

The page number of the thumbnail.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

FetchVersion

Integer FetchVersion( DAPIVERSION version,
                      String localFilePath )

Copies the specified version contents to a file on the local host.

Parameters

version

The DAPIVERSION object handle.

localFilePath

The local file path to which the version contents are copied.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

FetchVersionAsVal

Dynamic FetchVersionAsVal( DAPIVERSION version )

Retrieves the value stored as the version of a node.

Parameters

version

The DAPIVERSION object handle.

Returns:

The value stored for this version if successful; Error otherwise.

FetchVersionRangesToStream

Integer FetchVersionRangesToStream( DAPIVERSION version,
                                    Socket aSocket,
                                    List rangesData,
                                    String headerData )

Writes multiple portions of the version contents to the specified Socket object.

Parameters

version

The DAPIVERSION object handle.

aSocket

The Socket object to which the version contents are written.

rangesData

A List of entries in which each element is a List with two integers representing the range. The first integer is the starting position and the second integer is the end position.

headerData

An HTML header for the specified ranges.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

FetchVersionRangeToStream

Integer FetchVersionRangeToStream( DAPIVERSION version,
                                   Socket aSocket,
                                   List rangeData )

Writes a portion of the version contents to the specified Socket.

Parameters

version

The DAPIVERSION object handle.

aSocket

The Socket object to which the version contents are written.

rangeData

A List of two integers representing the range. The first integer is the starting position and the second integer is the end position.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

FetchVersionToStream

Integer FetchVersionToStream( DAPIVERSION version,
                              Socket aSocket )

Writes the version contents to the specified Socket object.

Parameters

version

The DAPIVERSION object handle.

aSocket

The Socket object to which the version contents are written.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

GetExternalSource

RecArray GetExternalSource( DAPSESSION session,
                            String extSrcName )

Retrieves a RecArray containing the external source ID number, name, and display value.

Parameters

session

The DAPISESSION object handle.

extSrcName

The external source name.

Returns:

A RecArray containing the values for the external source ID, Value and Display.

Example

        Object prgCtx = $pSession
        Dynamic ret

        ret = DAPI.GetExternalSource( prgCtx.DSession().fSession, 'file_system' )
        echo( ret )

        Output:

        V{<'ID','Value','Display'><1,'file_system',?>}

GetExternalSourceByID

RecArray GetExternalSourceByID( DAPSESSION session,
                                String extSrcID )

Retrieves a RecArray containing the external source ID number, name, and display value.

Parameters

session

The DAPISESSION object handle.

extSrcID

The external source ID number.

Returns:

A RecArray containing the values for the external source ID, Value and Display.

Example

        Object prgCtx = $pSession
        Dynamic ret

        ret = DAPI.GetExternalSourceByID( prgCtx.DSession().fSession, 1 )
        echo( ret )

        Output:

        V{<'ID','Value','Display'><1,'file_system',?>}

GetMultilingualComment

String GetMultilingualComment( DAPINODE node,
                               String languageCode )

Gets the comment for a DAPINODE in the specified language.

Parameters

node

The DAPINODE object handle.

languageCode

The language code of the desired comment.

Returns:

The comment if successful, an undefined value otherwise.

GetMultilingualName

String GetMultilingualName( DAPINODE node,
                            String languageCode )

Gets the name for a DAPINODE in the specified language.

Parameters

node

The DAPINODE object handle.

languageCode

The language code of the desired name.

Returns:

The name if successful, an undefined value otherwise.

GetNode

DAPINODE GetNode( String namePath,
                  DAPINODE startNode,
                  [Boolean autoExpand ] )

Retrieves as specified by name or relative path.

For example, get a child node named 'A' by specifying
'A' for _namePath_, or get a grandchild node named 'B', which is
a child node of 'A', by specifying 'A:B' for _namePath_.

Parameters

namePath

A String indicating the name or relative path (separated by colons) of the child node to retrieve from the specified parent node.

startNode

The DAPINODE object handle identifying the starting point parent node from which the child node is retrieved.

autoExpand

TRUE if all node attributes are fetched up front; FALSE otherwise. The default is TRUE.

Returns:

The DAPINODE object handle of the retrieved node if successful; Error otherwise.

GetNodeByGUID

DAPINODE GetNodeByGUID( DAPISESSION session,
                        GUID GUID,
                        [Boolean autoExpand],
                        [Boolean includeRecycled] )

Retrieves a node based on its GUID.

Parameters

session

The DAPISESSION object handle.

GUID

The GUID of the node to be retrieved.

autoExpand

TRUE if all node attributes are fetched up front; FALSE otherwise. The default is TRUE.

includeRecycled

TRUE if recycled nodes should be retrieved. The default is FALSE.

Returns:

The DAPINODE object handle of the retrieved node if successful; Error otherwise.

GetNodeByID

DAPINODE GetNodeByID( DAPISESSION session,
                      Integer volumeID/nodeID,
                      [Integer nodeID],
                      [Boolean autoExpand ] )

Retrieves a node based on its unique ID.

It is not necessary to specify the volume ID. Use the constant DAPI.BY_DATAID to fetch the node based on the unique node ID or simply specify the node ID in the second parameter.

Parameters

session

The DAPISESSION object handle.

volumeID/nodeID

An Integer indicating the volume ID of the node or the unique node ID if the third parameter is not specified

nodeID

An Integer identifying the node ID.

autoExpand

TRUE if all node attributes are fetched up front; FALSE otherwise. The default is TRUE.

Returns:

The DAPINODE object handle of the retrieved node if successful; Error otherwise. Note that the function will return an error when the node's DataID equals its ParentID.

GetNodeColumnNames

List GetNodeColumnNames( DAPISESSION session,
                         Integer columnType )

Returns a List of column names in the DTree table.

Parameters

session

The DAPISESSION object handle.

columnType

TRUE if the type of columns whose names will be returned.

Returns:

The List of column names if successful; Error otherwise.

GetNodePermissions

Integer GetNodePermissions( DAPINODE node )

Returns the permissions mask that the current user has on the specified node.

Parameters

node

The DAPINODE object handle.

Returns:

The permissions bit mask which is one or more node permission constants joined by bitwise OR operators if successful; Error otherwise.

GetNodeRight

Integer GetNodeRight( DAPINODE node,
                      Integer rightID )

Returns a user or group access right for the specified node.

Parameters

node

The DAPINODE object handle.

rightID

The user or group ID.

Returns:

The permissions bit mask which is one or more node permission constants joined by bitwise OR operators if successful; Error otherwise.

GetNodeRights

RecArray GetNodeRights( DAPINODE node )

Returns all user or group access rights for the specified node.

Parameters

node

The DAPINODE object handle.

Returns:

A RecArray containing the records of the DTreeACL table if successful; Error otherwise.

GetNodesByIDs

List GetNodesByIDs( DAPISESSION dapiSess,
                    List dataIDs,
                    [Assoc extendedSettings] )

Returns a List of DAPINODE objects for the given DataID list.

Nodes deleted or not accessible to the requesting user will not be included in the return list. The extendedSettings parameter allows to specify if more data will be retrieved from the Content Server database. By default, it retrieves multilingual name and comment for the requesting user's preferred language only; and it retrieves neither the external data attributes (ExternalCreateDate, ExternalModifyDate, ExternalCreatorID, and ExternalSourceID) nor the ExtendedData attribute.

Parameters

dapiSess

The DAPISESSION object for the requesting user.

dataIDs

A list of DataIDs of type Integer.

extendedSettings

An optional Assoc object containing options for specifying what data attributes should be retrieved from database.

  • Boolean ExtendedData: TRUE to indicate that the ExtendedData attribute will be set with the value from the database; otherwise, it is not set. It defaults to FALSE.

  • Boolean Name: TRUE to indicate the node's pMultilingual will have the multilingual names for all enabled languages; otherwise,it just contains multilingual data for the requesting user's preference language. It defaults to FALSE.

  • Boolean Comment: TRUE to indicate the node's pMultilingual will have the multilingual comments for all enabled languages; otherwise, it just contains multilingual data for the requesting user's preference language. It defaults to FALSE.

  • Boolean ExternalData: TRUE to indicate the external data will be retrieved from the Content Server database; otherwise, returned nodes do not have meaningful values in the external data attributes. It defaults to FALSE.

Returns:

A List containing the DAPINODE object handles if successful; Error otherwise. Note that an error will be returned if the length of the input dataIDs parameter is over 250.

Example

/* Sample data in DTreeMultilingual

DataID LanguageCode Name DComment

5811 en_US root the one at the top of a tree

5811 fr racine un sommet particulier, nommé racine de l'arborescence à partir duquel il

Sample data in DTreeCoreExternalData

DataID VersionNum ExternalCreateDate ExternalModifyDate ExternalCreatorID ExternalSourceID

5811 0 2020-01-07 15:53:21.500 2020-01-07 15:53:21.500 1

*/

Assoc extendedDefaultSettings

DAPINODE node

DAPISESSION dSession

Dynamic apiError

Dynamic result

List nodeList

Object prgCtx

RecArray multilingual

Record rec

String errMsg

List ids = { 5811 }

Boolean ok = TRUE

String userName = 'francais' // Supposing this user set French (fr) as his Preference Language and has read permission on 5811

Assoc checkVal = $lliapi.PrgSession.GetPrgCtx( userName )

if ( checkVal.ok )

prgCtx = checkVal.pSession

dSession = prgCtx.DSession().fSession

echo( "--- Example One (default settings): No external data and Multilingual data for user's preferred language only ---- " )

result = DAPI.GetNodesByIDs( dSession, ids )

if ( IsNotError( result ) )

    PrintResult( result )

else

    ok = FALSE
    apiError = result
    errMsg = "Error in retrieving the list of objects"

end

/* Output of Example One

16:14:11,650 INFO {5811} pExternalCreateDate=[?]

16:14:11,650 INFO {5811} Code=[fr] Name=[racine] DComment=[un sommet particulier, nommé racine de l'arborescence à partir duquel il]

*/

echo( "--- Example Two: Request to get all multilingual names and external data ---- " )

extendedDefaultSettings = Assoc{ "Name": TRUE, "ExternalData": TRUE }

result = DAPI.GetNodesByIDs( dSession, ids, extendedDefaultSettings )

if ( IsNotError( result ) )

    PrintResult( result )

else

    ok = FALSE
    apiError = result
    errMsg = "Error in retrieving the list of objects"

end

/* Output of Example Two

contains all external data

16:19:29,753 INFO {5811} pExternalCreateDate=[Tue Jan 07 15:53:21 2020]

contains all multilingual Names but does not have all multilingual comments.

16:19:29,753 INFO {5811} Code=[en_US] Name=[root] DComment=[?]

16:19:29,753 INFO {5811} Code=[fr] Name=[racine] DComment=[un sommet particulier, nommé racine de l'arborescence à partir duquel il]
*/

else

ok = FALSE
errMsg = checkVal.errMsg

end

if ( !ok )

Echo( errMsg )

end

function void PrintResult( List result )

DAPINode    node
RecArray        multilingual
Record          rec

for node in result

    Echo( Str.Format( '{%1} pExternalCreateDate=[%2]', node.pID, node.pExternalCreateDate ) )

    multilingual = node.pMultilingual

    for rec in multilingual

        Echo(
            Str.Format(
                '{%1} Code=[%2]   Name=[%3]   DComment=[%4]',
                node.pID,
                rec.LanguageCode,
                rec.Name,
                rec.DComment ) )

    end

end

end

GetNodeUserAttr

Dynamic GetNodeUserAttr( DAPINODE node,
                         String attrName,
                         [Integer attrType] )

Returns a user attribute value for the specified node.

Parameters

node

The DAPINODE object handle.

attrName

The name of the attribute.

attrType

An integer indicating the attribute type:

Returns:

The value for the specific attribute if successful; Error otherwise.

GetOriginalNode

DAPINODE GetOriginalNode( DAPINODE arg1 )

Retrieves the original node referenced by the specified alias or generation node.

Note that the specified node is returned if the specified node is not an alias or a generation.

Parameters

arg1

The DAPINODE object handle of the possible alias or generation node.

Returns:

The DAPINODE object handle of the original node if successful; Error otherwise.

GetParentNode

DAPINODE GetParentNode( DAPINODE node )

Retrieves the parent node of the specified node.

Parameters

node

The DAPINODE object handle.

Returns:

The DAPINODE object handle of the parent node if successful; Error otherwise. Note that it returns Error if the node is a root node.

GetPurgeFlag

Boolean GetPurgeFlag()

Gets the current purge flag.

Returns:

the current purge flag.

GetRecycledNodeByID

DAPINODE GetRecycledNodeByID( DAPISESSION session,
                              Integer volumeID/nodeID,
                              [Integer nodeID],
                              [Boolean autoExpand ] )

Retrieves a recycled node based on its unique ID.

It is not necessary to specify the volume ID. Use the constant DAPI.BY_DATAID to fetch the node based on the unique node ID or simply specify the node ID in the second parameter. Note that this function can return a DAPINODE that does not exist when the "recycled" node has been actually purged. That can happen when the function is called on a deleted node of special node type that must be purged immediately.

Parameters

session

The DAPISESSION object handle.

volumeID/nodeID

An Integer indicating the volume ID of the node or the unique node ID if the third parameter is not specified

nodeID

An Integer identifying the node ID.

autoExpand

TRUE if all node attributes are fetched up front; FALSE otherwise. The default is TRUE.

Returns:

The DAPINODE object handle of the retrieved node if successful; Error otherwise.

GetRendition

DAPIVERSION GetRendition( DAPIVERSION version,
                          String renditionType )

Retrieves a rendition of the specified version.

Parameters

version

The DAPIVERSION object handle.

renditionType

The type of the rendition.

Returns:

The DAPIVERSION object handle of the retrieved rendition if successful; Error otherwise.

GetRenditionSize

Integer GetRenditionSize( DAPIVERSION version,
                          String renditionType )

Returns the size of the specified rendition.

Note: While this may be more accurate than the DAPIVERSION.pFileDataSize feature, it also may take more time to calculate this size.

Parameters

version

The DAPIVERSION object handle.

renditionType

The type of the rendition.

Returns:

The size, in bytes, of the rendition if successful; Error otherwise.

GetThumbnail

DAPIVERSION GetThumbnail( DAPIVERSION version,
                          String thumbnailType,
                          Integer pageNum )

Retrieves the specified thumbnail of the version.

Parameters

version

The DAPIVERSION object handle.

thumbnailType

The type of the thumbnail.

pageNum

The page number of the thumbnail.

Returns:

The DAPIVERSION object handle of the retrieved rendition if successful; Error otherwise.

GetVersion

DAPIVERSION GetVersion( DAPINODE node,
                        Integer versionNum )

Retrieves a specific version of the specified node.

Parameters

node

The DAPINODE object handle.

versionNum

An Integer identifying which version to retrieve or the following constants:

Returns:

The DAPIVERSION object handle of the retrieved version if successful; Error otherwise.

GetVersionByGUID

DAPINODE GetVersionByGUID( GUID GUID,
                           DAPISESSION session )

Retrieves a version based on its GUID.

Parameters

GUID

The GUID of the version to be retrieved.

session

The DAPISESSION object handle.

Returns:

The DAPIVERSION object handle of the retrieved node if successful; Error otherwise.

GetVersionByID

DAPIVERSION GetVersionByID( Integer versionID,
                            DAPISESSION session )

Retrieves a version based on its unique ID.

Parameters

versionID

An integer indicating the version ID

session

The DAPISESSION object handle.

Returns:

The DAPIVERSION object handle of the retrieved version if successful; Error otherwise.

GetVersionByName

DAPIVERSION GetVersionByName( DAPINODE node,
                              String versionName )

Retrieves a version based on the unique version name of a node.

Parameters

node

The DAPINODE object handle.

versionName

The unique name of the version.

Returns:

The DAPIVERSION object handle of the retrieved version if successful; Error otherwise.

GetVersionColumnNames

List GetVersionColumnNames( DAPISESSION session,
                            Integer columnType )

Returns a List of column names in the DVersData table.

Parameters

session

The DAPISESSION object handle.

columnType

The type of columns whose names will be returned, which should be one of the following:

Returns:

The List of column names if successful; Error otherwise.

GetVersionSize

Integer GetVersionSize( DAPIVERSION version )

Returns the size of the specified version.

Note: While this may be more accurate than the DAPIVERSION.pFileDataSize feature, it also may take more time to calculate this size.

Parameters

version

The DAPIVERSION object handle.

Returns:

The size, in bytes, of the version if successful; Error otherwise.

GetVersionUserAttr

Dynamic GetVersionUserAttr( DAPIVERSION version,
                            String attrName )

Returns a user attribute value for the specified version.

Parameters

version

The DAPIVERSION object handle.

attrName

The name of the attribute.

Returns:

The value for the specific attribute if successful; Error otherwise.

HasThumbnail

Boolean HasThumbnail( DAPIVERSION version,
                      String thumbnailType,
                      Integer pageNum )

Returns true if the version has the thumbnail specified, else false.

Parameters

version

The DAPIVERSION object handle of the version against which the check will be done.

thumbnailType

The type of the thumbnail.

pageNum

The page number of the thumbnail.

Returns:

A Boolean value if successful; Error otherwise.

IsInTree

Boolean IsInTree( DAPINODE node,
                  DAPINODE tree )

Checks if a node is a descendant of another.

This returns TRUE if node is a descendant of tree.

Parameters

node

The DAPINODE object handle.

tree

The DAPINODE object handle of the node which may be a parent of node.

Returns:

A Boolean value if successful; Error otherwise.

ListAliasNodes

List ListAliasNodes( DAPINODE node,
                     [Integer permissions] )

Returns a List of all aliases of the specified node.

Parameters

node

The DAPINODE object handle.

permissions

The permissions bit mask which is one or more node permission constants joined by bitwise OR operators.

Returns:

A List containing the DAPINODE object handles if successful; Error otherwise.

ListCategories

RecArray ListCategories( DAPISESSION session )

Returns a RecArray containing information about all existing categories.

This retrieves all rows from the DCategories table.

Parameters

session

The DAPISESSION object handle.

Returns:

A RecArray if successful; Error otherwise.

ListCategoryAttrs

RecArray ListCategoryAttrs( DAPISESSION session,
                            [String category] )

Returns a RecArray containing information about attributes.

This retrieves rows from the DAttributes table.

Parameters

session

The DAPISESSION object handle.

category

An optional String indicating a category association. If specified, information is only returned for attributes associated with the specified category. If not included, information is returned for all attributes.

Returns:

A RecArray if successful; Error otherwise.

ListContents

RecArray ListContents( DAPISESSION session,
                       Integer volumeID,
                       Integer nodeID,
                       String viewName,
                       String query,
                       Integer permissions )

Returns a RecArray containing the child nodes of a specified node, in which each node is represented as a record.

Parameters

session

The DAPISESSION object handle.

volumeID

An Integer indicating the volume ID of the node.

nodeID

An Integer identifying the node ID.

viewName

The name of the database table or database view to use.

query

An optional SQL clause to restrict the retrieval of the child nodes.

permissions

An optional permissions masks to restrict the retrieval of child nodes.

Returns:

A RecArray, containing records of child nodes if successful; Error otherwise. The Record fields will vary depending upon the table and view name specified.

ListGenerations

List ListGenerations( DAPINODE node,
                      [Integer permissions] )

Returns a List of all generations of the specified node.

Parameters

node

The DAPINODE object handle.

permissions

The permissions bit mask which is one or more node permission constants joined by bitwise OR operators.

Returns:

A List containing the DAPINODE object handles if successful; Error otherwise.

ListGensFromRelease

List ListGensFromRelease( DAPINODE node,
                          Integer major,
                          Integer minor,
                          [Integer permissions] )

Returns a List of all generations of the specified release or revision of a compound document.

Parameters

node

The DAPINODE object handle.

major

An Integer indicating the major release number.

minor

An Integer indicating the minor release number.

permissions

The permissions bit mask which is one or more node permission constants joined by bitwise OR operators.

Returns:

A List containing the DAPINODE object handles if successful; Error otherwise.

ListGensFromVersion

List ListGensFromVersion( DAPIVERSION version,
                          [Integer permissions] )

Returns a List of all generations of the specified version.

Parameters

version

The DAPIVERSION object handle.

permissions

The permissions bit mask which is one or more node permission constants joined by bitwise OR operators.

Returns:

A List containing the DAPINODE object handles if successful; Error otherwise.

ListRenditions

List ListRenditions( DAPIVERSION version )

Returns a List of all renditions of the specified version.

Parameters

version

The DAPIVERSION object handle.

Returns:

A List containing the DAPIVERSION object handles if successful; Error otherwise.

ListSubNodes

List ListSubNodes( DAPINODE node,
                   [String query],
                   [String category],
                   [String catAttrQuery],
                   [Boolean autoExpand],
                   [Integer permissions] )

Returns a List of the child nodes of a specified node.

Parameters

node

The DAPINODE object handle.

query

An optional query String, phrased as the condition of a SQL clause, limiting which nodes are returned.

category

An optional String identifying a category. If present and defined, retrieval is restricted to include only those nodes whose category is this specific category value.

catAttrQuery

An optional String indicating an attribute query, phrased as the condition of a SQL clause, coupled with the category parameter, further restricting the retrieval to include only those nodes whose attributes contain a specific value.

autoExpand

TRUE if all node attributes are fetched up front; FALSE otherwise. FALSE is the default.

permissions

An optional permissions mask to restrict the retrieval by permission privileges.

Returns:

A List containing the DAPINODE object handles if successful; Error otherwise.

ListThumbnails

List ListThumbnails( DAPIVERSION version )

Returns a List of all thumbnails of the specified version.

Parameters

version

The DAPIVERSION object handle.

Returns:

A List containing the DAPIVERSION object handles if successful; Error otherwise.

ListVersions

List ListVersions( DAPINODE node,
                   [Integer offset],
                   [Integer limit] )

Returns a List of all versions of the specified node.

Parameters

node

The DAPINODE object handle.

offset

An Integer indicating how many versions to skip at the start of the result set. The default offset is 0.

limit

A positive Integer between 1 and 1000 indicating the maximum number of versions to return. If an offset is specified, the default limit is 50; if no offset is specified, then all versions will be returned. If the specified limit is over 1000, it will automatically be set to 1000; if it is zero or below then it will be set to 50.

Returns:

A List containing the DAPIVERSION object handles if successful; Error otherwise.

LockVersion

Integer LockVersion( DAPIVERSION version,
                     Integer lockFlag )

Locks the specified version.

Parameters

version

The DAPIVERSION object handle.

lockFlag

An Integer indicating the type of lock. A standard value to use is DAPI.LOCK_VERSION.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

MoveNode

Integer MoveNode( DAPINODE node,
                  DAPINODE parent,
                  [Dynamic newNames],
                  [Boolean forceInheritPerm] )

Relocates the specified node and all its child nodes.

DAPI will issue a callback for each node it encounters by calling a script setup by DAPI.SetCallback().

Parameters

node

The DAPINODE object handle of the node to be relocated.

parent

The DAPINODE object handle of the node that will be the parent of the moved node.

newNames

An optional String indicating the new name for the moved node, or an Assoc containing multilingual names for the new node, keyed by language code.

forceInheritPerm

TRUE if the moved node and its child nodes will inherit permissions from the parent node, otherwise the permissions of the moved node and its child nodes will remain unchanged.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

MoveProviderData

Integer MoveProviderData( DAPIVERSION version,
                          String providerName,
                          Integer providerMoveType )

Changes the data provider storage of the specified version. The metadata will be re-indexed. Does not update the modification date of the version or node.

Parameters

version

The DAPIVERSION object handle.

providerName

The name of the provider.

providerMoveType

The type of the provider move.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

NextOrderingPos

Integer NextOrderingPos( DAPINODE node )

Returns the next available ordering position in a compound document.

Parameters

node

The DAPINODE object handle.

Returns:

The next available position (the maximum current child node position plus one) if successful; Error otherwise.

NumAliasNodes

Integer NumAliasNodes( DAPINODE node )

Returns the number of aliases of the specified node.

Parameters

node

The DAPINODE object handle.

Returns:

The number of aliases if successful; Error otherwise.

NumGenerations

Integer NumGenerations( DAPINODE node )

Returns the number of generations of the specified node.

Parameters

node

The DAPINODE object handle.

Returns:

The number of generations if successful; Error otherwise.

NumGensFromRelease

Integer NumGensFromRelease( DAPINODE node,
                            Integer major,
                            Integer minor )

Returns the number of generations of the specified release or revision of a compound document.

Parameters

node

The DAPINODE object handle.

major

the major release number.

minor

the minor release number.

Returns:

The number of generations if successful; Error otherwise.

NumGensFromVersion

Integer NumGensFromVersion( DAPIVERSION version )

Returns the number of generations of the specified version.

Parameters

version

The DAPIVERSION object handle.

Returns:

The number of generations if successful; Error otherwise.

NumRenditions

Integer NumRenditions( DAPIVERSION version )

Returns the number of rendition types associated with a specified version.

Parameters

version

The DAPIVERSION object handle.

Returns:

The number of rendition types if successful; Error otherwise.

NumSubNodes

Integer NumSubNodes( DAPINODE node )

Returns the number of child nodes of the specified node.

Note: this obtains the count by issuing a database query.

Parameters

node

The DAPINODE object handle.

Returns:

The number of child nodes if successful; Error otherwise.

NumThumbnails

Integer NumThumbnails( DAPIVERSION version )

Returns the number of thumbnails of the specified version.

Parameters

version

The DAPIVERSION object handle.

Returns:

The number of thumbnails if successful; Error otherwise.

NumVersions

NumVersions()

Returns:

OpenReadVerStream

DAPISTREAM OpenReadVerStream( DAPIVERSION version,
                              [Boolean resourceFork] )

Opens a stream for reading the contents of the specified version.

Important: DAPI.VerStreamClose() must be called after reading.

Parameters

version

The DAPIVERSION object handle.

resourceFork

TRUE to read the resource fork of the version contents, false to read the data fork. The default is FALSE.

Returns:

The DAPISTREAM object handle of the retrieved node if successful; Error otherwise.

OpenWriteVerStream

DAPISTREAM OpenWriteVerStream( DAPINODE node,
                               DAPIVERSION version,
                               Integer dataLen,
                               String provider,
                               Boolean resourceFork )

Opens a stream for writing the contents of the specified version.

Important: DAPI.VerStreamClose() must be called after writing.

Parameters

node

The DAPINODE object handle.

version

The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the version.

dataLen

The total length of data, in Bytes, to be written.

provider

The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider if it is an empty string.

resourceFork

TRUE to read the resource fork of the version contents, false to read the data fork. The default is FALSE.

Returns:

The DAPISTREAM object handle of the retrieved node if successful; Error otherwise.

PurgeNode

Integer PurgeNode( DAPINODE node,
                   [Integer options] )

Purges the specified node and its child nodes.

This will fail if the specified node (or any of its child nodes) are reserved, referenced by a generation, or contain locked versions.

DAPI will issue a callback for each node it encounters by calling a script setup by DAPI.SetCallback().

Parameters

node

The DAPINODE object handle of the node to delete.

options

An optional flag for purge options. This flag can be joined by bitwise OR operators using the following constants:

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

PurgeVersions

Integer PurgeVersions( DAPINODE node,
                       [Integer numToKeep] )

Deletes one or more versions from the specified node.

Locked versions and versions that are referenced by generations are not included in the purging procedure.

Parameters

node

The DAPINODE object handle.

numToKeep

The number of versions to be retained. Versions are deleted from oldest to most recent. Defaults to 1 if not specified.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

RefreshNode

Integer RefreshNode( DAPINODE node )

Forces a retrieval of the most recent node information from the database.

Parameters

node

The DAPINODE object handle.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

RefreshVersion

Integer RefreshVersion( DAPIVERSION version )

Forces a retrieval of the most recent version information from the database.

Parameters

version

The DAPIVERSION object handle.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

RenameNode

Integer RenameNode( DAPINODE node,
                    Dynamic newNames )

Renames the specified node.

This is the only way to rename a node. Setting the pName and doing a DAPI.UpdateNode() will not work, nor will calling DAPI.SetMultilingualName() on a node that has already been created.

Parameters

node

The DAPINODE object handle.

newNames

The new name for the node as a String, or a set of multilingual names for the new node as an Assoc, keyed by language code.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

ReserveNode

Integer ReserveNode( DAPINODE node,
                     Integer reserveFlag,
                     [Integer userID] )

Reserves the specified node.

Parameters

node

The DAPINODE object handle.

reserveFlag

An Integer indicating the type of lock. The standard value is DAPI.RESERVE_NODE.

userID

The user or group ID of the user or group for whom the node is being reserved. The default is the current user if unspecified.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

SetCallback

Integer SetCallback( DAPISESSION session,
                     Dynamic script,
                     [Dynamic object] )

Establishes a callback script for node events.

The events include copying, moving, and deleting nodes.

Parameters

session

The DAPISESSION object handle.

script

The script to run when node events occur.

object

The object containing the script feature.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

SetDefaultProvider

Integer SetDefaultProvider( DAPISESSION session,
                            String provider )

Sets a default provider to use during a session.

Most functions accepting the provider parameter will default to this provider. The default is the 'SQL' provider if unspecified.

Parameters

session

The DAPISESSION object handle.

provider

The name of the provider name.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

SetMultilingualComment

Integer SetMultilingualComment( DAPINODE node,
                                String languageCode,
                                String newValue )

Sets the comment for a DAPINODE in the specified language.

NOTE: This is an in-memory set only. Changes will not be saved to the database until DAPI.UpdateNode() is called.

Parameters

node

The DAPINODE object handle.

languageCode

The language code for the comment.

newValue

The new comment for the node.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

SetMultilingualName

Integer SetMultilingualName( DAPINODE node,
                             String languageCode,
                             String newValue )

Sets the name for a DAPINODE in the specified language.

This method cannot be called after a node has been created. To change a node's name after creation, use DAPI.RenameNode().

NOTE: This is an in-memory set only. Changes will not be saved to the database until DAPI.CreateNode() is called.

Parameters

node

The DAPINODE object handle.

languageCode

The language code for the name.

newValue

The new name for the node.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

SetNodeUserAttr

Integer SetNodeUserAttr( DAPINODE node,
                         String attrName,
                         Dynamic value,
                         [Integer attrType] )

Assigns a value to the specified user attribute of the specified node.

Call DAPI.UpdateNode() after this function to save the changes to the database.

Parameters

node

The DAPINODE object handle.

attrName

The name of the attribute.

value

The value to be assigned to the specified attribute.

attrType

An integer indicating the attribute type:

The default value is DAPI.ATTR_SET_ALL if unspecified.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

SetPurgeFlag

Boolean SetPurgeFlag()

Sets purge flag to true.

Returns:

Always True. Thus, there is no need to check the return value.

SetVersionFetchMode

Integer SetVersionFetchMode( DAPIVERSION version,
                             Integer mode )

Set the mode used to fetch version data. The standard fetch mode DAPI.FETCHMODE_STANDARD is used unless otherwise set.

Parameters

version

The DAPIVERSION object handle.

mode

The fetch mode:

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

SetVersionUserAttr

Integer SetVersionUserAttr( DAPIVERSION version,
                            String attrName,
                            Dynamic value )

Assigns a value to the specified user attribute of the specified version.

Call DAPI.UpdateVersion() after this function to save the changes to the database.

Parameters

version

The DAPIVERSION object handle.

attrName

The name of the attribute.

value

The value to be assigned to the specified attribute.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

UnlockVersion

Integer UnlockVersion( DAPIVERSION version )

Unlocks the specified version.

Parameters

version

The DAPIVERSION object handle.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

UnreserveNode

Integer UnreserveNode( DAPINODE node )

Unreserves the specified node.

Parameters

node

The DAPINODE object handle.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

UpdateChildCount

Integer UpdateChildCount( DAPINODE node,
                          Integer numAdded,
                          [Boolean callNotifyCallback] )

Updates the child count of the specified node, incrementing by a specified amount.

This will set the modification date of the node to the current date and time, and will optionally trigger a notification event.

Parameters

node

Node to be updated.

numAdded

Number to add to the current child count.

callNotifyCallback

Indicates whether a notification event should be created. Defaults to FALSE.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

UpdateNode

Integer UpdateNode( DAPINODE node,
                    Boolean changeModifyDate )

Updates modified node attributes of the specified node. The changeModifyDate parameter defaults to TRUE which triggers an NType = 7 (Update) insert into DTreeNotify. If FALSE, the node's ModifyDate is not updated and no row is inserted into DTreeNotify.

Parameters

node

The DAPINODE object handle.

changeModifyDate

FALSE to indicate that the ModifyDate will not be changed. Defaults to TRUE.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

UpdateNodeRight

Integer UpdateNodeRight( DAPINODE node,
                         Integer rightID,
                         Integer permissions )

Updates the user or group access right of the specified node.

Parameters

node

The DAPINODE object handle.

rightID

The user or group ID.

permissions

The permissions bit mask which is one or more node permission constants joined by bitwise OR operators.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

UpdateVersion

Integer UpdateVersion( DAPIVERSION version )

Updates modified version attributes for the specified version.

Note that the 3 version attributes, DAPIVersion.pID (VersionID), DAPIVersion.pNodeID (DocID), and DAPIVersion.pNumber (Version), are ignored by this function and cannot be updated for data integrity reason.

Parameters

version

The DAPIVERSION object handle.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

UpdCategory

Integer UpdCategory( DAPISESSION session,
                     Record categoryRec )

Updates a category.

This updates a row of the DCategories table. The function fails if the specified category name does not exist.

Parameters

session

The DAPISESSION object handle.

categoryRec

A category record. The columns must compatible with those in the DCategories table.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

UpdCategoryAttr

Integer UpdCategoryAttr( DAPISESSION session,
                         Record attributeRec )

Updates an attribute.

This updates a row of the DAttributes table. The function fails if the specified attribute name does not exist.

Parameters

session

The DAPISESSION object handle.

attributeRec

An attribute record. The columns must compatible with those in the DAttributes table.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

VersionFetchable

Boolean VersionFetchable( DAPIVERSION version )

Determines whether the specified version's blob content has been loaded.

Parameters

version

The DAPIVERSION object handle.

Returns:

TRUE if the version's content has been loaded, FALSE if it has not been loaded, or an Error if there was a problem determining fetchability.

VerStreamClose

Integer VerStreamClose( DAPIVERSION version,
                        DAPISTREAM stream )

Closes the specified open stream for reading or writing.

An opened DAPISTREAM must be closed when no longer in use.

Parameters

version

The DAPIVERSION object handle.

stream

The DAPISTREAM object handle.

Returns:

DAPI.OK (Integer 0) if successful; Error otherwise.

VerStreamLenGet

Integer VerStreamLenGet( DAPISTREAM stream )

Returns the length of an opened version stream.

Parameters

stream

The DAPISTREAM object handle.

Returns:

The length of the opened version stream if successful; Error otherwise.

VerStreamRead

Bytes VerStreamRead( DAPISTREAM stream,
                     Integer dataLen )

Reads a portion of data from an opened version stream.

The stream must be previously opened for reading using DAPI.OpenReadVerStream().

Parameters

stream

The DAPISTREAM object handle.

dataLen

The length of data, in Bytes, to read.

Returns:

A Bytes value containing the read data if successful; Error otherwise.

VerStreamWrite

Integer VerStreamWrite( DAPISTREAM stream,
                        Bytes theBytes )

Writes a portion of data to an opened version stream.

The stream must be previously opened for writing using DAPI.OpenWriteVerStream().

Parameters

stream

The DAPISTREAM object handle.

theBytes

A Bytes value containing the data to be written to the version.

Returns:

Number of bytes written, if successful; Error otherwise.

 Copyright © 2021 OpenText Corporation. All rights reserved.