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:
- DAPISESSION
- DAPINODE
- DAPIVERSION
- DAPISTREAM
The DAPI Package contains a formidable number of functions. The following table describes the bulk of the functionality provided:
Integer ALIAS_NODE
The subtype of an alias node. The value is 1.
ALL_COLUMNSInteger ALL_COLUMNS
Specify to include all columns (both system and user columns). Used by DAPI.GetNodeColumnNames() and DAPI.GetVersionColumnNames().
ATTR_DATEInteger ATTR_DATE
Specifies that an attribute type is a Date. Used by DAPI.AddCategoryAttr().
ATTR_FCHARInteger ATTR_FCHAR
Specifies that an attribute type is text of a fixed length. Used by DAPI.AddCategoryAttr().
ATTR_INTInteger ATTR_INT
Specifies that the attribute type is an Integer. Used by DAPI.AddCategoryAttr().
ATTR_LCHARInteger ATTR_LCHAR
Specifies than an attribute type is long length text. Used by DAPI.AddCategoryAttr().
ATTR_REALInteger ATTR_REAL
Specifies that the attribute type is a Real number. Used by DAPI.AddCategoryAttr().
ATTR_SET_ALLInteger ATTR_SET_ALL
Specify to include both the system and category attributes. Used by DAPI.GetNodeUserAttr() and DAPI.SetNodeUserAttr().
ATTR_SET_CATInteger ATTR_SET_CAT
Specify to include only the category attributes. Used by DAPI.GetNodeUserAttr() and DAPI.SetNodeUserAttr().
ATTR_SET_SYSInteger ATTR_SET_SYS
Specify to include only the system attribute. Used by DAPI.GetNodeUserAttr() and DAPI.SetNodeUserAttr().
ATTR_VCHARInteger ATTR_VCHAR
Specifies that the attribute type is variable length text. Used by DAPI.AddCategoryAttr().
AuditEventADDVERSIONInteger AuditEventADDVERSION
The auditing event recorded when a version is added to a node, as with DAPI.AddVersion() or DAPI.AddValAsVersion().
AuditEventALIASInteger AuditEventALIAS
The auditing event recorded when a node is aliased, as with DAPI.AliasNode().
AuditEventATTRCHANGEInteger AuditEventATTRCHANGE
The auditing event recorded when the system or category attributes of a node have changed, as with DAPI.SetNodeUserAttr() or DAPI.UpdateNode().
AuditEventCDORDEREDInteger AuditEventCDORDERED
The auditing event recorded when the ordering of a compound document's child node has changed, as with DAPI.UpdateNode()
AuditEventCOPYInteger AuditEventCOPY
The auditing event recorded when a node is copied, as with DAPI.CopyNode().
AuditEventCREATEInteger AuditEventCREATE
The auditing event recorded when a node is created, as with DAPI.AliasNode() or DAPI.CreateNode().
AuditEventCREATEGENInteger AuditEventCREATEGEN
The auditing event recorded when a generation is created for a node, as with DAPI.CreateGeneration().
AuditEventCREATERELInteger AuditEventCREATEREL
The auditing event recorded when a release is created for a compound document, as with DAPI.CreateNode() called with a subtype of 138.
AuditEventCREATERENDInteger AuditEventCREATEREND
The auditing event recorded when a rendition is added to a version of a node, as with DAPI.AddRendition() or DAPI.AddRenditionFromStream().
AuditEventCREATEREVInteger AuditEventCREATEREV
The auditing event recorded when a revision is created for a compound document, as with DAPI.CreateNode() with a subtype of 139.
AuditEventDELETEInteger AuditEventDELETE
The auditing event recorded when a node is deleted, as with DAPI.DeleteNode().
AuditEventDELRELInteger AuditEventDELREL
The auditing event recorded when a release of a compound document is deleted, as with DAPI.DeleteNode() with a subtype of 138.
AuditEventDELRENDInteger AuditEventDELREND
The auditing event recorded when a rendition of a version is deleted, as with DAPI.DeleteRendition().
AuditEventDELREVInteger AuditEventDELREV
The auditing event recorded when a revision of a compound document is deleted, as with DAPI.DeleteNode() with a subtype of 139.
AuditEventDELVERSIONInteger AuditEventDELVERSION
The auditing event recorded when a version of a node is deleted, as with DAPI.DeleteVersion().
AuditEventFETCHInteger AuditEventFETCH
The auditing event recorded when a version of a node is fetched, as with DAPI.FetchVersion(), DAPI.FetchVersionToStream(), or DAPI.FetchVersionRangesToStream().
AuditEventLOGINInteger AuditEventLOGIN
The auditing event recorded when a user logs in to the system. This event is not recorded by any DAPI function.
AuditEventLOGOUTInteger AuditEventLOGOUT
The auditing event recorded when a user logs out of the system. This event is not recorded by any DAPI function.
AuditEventMOVEInteger AuditEventMOVE
The auditing event recorded when a node is moved, as with DAPI.MoveNode().
AuditEventPERMCHANGEInteger AuditEventPERMCHANGE
The auditing event recorded when the permissions of a node has changed, as with DAPI.UpdateNode(), DAPI.AddNodeRight(), DAPI.UpdateNodeRight(), or DAPI.DeleteNodeRight().
AuditEventPURGEInteger AuditEventPURGE
The auditing event recorded when versions of a node is purged, as with DAPI.PurgeVersions().
AuditEventRENAMEInteger AuditEventRENAME
The auditing event recorded when a node is renamed, as with DAPI.RenameNode().
AuditEventRESERVEInteger AuditEventRESERVE
The auditing event recorded when a node is reserved, as with DAPI.ReserveNode().
AuditEventUNRESERVEInteger AuditEventUNRESERVE
The auditing event recorded when a node is unreserved, as with DAPI.UnreserveNode().
AuditSectionString AuditSection
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'
BLK_READInteger BLK_READ
A provider callback reason constant which indicates the reading of a block of blob data from the database.
BLK_WRITEInteger BLK_WRITE
A provider callback reason constant which indicates the writing of a block of blob data to the database.
BY_DATAIDInteger BY_DATAID
Specify to operate based on the unique node ID. Used by DAPI.GetNodeByID().
CANCELInteger CANCEL
A return status constant used by the callback to cancel an operation without causing an error.
CB_COPY_VERSIONInteger CB_COPY_VERSION
A DAPI callback reason constant which indicates a version of a node will be copied.
CB_FILTER_NODESInteger CB_FILTER_NODES
A DAPI callback reason constant which indicates one or more nodes are fetched for application node filtering.
CB_DELETE_VERSIONInteger CB_DELETE_VERSION
A DAPI callback reason constant which indicates a version of a node will be deleted.
CB_NEW_VERSIONInteger CB_NEW_VERSION
A DAPI callback reason constant which indicates a new version will be added to a node.
CB_UPDATE_NODE_USERIDInteger CB_UPDATE_NODE_USERID
A DAPI callback reason constant which indicates the owner of a node is updated. This is when the pUserID field is updated by DAPI.UpdateNode().
CLOSEInteger CLOSE
A provider callback reason constant which indicates the closing of a blob after opening for reading or writing.
COPY_A_NODEInteger COPY_A_NODE
A copy option for copying only the specified node without copying its child nodes. Used by DAPI.CopyNode().
COPY_CURRENTVInteger COPY_CURRENTV
A copy option for copying only the current version of all nodes. Used by DAPI.CopyNode() and DAPI.CopyANode().
COPY_DST_CATInteger 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().
COPY_DST_PERMSInteger COPY_DST_PERMS
A copy option indicating that the copied node will have the same permissions as the destination parent node. Used by DAPI.CopyANode().
COPY_DST_USERATTSInteger COPY_DST_USERATTS
A copy option indicating that the copied node will have the same user attributes as the destination parent node. Used by DAPI.CopyANode().
COPY_NODEInteger COPY_NODE
A DAPI callback reason constant indicating encountered nodes will be copied. The callback is issued by DAPI.CopyNode() and DAPI.CopyANode().
COPY_NO_CATInteger COPY_NO_CAT
A copy option indicating that the category and its attributes should not be copied. Used by DAPI.CopyANode().
COPY_NO_USERATTSInteger COPY_NO_USERATTS
A copy option indicating that the user attributes should not be copied. Used by DAPI.CopyANode().
COPY_NO_VERInteger COPY_NO_VER
A copy option indicating that version information will not be copied. Used by DAPI.CopyANode().
COPY_PUBLISHEDVInteger COPY_PUBLISHEDV
A copy option indicating that only the published version will be copied. Used by DAPI.CopyNode().
COPY_SET_CURRUSERInteger COPY_SET_CURRUSER
A copy option which sets the copied node's creator to the current user. Used by DAPI.CopyANode().
COPY_SPECIFICVInteger COPY_SPECIFICV
A copy option for copying a specific version of a node. Used by DAPI.CopyANode().
COPY_SRC_PERMSInteger COPY_SRC_PERMS
A copy option indicating that the copied node will have the same permissions as the source node. Used by DAPI.CopyNode().
COPY_UNLOCKVInteger COPY_UNLOCKV
A copy option indicating that all copied versions will be unlocked. Used by DAPI.CopyANode().
COPY_UNRESERVEInteger COPY_UNRESERVE
A copy option indicating that all copied nodes will be unreserved. Used by DAPI.CopyNode() and DAPI.CopyANode().
DATA_DELETEInteger DATA_DELETE
A permission bit which enables version deletion.
DATA_FETCHInteger DATA_FETCH
A permission bit which enables access to a version's blob data contents.
DATA_READInteger DATA_READ
A permission bit which enables access to version attributes.
DATA_USER1Integer DATA_USER1
A permission bit for custom version permission use.
DATA_USER2Integer DATA_USER2
A permission bit for custom version permission use.
DATA_WRITEInteger DATA_WRITE
A permission bit which enables modification of version attributes.
DELETEInteger DELETE
A provider callback reason constant which indicates the deletion of a blob.
DELETE_NODEInteger DELETE_NODE
A DAPI callback reason constant indicating the encountered node will be deleted. The callback is issued by DAPI.DeleteNode().
DELETE_NO_CHILD_COUNT_UPDATEInteger DELETE_NO_CHILD_COUNT_UPDATE
A delete option for DeleteNode() to skip the child count update.
DapiNodeTypeInteger DapiNodeType
The DapiNode type number.
DapiSessionTypeInteger DapiSessionType
The DapiSession type number.
DapiStreamTypeInteger DapiStreamType
The DapiStream type number.
DapiVersionTypeInteger DapiVersionType
The DapiVersion type number.
ERRORInteger ERROR
A return status constant used by a callback to abort an operation.
FETCHABLEInteger FETCHABLE
A provider callback reason constant which indicates querying whether the blob content is fetchable.
FILE_GETInteger FILE_GET
A provider callback reason constant which indicates the reading of a blob from the database.
FILE_PUTInteger FILE_PUT
A provider callback reason constant which indicates the writing of a blob from the database.
FULL_PERM_MASKInteger FULL_PERM_MASK
An Integer mask which represents full permissions.
GENERATION_NODEInteger GENERATION_NODE
The subtype of a generation node. The value is 2.
LOCK_VERSIONInteger LOCK_VERSION
The default version locked flag. The value is 128.
MOVE_NODEInteger MOVE_NODE
A DAPI callback reason constant which indicates a node was encountered and will be moved. The callback is issued by DAPI.MoveNode().
MOVE_CB_PERM_CONTROLLERInteger MOVE_CB_PERM_CONTROLLER
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 KAPI_MOVE_CB_PERM_CONTROLLER_SUBTREES is also set; or the node's parent, if KAPI_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.
MOVE_CB_PERM_CONTROLLER_SUBTREESInteger MOVE_CB_PERM_CONTROLLER_SUBTREES
Similar to KAPI_MOVE_CB_PERM_CONTROLLER except that it handles subtrees, with their own perm-controlling roots, within the tree of moving nodes. This means that: A) forceInheritPerm is ignored. B) 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. C) Nodes with a perm-controller before the move will also have one after the move. D) The default perm-controller is the perm-controller of the destination if present, or the target itself otherwise (as for this flag with KAPI_MOVE_CB_PERM_CONTROLLER) E) 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).
MOVE_ROOT_NODEInteger MOVE_ROOT_NODE
Internal usage.
MOVE_SUB_NODEInteger MOVE_SUB_NODE
Internal usage.
NODE_ADD_CHILDRENInteger NODE_ADD_CHILDREN
A permission bit which enables the child node addition.
NODE_CONTROLInteger NODE_CONTROL
A permission bit which enables node permission viewing and editing.
NODE_DELETEInteger NODE_DELETE
A permission bit which enables deletion of the node.
NODE_DEL_CHILDRENInteger NODE_DEL_CHILDREN
A permission bit which enables deletion of child nodes for this node.
NODE_MODIFY_ATTRInteger NODE_MODIFY_ATTR
A permission bit which enables category attribute modification.
NODE_NODEInteger NODE_NODE
The default subtype of a node. The value is 0.
NODE_NOT_RESERVEDInteger NODE_NOT_RESERVED
The default node unreserved flag. The value is 0.
NODE_READInteger NODE_READ
A permission bit which enables access to the node's content and attributes.
NODE_READ_EXPLICITInteger NODE_READ_EXPLICIT
A permission bit which enables a user to see the node.
NODE_USER1Integer NODE_USER1
A permission bit for a custom node permissions.
NODE_USER2Integer NODE_USER2
A permission bit for a custom node permissions.
NOTIFY_ACL_ADDInteger NOTIFY_ACL_ADD
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.
NOTIFY_ACL_DELETEInteger NOTIFY_ACL_DELETE
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.
NOTIFY_ACL_UPDATEInteger NOTIFY_ACL_UPDATE
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.
NOTIFY_COPYInteger 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.
NOTIFY_CREATEInteger NOTIFY_CREATE
The change notification constant for the creation of a node. It is used in column NType of the DTreeNotify table. The value is 1.
NOTIFY_CREATE_ROOTInteger NOTIFY_CREATE_ROOT
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.
NOTIFY_DELETEInteger NOTIFY_DELETE
The change notification constant for deleting a node. It is used in column NType of the DTreeNotify table. The value is 4.
NOTIFY_DELETE_VERSIONInteger NOTIFY_DELETE_VERSION
The change notification constant for deleting a node version. It is used in column NType of the DTreeNotify table. The value is 2004.
NOTIFY_MOVEInteger NOTIFY_MOVE
The change notification constant for moving a node. It is used in column NType of the DTreeNotify table. The value is 5.
NOTIFY_RENAMEInteger NOTIFY_RENAME
The change notification constant for renaming a node. It is used in column NType of the DTreeNotify table. The value is 6.
NOTIFY_UPDATEInteger NOTIFY_UPDATE
The change notification constant for the modification of a node. It is used in column NType of the DTreeNotify table. The value is 7.
OKInteger OK
The status constant indicating success. Returned by DAPI functions to indicate that a call was completed successfully. The value is 0.
OPEN_INInteger OPEN_IN
A provider callback reason constant which indicates opening blob data for reading.
OPEN_OUTInteger OPEN_OUT
A provider callback reason constant which indicates the opening of blob data for writing.
PERMTYPE_ACLInteger PERMTYPE_ACL
The permission type enabling ACL permissions. It is used in column ACLType of the DTreeACL table. The value is 0.
PERMTYPE_GROUPInteger PERMTYPE_GROUP
The permission type enabling group permissions. It is used in column ACLType of the DTreeACL table. The value is 2.
PERMTYPE_SYSTEMInteger PERMTYPE_SYSTEM
The permission type enabling system permissions. It is used in column ACLType of the DTreeACL table. The value is 4.
PERMTYPE_USERInteger PERMTYPE_USER
The permission type enabling user permissions. It is used in column ACLType of the DTreeACL table. The value is 1.
PERMTYPE_WORLDInteger PERMTYPE_WORLD
The permission type enabling world permissions. It is used in column ACLType of the DTreeACL table. The value is 3.
PERM_DELETEInteger 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.
PERM_SEEInteger 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.
PERM_SEECONTENTSInteger PERM_SEECONTENTS
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.
PERM_TO_RWDInteger PERM_TO_RWD
A return status constant used by the callback to change a node permissions in a RWD setting in a move operation.
PERM_WRITEInteger 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.
PLATFORM_MACInteger PLATFORM_MAC
The Macintosh platform. This constant is used in the platform attribute of a version.
PLATFORM_MOTIFInteger PLATFORM_MOTIF
The UNIX platform. This constant is used in the platform attribute of a version.
PLATFORM_UNKNOWNInteger PLATFORM_UNKNOWN
An unknown platform. This constant is used in the platform attribute of a version.
PLATFORM_WINDOWSInteger PLATFORM_WINDOWS
The Windows platform. This constant is used in the platform attribute of a version.
RESERVE_NODEInteger RESERVE_NODE
The default node reserved flag. The value is 128.
SEEKInteger SEEK
A provider callback reason constant which indicates the setting of a blob data position.
SKIPInteger SKIP
A return status constant used by the callback to skip a copy of a node in a copy operation without causing an error.
SYSTEM_COLUMNSInteger SYSTEM_COLUMNS
Specify to include the system columns only. Used by DAPI.GetNodeColumnNames() and DAPI.GetVersionColumnNames().
UNUSEDInteger 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.
USER_COLUMNSInteger USER_COLUMNS
Specify to include the user columns only. Used by DAPI.GetNodeColumnNames() and DAPI.GetVersionColumnNames().
VCOPY_ADDVERInteger VCOPY_ADDVER
A version copy option for setting the copied version's creator to the current user. Used by DAPI.CopyVersion().
VCOPY_NO_USERATTSInteger VCOPY_NO_USERATTS
A version copy option indicating that user attributes should not be copied. Used by DAPI.CopyVersion().
VCOPY_RENDITIONSInteger VCOPY_RENDITIONS
A version copy option to copy the renditions with the version.
VCOPY_UNLOCKInteger VCOPY_UNLOCK
A version copy option indicating that the copied version will be unlocked. Used by DAPI.CopyVersion().
VersionNotYetLoadedInteger VersionNotYetLoaded
A return status constant which indicates that the version's blob content has not yet been loaded. Used by $WebDoc.WebDocUtils.NodeToWeb().
VERSION_CREATE_MAJORInteger VERSION_CREATE_MAJOR
A constant to indicate the creation of a major version. A major version will be created if this constant is assigned to the pVerMajor field of a newly allocated DAPIVERSION handler used in DAPI.AddVersion() and DAPI.CopyVersion().
VERSION_GET_CURRENTInteger VERSION_GET_CURRENT
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.
VERSION_GET_CURRENT_MAJORInteger VERSION_GET_CURRENT_MAJOR
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.
VERSION_GET_CURRENT_PUBLISHEDInteger VERSION_GET_CURRENT_PUBLISHED
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.
VERSION_NOT_LOCKEDInteger VERSION_NOT_LOCKED
The default version unlocked flag. The value is 0.
AddAttrToCategory [Note]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.
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. |
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().
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. |
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.
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: DAPI.ATTR_DATE DAPI.ATTR_FCHAR DAPI.ATTR_INT DAPI.ATTR_LCHAR DAPI.ATTR_REAL DAPI.ATTR_VCHAR |
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. |
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.
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. |
Integer AddNodeUserColumn( DAPISESSION sesssion, 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.
session | - | The DAPISESSION object handle. |
columnName | - | The name of the new column. |
columnType | - | The data type of the new column. |
Integer AddProvider( DAPISESSION session, String provider, Boolean logical, Dynamic script, [Dynamic object] )
Adds a custom provider for blob data storage to the current session.
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. |
Integer AddRendition( DAPIVERSION version, DAPIVERSION rendition, String provider, String localFilePath )
Adds a new rendition to the specified version.
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. |
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.
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. |
Integer AddValAsVersion( DAPINODE node, DAPIVERSION version, String provider, Dynamic value )
Adds a value as a version to the specified node.
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. |
Integer AddVersion( DAPINODE node, DAPIVERSION version, String provider, String localFilePath )
Adds a version to the specified node.
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. |
Integer AddVersionFromStream( DAPINODE node, DAPIVERSION version, String provider, Socket aSocket, Assoc versionAttr )
Adds a version to the specified node by retrieving data from the specified Socket object.
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. |
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.
session | - | The DAPISESSION object handle. |
columnName | - | The name of the new column. |
columnType | - | The data type of the new column. |
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.
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. |
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.
session | - | The DAPISESSION object handle. |
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.
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. |
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.
session | - | The DAPISESSION object handle. |
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.
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. |
Integer MoveProviderData( DAPIVERSION version, String providerName )
Changes the data provider storage of the specified version. Does not cause the version or node to be re-indexed. Does not update the modification date of the version or node.
version | - | The DAPIVERSION object handle. |
providerName | - | The name of the provider. |
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().
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. |
options | - | An optional flag for copy options.
This flag can be joined by bitwise OR operators using the following
constants: DAPI.COPY_UNRESERVE DAPI.COPY_CURRENTV DAPI.COPY_UNLOCKV DAPI.COPY_SPECIFICV DAPI.COPY_NO_VER DAPI.COPY_DST_PERMS DAPI.COPY_DST_CAT DAPI.COPY_NO_CAT DAPI.COPY_DST_USERATTS DAPI.COPY_NO_USERATTS DAPI.COPY_SET_CURRUSER |
versionNum | - | The specific version to be copied with the node. Used only if the option DAPI.COPY_SPECIFICV is used in options. |
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.
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. |
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().
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. |
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.
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. |
Integer CopyVersion( DAPIVERSION originalVersion, DAPINODE node, DAPIVERSION newVersion, [Integer options], [String provider] )
Copies a specified version as a new version of the specified node.
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: DAPI.VCOPY_ADDVER DAPI.VCOPY_NO_USERATTR DAPI.VCOPY_UNLOCK |
provider | - | The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string. |
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.
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. |
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.
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 |
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.
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. |
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.
new | - | The newly allocated DAPINODE object handle. This allows node attributes to be pre-assigned to the node. |
Integer DelAttrFromCategory( DAPISESSION session, String category, String attribute )
Deletes an attribute from a category.
This deletes a row from the DCatAttrs table.
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. |
Integer DelCategory( DAPISESSION session, String category, Boolean dropTable )
Deletes a category.
This deletes a row from the DCategories table.
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. |
Integer DelCategoryAttr( DAPISESSION session, String attribute, [Boolean checkUsage] )
Deletes an attributes.
This deletes a row in the DAttributes table.
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. |
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().
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: DAPI.DELETE_NO_CHILD_COUNT_UPDATE |
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.
node | - | The DAPINODE object handle. |
rightID | - | The user or group ID. |
Integer DeleteRendition( DAPIVERSION version, String renditionType )
Deletes the specified rendition of a specified version.
version | - | The DAPIVERSION object handle. |
renditionType | - | The type of the rendition. |
Integer DeleteVersion( DAPIVERSION version )
Deletes the specified version.
version | - | The DAPIVERSION object handle of the version to delete. |
Integer FetchRendition( DAPIVERSION version, String renditionType, String localFilePath )
Copies the specified version rendition contents to a file on the local host.
version | - | The DAPIVERSION object handle. |
renditionType | - | The type of the rendition. |
localFilePath | - | The local file path to which the rendition contents are copied. |
Integer FetchRenditionRangeToStream( DAPIVERSION version, Socket aSocket, String renditionType, List rangeData )
Writes a portion of the version rendition contents to the specified Socket object.
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. |
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.
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. |
Integer FetchRenditionToStream( DAPIVERSION version, Socket aSocket, String renditionType )
Writes the version rendition contents to the specified Socket.
version | - | The DAPIVERSION object handle. |
aSocket | - | The Socket object to which the rendition contents are written. |
renditionType | - | The type of the rendition. |
Integer FetchVersion( DAPIVERSION version, String localFilePath )
Copies the specified version contents to a file on the local host.
version | - | The DAPIVERSION object handle. |
localFilePath | - | The local file path to which the version contents are copied. |
Dynamic FetchVersionAsVal( DAPIVERSION version )
Retrieves the value stored as the version of a node.
version | - | The DAPIVERSION object handle. |
Integer FetchVersionRangeToStream( DAPIVERSION version, Socket aSocket, List rangeData )
Writes a portion of the version contents to the specified Socket.
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. |
Integer FetchVersionRangesToStream( DAPIVERSION version, Socket aSocket, List rangesData, String headerData )
Writes multiple portions of the version contents to the specified Socket object.
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. |
Integer FetchVersionToStream( DAPIVERSION version, Socket aSocket )
Writes the version contents to the specified Socket object.
version | - | The DAPIVERSION object handle. |
aSocket | - | The Socket object to which the version contents are written. |
String GetMultilingualComment( DAPINODE node, String languageCode )
Gets the comment for a DAPINODE in the specified language.
node | - | The DAPINODE object handle. |
languageCode | - | The language code of the desired comment. |
String GetMultilingualName( DAPINODE node, String languageCode )
Gets the name for a DAPINODE in the specified language.
node | - | The DAPINODE object handle. |
languageCode | - | The language code of the desired name. |
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.
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. |
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.
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. |
List GetNodeColumnNames( DAPISESSION session, Integer columnType )
Returns a List of column names in the DTree table.
session | - | The DAPISESSION object handle. |
columnType | - | TRUE if the type of columns whose
names will be returned. DAPI.ALL_COLUMNS DAPI.SYSTEM_COLUMNS DAPI.USER_COLUMNS |
Integer GetNodePermissions( DAPINODE node )
Returns the permissions mask that the current user has on the specified node.
node | - | The DAPINODE object handle. |
Integer GetNodeRight( DAPINODE node, Integer rightID )
Returns a user or group access right for the specified node.
node | - | The DAPINODE object handle. |
rightID | - | The user or group ID. |
RecArray GetNodeRights( DAPINODE node )
Returns all user or group access rights for the specified node.
node | - | The DAPINODE object handle. |
Dynamic GetNodeUserAttr( DAPINODE node, String attrName, [Integer attrType] )
Returns a user attribute value for the specified node.
node | - | The DAPINODE object handle. |
attrName | - | The name of the attribute. |
attrType | - | An integer indicating the attribute
type: DAPI.ATTR_SET_ALL DAPI.ATTR_SET_CAT DAPI.ATTR_SET_SYS The default value is DAPI.ATTR_SET_ALL If it is not specified. |
DAPINODE GetOriginalNode( DAPINODE node )
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.
arg1 | - | The DAPINODE object handle of the possible alias or generation node. |
DAPINODE GetParentNode( DAPINODE node )
Retrieves the parent node of the specified node.
node | - | The DAPINODE object handle. |
DAPIVERSION GetRendition( DAPIVERSION version, String renditionType )
Retrieves a rendition of the specified version.
version | - | The DAPIVERSION object handle. |
renditionType | - | The type of the rendition. |
DAPIVERSION GetVersion( DAPINODE node, Integer versionNum )
Retrieves a specific version of the specified node.
node | - | The DAPINODE object handle. |
versionNum | - | An Integer identifying which version
to retrieve or the following constants: DAPI.VERSION_GET_CURRENT DAPI.VERSION_GET_CURRENT_MAJOR DAPI.VERSION_GET_CURRENT_PUBLISHED |
DAPIVERSION GetVersionByID( Integer versionID, DAPISESSION session )
Retrieves a version based on its unique ID.
versionID | - | An integer indicating the version ID |
session | - | The DAPISESSION object handle. |
DAPIVERSION GetVersionByName( DAPINODE node, String versionName )
Retrieves a version based on the unique version name of a node.
node | - | The DAPINODE object handle. |
versionName | - | The unique name of the version. |
List GetVersionColumnNames( DAPISESSION session, Integer columnType )
Returns a List of column names in the DVersData table.
session | - | The DAPISESSION object handle. |
columnType | - | The type of columns whose
names will be returned, which should be one of the following: DAPI.ALL_COLUMNS DAPI.SYSTEM_COLUMNS DAPI.USER_COLUMNS |
Dynamic GetVersionUserAttr( DAPIVERSION version, String attrName )
Returns a user attribute value for the specified version.
version | - | The DAPIVERSION object handle. |
attrName | - | The name of the attribute. |
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.
node | - | The DAPINODE object handle. |
tree | - | The DAPINODE object handle of the node which may be a parent of node. |
List ListAliasNodes( DAPINODE node, [Integer permissions] )
Returns a List of all aliases of the specified node.
node | - | The DAPINODE object handle. |
permissions | - | The permissions bit mask which is one or more node permission constants joined by bitwise OR operators. |
RecArray ListCategories( DAPISESSION session )
Returns a RecArray containing information about all existing categories.
This retrieves all rows from the DCategories table.
session | - | The DAPISESSION object handle. |
RecArray ListCategoryAttrs( DAPISESSION session, [String category] )
Returns a RecArray containing information about attributes.
This retrieves rows from the DAttributes table.
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. |
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.
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. |
List ListGenerations( DAPINODE node, [Integer permissions] )
Returns a List of all generations of the specified node.
node | - | The DAPINODE object handle. |
permissions | - | The permissions bit mask which is one or more node permission constants joined by bitwise OR operators. |
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.
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. |
List ListGensFromVersion( DAPIVERSION version, [Integer permissions] )
Returns a List of all generations of the specified version.
version | - | The DAPIVERSION object handle. |
permissions | - | The permissions bit mask which is one or more node permission constants joined by bitwise OR operators. |
List ListRenditions( DAPIVERSION version )
Returns a List of all renditions of the specified version.
version | - | The DAPIVERSION object handle. |
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.
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. |
List ListVersions( DAPINODE node )
Returns a List of all versions of the specified node.
node | - | The DAPINODE object handles. |
Integer LockVersion( DAPIVERSION version, Integer lockFlag )
Locks the specified version.
version | - | The DAPIVERSION object handle. |
lockFlag | - | An Integer indicating the type of lock. A standard value to use is DAPI.LOCK_VERSION. |
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().
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. |
Integer NextOrderingPos( DAPINODE node )
Returns the next available ordering position in a compound document.
node | - | The DAPINODE object handle. |
Integer NumAliasNodes( DAPINODE node )
Returns the number of aliases of the specified node.
node | - | The DAPINODE object handle. |
Integer NumGenerations( DAPINODE node )
Returns the number of generations of the specified node.
node | - | The DAPINODE object handle. |
Integer NumGensFromRelease( DAPINODE node, Integer major, Integer minor )
Returns the number of generations of the specified release or revision of a compound document.
node | - | The DAPINODE object handle. |
major | - | the major release number. |
minor | - | the minor release number. |
Integer NumGensFromVersion( DAPIVERSION version )
Returns the number of generations of the specified version.
version | - | The DAPIVERSION object handle. |
Integer NumRenditions( DAPIVERSION version )
Returns the number of rendition types associated with a specified version.
version | - | The DAPIVERSION object handle. |
Integer NumSubNodes( DAPINODE node )
Returns the number of child nodes of the specified node.
Note: this obtains the count by issuing a database query.
node | - | The DAPINODE object handle. |
Integer NumVersions( DAPINODE node )
Returns the number of versions of the specified node.
node | - | The DAPINODE object handle. |
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.
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. |
DAPISTREAM OpenWriteVerStream( DAPINODE node, DAPIVERSION version, Integer dataLength, String provider, [Boolean resourceFork] )
Opens a stream for writing the contents of the specified version.
Important: DAPI.VerStreamClose() must be called after writing.
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. |
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.
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. |
Integer RefreshNode( DAPINODE node )
Forces a retrieval of the most recent node information from the database.
node | - | The DAPINODE object handle. |
Integer RefreshVersion( DAPIVERSION version )
Forces a retrieval of the most recent version information from the database.
version | - | The DAPIVERSION object handle. |
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.
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. |
Integer ReserveNode( DAPINODE node, Integer reserveFlag, [Integer userID] )
Reserves the specified node.
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. |
Integer SetCallback( DAPISESSION session, Dynamic script, [Dynamic object] )
Establishes a callback script for node events.
The events include copying, moving, and deleting nodes.
session | - | The DAPISESSION object handle. |
script | - | The script to run when node events occur. |
object | - | The object containing the script feature. |
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.
session | - | The DAPISESSION object handle. |
provider | - | The name of the provider name. |
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.
node | - | The DAPINODE object handle. |
languageCode | - | The language code for the comment. |
newValue | - | The new comment for the node. |
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.
node | - | The DAPINODE object handle. |
languageCode | - | The language code for the name. |
newValue | - | The new name for the node. |
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.
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: DAPI.ATTR_SET_ALL DAPI.ATTR_SET_CAT DAPI.ATTR_SET_SYS The default value is DAPI.ATTR_SET_ALL if unspecified. |
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.
version | - | The DAPIVERSION object handle. |
attrName | - | The name of the attribute. |
value | - | The value to be assigned to the specified attribute. |
Integer UnlockVersion( DAPIVERSION version )
Unlocks the specified version.
version | - | The DAPIVERSION object handle. |
Integer UnreserveNode( DAPINODE node )
Unreserves the specified node.
node | - | The DAPINODE object handle. |
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.
session | - | The DAPISESSION object handle. |
categoryRec | - | A category record. The columns must compatible with those in the DCategories table. |
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.
session | - | The DAPISESSION object handle. |
attributeRec | - | An attribute record. The columns must compatible with those in the DAttributes table. |
Integer UpdateNode( DAPINODE node )
Updates modified node attributes of the specified node.
node | - | The DAPINODE object handle. |
Integer UpdateNodeRight( DAPINODE node, Integer rightID, Integer permissions )
Updates the user or group access right of the specified node.
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. |
Integer UpdateVersion( DAPIVERSION version )
Updates modified version attributes for the specified version.
Note that the 3 version attributes, pID (VersionID), pNodeID (DocID), and pNumber (Version), are ignored by this function and cannot be updated for data integrity reason.
version | - | The DAPIVERSION object handle. |
Boolean VersionFetchable( DAPIVERSION version )
Determines whether the specified version's blob content has been loaded.
version | - | The DAPIVERSION object handle. |
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.
version | - | The DAPIVERSION object handle. |
stream | - | The DAPISTREAM object handle. |
Integer VerStreamLenGet( DAPISTREAM stream )
Returns the length of an opened version stream.
stream | - | The DAPISTREAM object handle. |
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().
stream | - | The DAPISTREAM object handle. |
dataLen | - | The length of data, in Bytes, to read. |
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().
stream | - | The DAPISTREAM object handle. |
theBytes | - | A Bytes value containing the data to be written to the version. |