com.ibm.mm.sdk.common

Class dkDataObject

  • All Implemented Interfaces:
    dkDataObjectBase, java.io.Serializable
    Direct Known Subclasses:
    DKDDOBase


    public abstract class dkDataObject
    extends dkAbstractDataObjectBase
    Base abstract class for CM8 data objects.

    This class provides the foundation for all CM8 data objects, including documents and folders. It encapsulates common operations such as property access, persistence, and identifier management.

    Data objects in CM8 represent content items stored in the repository. This class bridges the CM8 API with the underlying FileNet P8 implementation, providing a consistent interface for working with both documents and folders.

    See Also:
    DKDDO, dkAbstractDataObjectBase, Serialized Form
    • Constructor Detail

      • dkDataObject

        protected dkDataObject()
        Default constructor for creating an empty data object.
      • dkDataObject

        protected dkDataObject(com.filenet.api.core.Document document,
                               com.filenet.api.core.ObjectStore objectStore)
        Constructs a data object wrapping a FileNet Document.
        Parameters:
        document - the FileNet document to wrap
        objectStore - the object store containing the document
      • dkDataObject

        protected dkDataObject(com.filenet.api.core.Folder folder,
                               com.filenet.api.core.ObjectStore objectStore)
        Constructs a data object wrapping a FileNet Folder.
        Parameters:
        folder - the FileNet folder to wrap
        objectStore - the object store containing the folder
    • Method Detail

      • getProperties

        public com.filenet.api.property.Properties getProperties()
        Returns the properties of the underlying document.

        This method provides access to the FileNet property collection for the document. Returns null if this data object does not wrap a document.

        Returns:
        the document properties, or null if not a document
      • save

        public void save()
        Saves the document to the repository.

        This method persists any changes made to the document properties and refreshes the object to reflect the current state in the repository.

      • getId

        public java.lang.String getId()
        Returns the unique identifier of this data object.

        The ID is retrieved from the underlying document or folder. Returns null if neither document nor folder is set.

        Returns:
        the object ID as a string, or null if not available
      • getPidObject

        public DKPid getPidObject()
        Gets the PID (Persistent Identifier) of this data object.

        The reference to the contained PID is returned and is not a clone. Any changes to the PID object that is returned affect the PID contained within the DDO. This DDO instance remains the owner of the PID object.

        If no PID has been explicitly set via setPidObject(DKPid), this method constructs a PID from the underlying FileNet document or folder using the format: ObjectStore:ClassName:ItemId

        Returns:
        a reference to the PID contained within this DDO, or a newly constructed PID if none was previously set
      • setPidObject

        public void setPidObject(DKPid fromPid)
                          throws DKException
        Sets the PID (Persistent Identifier) for this data object.

        This method creates a copy of the provided PID and stores it in this data object. If the submitted PID is the same reference as the current PID, no action is taken.

        Parameters:
        fromPid - the PID to copy for this DDO. For DB2 Content Manager V8, the PID must be a DKPidICM instance
        Throws:
        DKUsageError - if the submitted PID is null (error ID 303 - DK_CM_MSG_INVPARM)
        DKException - if an error occurs during PID assignment
Copyright © 2024 IBM Corporation

Copyright © 2024 IBM Corporation. All rights reserved.