Package com.documentum.fc.client

# Interface IDfVirtualDocument

public interface IDfVirtualDocument
This class contains the functionality to manage virtual documents.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `ADDED_CHILD`
  Added child.
  `static final int`
  `ASSEMBLY_MODIFIED`
  Assembly modified.
  `static final int`
  `ASSOCIATED_ASSEMBLY`
  Associated assembly with assembly document.
  `static final int`
  `COPY_BEHAVIOR_MODIFIED`
  Copy behavior modified.
  `static final int`
  `DONT_REVERT_ASSEMBLIES`
  Flag value that can be passed to resync to change its default behavior.
  `static final int`
  `FOLLOW_ASSEMBLY_MODIFIED`
  Follow assembly modified.
  `static final int`
  `REMOVED_ASSEMBLY`
  Removed assembly.
  `static final int`
  `REMOVED_CHILD`
  Removed child.
  `static final int`
  `RESYNC_ALL`
  Flag value for resync call to change its default behavior.
  `static final int`
  `RESYNC_ATTRIBUTES_ONLY`
  Flag value that can be passed to resync to change its default behavior.
  `static final int`
  `RESYNC_FLAG_ON_DISCONNECT`
  Flag value for resync call when a session is about to disconnect.
  `static final int`
  `RESYNC_FLAG_ON_REFRESH`
  Flag value that can be passed to resync to change its default behavior.
  `static final int`
  `REVERT_ON_RESYNC`
  Flag value that can be passed to resync to change its default behavior.
  `static final int`
  `USE_NODE_VER_LABEL_MODIFIED`
  Use Node Ver Label modified.
  `static final int`
  `VERSION_LABEL_MODIFIED`
  Version label modified.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addChangeDescription(int code, IDfId objectId, String contextTag, String description)`
  Records a change made to a node.
  `IDfVirtualDocumentNode`
  `addNode(IDfVirtualDocumentNode parentNode, IDfVirtualDocumentNode insertAfterNode, IDfId objectChronId, String binding, boolean followAssembly, boolean overrideLateBindingValue)`
  Adds a new node to the virtual document.
  `IDfVirtualDocumentNode`
  `addNodeToNode(IDfVirtualDocumentNode parentNode, IDfVirtualDocumentNode insertAfterNode, IDfVirtualDocumentNode nodeToAdd)`
  Adds a node to another node in the display.
  `IDfVirtualDocumentNode`
  `find(IDfVirtualDocumentNode startNode, String searchString, String attributeList, int flags)`
  Returns the node corresponding to a specified search string.
  `IDfChangeDescription`
  `getChangeDescription(int index)`
  Returns the change description at a given index position.
  `int`
  `getChangeDescriptionCount()`
  Returns a count of the changes made in all open VDM windows.
  `IDfId`
  `getId()`
  Returns a unique identifier for the current VDM window.
  `boolean`
  `getIncludeBrokenBindings()`
  Indicates whether nodes with broken bindings are included in the display.
  `IDfVirtualDocumentNode`
  `getNodeFromNodeId(IDfId nodeId)`
  Returns the IDfVirtualDocumentNode interface for the node corresponding to a given node ID.
  `IDfVDMNumberingScheme`
  `getNumberingScheme()`
  Returns the numbering scheme for the virtual document.
  `IDfProperties`
  `getProperties()`
  Returns an interface to the DfProperties object owned by this virtual document.
  `IDfVirtualDocumentNode`
  `getRootNode()`
  Returns the node that is the root of the virtual document.
  `IDfId`
  `getUniqueObjectId(int index)`
  Returns the object ID of the object at the specified index.
  `int`
  `getUniqueObjectIdCount()`
  Returns the count of the unique object IDs in the current virtual document.
  `void`
  `removeAllChangeDescriptions(String contextTag)`
  Removes all the changes made in a particular VDM window.
  `void`
  `removeChangeDescription(IDfId objectId)`
  Removes the change or changes made to a node.
  `void`
  `removeNode(IDfVirtualDocumentNode node)`
  Removes a node from the virtual document.
  `void`
  `resetSelectedVersionsFromBinding()`
  Clears temporary object selections and resets all node object selections based on their defined bindings.
  `void`
  `resync(IDfSession session, IDfId objectId, int flags)`
  Flushes all node information and synchronizes cached object attributes with the repository.
  `void`
  `setIncludeBrokenBindings(boolean shouldIncludeBroken)`
  Specifies whether to display nodes with broken bindings using the CURRENT label.
  `void`
  `setNumberingScheme(IDfVDMNumberingScheme scheme)`
  Defines the numbering scheme for the virtual document display.

- ## Field Details

  - ### ADDED_CHILD

    static final int ADDED_CHILD
    Added child. The child is added in an assembly if its parent is in an assembly.
    See Also:
      - Constant Field Values

  - ### REMOVED_CHILD

    static final int REMOVED_CHILD
    Removed child. The child is removed from an an assembly if its parent is in an assembly.
    See Also:
      - Constant Field Values

  - ### COPY_BEHAVIOR_MODIFIED

    static final int COPY_BEHAVIOR_MODIFIED
    Copy behavior modified.
    See Also:
      - Constant Field Values

  - ### USE_NODE_VER_LABEL_MODIFIED

    static final int USE_NODE_VER_LABEL_MODIFIED
    Use Node Ver Label modified.
    See Also:
      - Constant Field Values

  - ### FOLLOW_ASSEMBLY_MODIFIED

    static final int FOLLOW_ASSEMBLY_MODIFIED
    Follow assembly modified.
    See Also:
      - Constant Field Values

  - ### VERSION_LABEL_MODIFIED

    static final int VERSION_LABEL_MODIFIED
    Version label modified.
    See Also:
      - Constant Field Values

  - ### REMOVED_ASSEMBLY

    static final int REMOVED_ASSEMBLY
    Removed assembly.
    See Also:
      - Constant Field Values

  - ### ASSOCIATED_ASSEMBLY

    static final int ASSOCIATED_ASSEMBLY
    Associated assembly with assembly document.
    See Also:
      - Constant Field Values

  - ### ASSEMBLY_MODIFIED

    static final int ASSEMBLY_MODIFIED
    Assembly modified.
    See Also:
      - Constant Field Values

  - ### RESYNC_FLAG_ON_DISCONNECT

    static final int RESYNC_FLAG_ON_DISCONNECT
    Flag value for resync call when a session is about to disconnect. When this flag is passed, the cache is cleared.
    See Also:
      - Constant Field Values

  - ### RESYNC_ALL

    static final int RESYNC_ALL
    Flag value for resync call to change its default behavior. When this flag is passed, all the cache associated cache, that has not changed, is cleared.
    See Also:
      - Constant Field Values

  - ### RESYNC_FLAG_ON_REFRESH

    static final int RESYNC_FLAG_ON_REFRESH
    Flag value that can be passed to resync to change its default behavior. When this flag is passed, any assembly and containment cache, that has not changed, is cleared.
    See Also:
      - Constant Field Values

  - ### REVERT_ON_RESYNC

    static final int REVERT_ON_RESYNC
    Flag value that can be passed to resync to change its default behavior. If the object is checked out, this forces the object to revert to its prior state.
    See Also:
      - Constant Field Values

  - ### DONT_REVERT_ASSEMBLIES

    static final int DONT_REVERT_ASSEMBLIES
    Flag value that can be passed to resync to change its default behavior. When this flag is passed to resync, any assembly cache associated with the object is not cleared from the VDM cache. (The version label and containment caches are still cleared, however.)
    See Also:
      - Constant Field Values

  - ### RESYNC_ATTRIBUTES_ONLY

    static final int RESYNC_ATTRIBUTES_ONLY
    Flag value that can be passed to resync to change its default behavior. When this flag is passed to resync, the attribute cache(in VDM) associated with the object is cleared. The containment and assembly cache are not cleared.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### addNode

    IDfVirtualDocumentNode addNode(IDfVirtualDocumentNode parentNode, IDfVirtualDocumentNode insertAfterNode, IDfId objectChronId, String binding, boolean followAssembly, boolean overrideLateBindingValue) throws DfException
    Adds a new node to the virtual document.

    Each node represents a component in the virtual document. This method adds a new component to the virtual document. To use this method, the node identified in the `parentNode` parameter must be checked out.

    The `followAssembly` and `overrideLateBindingValue` parameters are only useful if the new component is a virtual document. The `followAssembly` parameter sets the follow_assembly attribute of the component's associated containment object. The `overrideLateBindingValue` parameter sets the use_node_ver_label attribute. If the new component is not a virtual document, set these parameters to `false`.

    For more information about the follow_assembly and use_node_ver_label attributes, refer to Server Fundamentals. This manual also contains information about early and late binding for components.

    Parameters:
      `parentNode` - An IDfVirtualDocumentNode object that is the virtual document to which you are adding the component.
      `insertAfterNode` - An IDfVirtualDocumentNode object that is the sibling that will immediately precede the new node in the virtual document's hierarchy. If this parameter is `null`, the new node is placed as the first child of `parentNode`.
      `objectChronId` - An IDfId object that contains the chronicle ID of the component being added.
      `binding` - To early bind the component, specify the version label of the version you want to bind to the virtual document. To late bind the component to the virtual document, specify `null`.
      `followAssembly` - Set this to `true` if you want to set the follow_assembly attribute to true for the component. Otherwise, set this parameter to `false`.
      `overrideLateBindingValue` - Set this to `true` to use the version label identified in `binding` to resolve late-bound descendents of this component.
    Returns:
      An IDfVirtualDocumentNode object for the newly created node
    Throws:
      `DfException` - if the server returns an error

  - ### removeNode

    void removeNode(IDfVirtualDocumentNode node) throws DfException
    Removes a node from the virtual document.

    Each node represents a component in the virtual document. This method removes the component from the virtual document. The underlying selected object isn't removed from the repository.

    To use this method, the virtual document that is the direct parent of the node must be checked out.

    Parameters:
      `node` - An IDfVirtualDocumentNode object for the node to be removed
    Throws:
      `DfException` - if the server returns an error

  - ### getRootNode

    IDfVirtualDocumentNode getRootNode() throws DfException
    Returns the node that is the root of the virtual document.

    The root node is the virtual document at the top of a virtual document tree displayed by the Virtual Document Manager.
    Returns:
      An IDfVirtualDocumentNode object for the root node
    Throws:
      `DfException` - if the server returns an error

  - ### getNodeFromNodeId

    IDfVirtualDocumentNode getNodeFromNodeId(IDfId nodeId) throws DfException
    Returns the IDfVirtualDocumentNode interface for the node corresponding to a given node ID.

    Each node in a virtual document tree displayed in a VDM window has a node ID. The ID is unique across all open VDM windows.
    Parameters:
      `nodeId` - An IDfId object that contains the node ID
    Returns:
      An IDfVirtualDocumentNode object for the node matching the specified node ID.
    Throws:
      `DfException` - if a node matching the specified ID cannot be found
    See Also:
      - `getId()`

  - ### setIncludeBrokenBindings

    void setIncludeBrokenBindings(boolean shouldIncludeBroken) throws DfException
    Specifies whether to display nodes with broken bindings using the CURRENT label.

    Broken bindings occur when some user action asks the VDM to display a version of the node that doesn't exist. VDM can display such nodes using the CURRENT version of the node. To require this behavior, execute this method and pass `shouldIncludeBroken` as `true`.

    If the `setIncludeBrokenBindings` flag is set to `false`, nodes with broken bindings are not displayed.

    Parameters:
      `shouldIncludeBroken` - Set this to `true` if you want the server to attempt to resolve broken bindings using the CURRENT label. Set this to `false` to omit nodes with broken bindings.
    Throws:
      `DfException` - if the server returns an error

  - ### getIncludeBrokenBindings

    boolean getIncludeBrokenBindings() throws DfException
    Indicates whether nodes with broken bindings are included in the display.

    Broken bindings occur when some user action asks the VDM to display a version of the node that doesn't exist. If the `setIncludeBrokenBindings(boolean)` flag is set to `true`, VDM displays nodes with broken bindings using the CURRENT version of the node.

    Returns:
      `true` if nodes with broken bindings are being resolved using the CURRENT label; `false` if broken nodes are being omitted
    Throws:
      `DfException` - if the server returns an error

  - ### resetSelectedVersionsFromBinding

    void resetSelectedVersionsFromBinding() throws DfException
    Clears temporary object selections and resets all node object selections based on their defined bindings.

    Use this method to clear any node changes made through `IDfVirtualDocumentNode.setSelectedVersion(java.lang.String)`. The temporary node selections are cleared and the nodes are reset based on their defined bindings.

    Throws:
      `DfException` - if the server returns an error

  - ### resync

    void resync(IDfSession session, IDfId objectId, int flags) throws DfException
    Flushes all node information and synchronizes cached object attributes with the repository.

    Calling `resync` for a node throws away all children of the node. After a `resync`, node IDs issued for the node and its children prior to the call are no longer valid. You must re-execute `IDfVirtualDocumentNode.getId()` to obtain new node IDs for the children.

    Parameters:
      `session` - An IDfSession object for the current session
      `objectId` - An IdfId object containing the object ID of the node you want to resynchronize.
      `flags` - Optional flags that can be passed to change the default behavior of resync. You should pass `0` to get the default behavior. By default, if the object is checked out, calling resync does not clear the VDM cache. This behavior can be altered by passing either `REVERT_ON_RESYNC` or `DONT_REVERT_ASSEMBLIES` as the flag value.
    Throws:
      `DfException` - if the server returns an error
    See Also:
      - `REVERT_ON_RESYNC`
      - `DONT_REVERT_ASSEMBLIES`

  - ### getId

    IDfId getId()
    Returns a unique identifier for the current VDM window.

    Each open VDM window is assigned a unique identifier.
    Returns:
      An IDfId object that contains the identifier for the current window.

  - ### getUniqueObjectIdCount

    int getUniqueObjectIdCount() throws DfException
    Returns the count of the unique object IDs in the current virtual document.

    Each node in a virtual document represents a repository object. However, any given repository object can appear in more than one node. This method returns a count of the number of different objects represented by the nodes in the virtual document. Repository objects represented by more than one node are only counted once by this method.

    Returns:
      A count of the unique object IDs in the current virtual document
    Throws:
      `DfException` - if the server returns an error

  - ### getUniqueObjectId

    IDfId getUniqueObjectId(int index) throws DfException
    Returns the object ID of the object at the specified index.

    When you execute `getUniqueObjectIdCount()`, the method returns the number of unique object IDs in the virtual document. It also stores the object IDs in an internal structure. By providing the index into that structure as a parameter in `getUniqueObjectId`, you can obtain the object ID for that object. Index values begin at 0.

    For example:

         int count=virtualDocument.getUniqueObjectIdCount();
         for(int index=0; index < count; i++)
         {
              IDfId id = virtualDocument.getUniqueObjectId(index);
              // use ID...
         }

    Parameters:
      `index` - The index value that identifies the object whose ID you want to obtain
    Returns:
      An IDfId object that contains the object ID
    Throws:
      `DfException` - if the server returns an error

  - ### addChangeDescription

    void addChangeDescription(int code, IDfId objectId, String contextTag, String description) throws DfException
    Records a change made to a node.

    Certain key changes to the virtual document tree, such as adding or removing a node or changing a node's binding, are recorded in IDfChangeDescription objects. Each IDfChangeDescription object represents one change.

    Parameters:
      `code` - Set this to the change description code corresponding to the change description string.
      `objectId` - An IDfId object that contains the object ID of the object affected by the change. (Each node represents a repository object that is a component of the virtual document.)
      `contextTag` - Set this to the virtual document tree identifier
      `description` - The text description of the change
    Throws:
      `DfException` - if the server returns an error

  - ### removeChangeDescription

    void removeChangeDescription(IDfId objectId) throws DfException
    Removes the change or changes made to a node.

    This method removes all the change description records that affect a given node, or object, in the virtual document tree.

    Parameters:
      `objectId` - An IDfId object for the object whose changes you want to remove
    Throws:
      `DfException` - if the server returns an error

  - ### removeAllChangeDescriptions

    void removeAllChangeDescriptions(String contextTag) throws DfException
    Removes all the changes made in a particular VDM window.

    If the `contextTag` parameter is specified as an empty string, the method removes all the changes made for all open VDM windows.

    Parameters:
      `contextTag` - Identifies the VDM window. If this is an empty string, all the changes are removed for all open VDM windows.
    Throws:
      `DfException` - if the server returns an error

  - ### getChangeDescriptionCount

    int getChangeDescriptionCount() throws DfException
    Returns a count of the changes made in all open VDM windows.

    Returns:
      The count of the changes
    Throws:
      `DfException` - if the server returns an error

  - ### getChangeDescription

    IDfChangeDescription getChangeDescription(int index) throws DfException
    Returns the change description at a given index position.

    The value for the `index` parameter for this method is derived from the count returned by `getChangeDescriptionCount()`. Index positions begin at 0 and increment by 1 up to the total count returned by `getChangeDescriptionCount`.

    Parameters:
      `index` - Identifies the index position of the change description
    Returns:
      An IDfChangeDescription object that contains the change description
    Throws:
      `DfException` - if the server returns an error

  - ### setNumberingScheme

    void setNumberingScheme(IDfVDMNumberingScheme scheme) throws DfException
    Defines the numbering scheme for the virtual document display.

    Parameters:
      `scheme` - An IDfVDMNumberingScheme object for the desired numbering scheme
    Throws:
      `DfException` - if the server returns an error

  - ### find

    IDfVirtualDocumentNode find(IDfVirtualDocumentNode startNode, String searchString, String attributeList, int flags) throws DfException
    Returns the node corresponding to a specified search string.

    This method searches the values in a specified list of attributes for the specified search string. The search begins at the node identified in `startNode`. The attributes to be searched are specified in `attributeList`. The search string is defined in `searchString`.

    Parameters:
      `startNode` - An IDfVirtualDocument object representing the node at which the search is started
      `searchString` - Identifies the string for which you are searching
      `attributeList` - Set this to a comma-separated list of attributes on which to conduct the search
      `flags` - Defines the settings for find. Pass 0 to obtain the default settings. The default settings are that the search is case insensitive and is performed on the attributes in the order in which they are listed in `attributeList`. To obtain non-default settings, you must customize the implementation of this method.
    Returns:
      An IDfVirtualDocumentNode object corresponding to the search string
    Throws:
      `DfException` - if the server returns an error

  - ### getNumberingScheme

    IDfVDMNumberingScheme getNumberingScheme() throws DfException
    Returns the numbering scheme for the virtual document.

    Returns:
      An IDfVDMNumberingScheme object corresponding to the numbering scheme
    Throws:
      `DfException` - if the server returns an error

  - ### addNodeToNode

    IDfVirtualDocumentNode addNodeToNode(IDfVirtualDocumentNode parentNode, IDfVirtualDocumentNode insertAfterNode, IDfVirtualDocumentNode nodeToAdd) throws DfException
    Adds a node to another node in the display.

    This method is only valid if the node being added and the target node are virtual documents.

    Parameters:
      `parentNode` - An IDfVirtualDocumentNode object identifying the node to which you are adding the new node
      `insertAfterNode` - An IDfVirtualDocumentNode object identifying the node that will immediately precede the new node in the display
      `nodeToAdd` - An IDfVirtualDocumentNode object identifying the node you are adding
    Returns:
      An IDfVirtualDocumentNode object for the new node
    Throws:
      `DfException` - if the server returns an error

  - ### getProperties

    IDfProperties getProperties()
    Returns an interface to the DfProperties object owned by this virtual document. This may be used to set and get application-specific properties on this object.
    Returns:
      An IDfProperties object associated with this virtual document.