com.ibm.mm.sdk.common
Class DKDDO
- java.lang.Object
-
- com.ibm.mm.sdk.common.dkAbstractDataObjectBase
-
- com.ibm.mm.sdk.common.dkDataObject
-
- com.ibm.mm.sdk.common.DKDDOBase
-
- com.ibm.mm.sdk.common.DKDDO
-
- All Implemented Interfaces:
- dkDataObjectBase, java.io.Serializable
- Direct Known Subclasses:
- dkResource
public class DKDDO extends DKDDOBase
CM8 DKDDO (Document Data Object) - Mimics IBM CM8 Document Object.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.ibm.mm.sdk.common.DKDDOBase
datastore, propertyIdMap, propertyNameToIdMap
-
Fields inherited from class com.ibm.mm.sdk.common.dkAbstractDataObjectBase
contentElementList, contentTransfer, document, folder, objectStore, pid, semanticType
-
-
Constructor Summary
Constructors Constructor and Description DKDDO()DKDDO(DKDatastoreICM datastore)DKDDO(com.filenet.api.core.Document document, DKDatastoreICM dkDatastoreICM)DKDDO(com.filenet.api.core.Document document, DKDatastoreICM dkDatastoreICM, java.lang.String semanticType)DKDDO(com.filenet.api.core.Folder folder, DKDatastoreICM dkDatastoreICM)DKDDO(com.filenet.api.core.Folder folder, DKDatastoreICM dkDatastoreICM, java.lang.String semanticType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd()voidaddElement(DKDDO ddoDocument)Add a document DKDDO as an element to this folder DKDDO.voiddel()voiddel(DKNVPair[] options)voiddel(int option)dkDatastoregetDatastore()com.filenet.api.core.DocumentgetDocument()Public accessor for the document field.com.filenet.api.core.FoldergetFolder()Public accessor for the folder field.voidremoveMember(DKDDO ddoDocument)voidretrieve()Retrieve (refresh) the document or folder from the object store.voidretrieve(DKNVPair[] options)Retrieve (refresh) the document from the object store with options.voidretrieve(int option)Retrieve (refresh) the document from the object store with options.java.lang.StringtoString()voidtoXML(DKNVPair options, java.lang.String basePath, int flags)Export this DKDDO to XML format based on the object type (Document or Folder).voidupdate()Update (save) the document or folder to the object store.voidupdate(DKNVPair[] options)Update (save) the document to the object store with options.voidupdate(int option)Update (save) the document to the object store with options.-
Methods inherited from class com.ibm.mm.sdk.common.DKDDOBase
dataCount, dataId, dataId, dataIdsByNameSpace, dataPropertyCount, dataPropertyId, getData, getDataByName, getDataByName, getDataName, getDataProperty, getDataPropertyByName, getDataPropertyByName, getDataPropertyByName, getDataPropertyName, getObjectType, getProperty, getProperty, getPropertyByName, getPropertyName, isDataPropertySet, isDataSet, isNull, isPropertySet, propertyCount, setData, setProperty, setProperty, setPropertyObject
-
Methods inherited from class com.ibm.mm.sdk.common.dkDataObject
getId, getPidObject, getProperties, save, setPidObject
-
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractDataObjectBase
getContentElementList, getNativeObject, getObject, getSemanticType, setContentElementList, setDocument, setObject, setSemanticType
-
-
-
-
Constructor Detail
-
DKDDO
public DKDDO()
-
DKDDO
public DKDDO(com.filenet.api.core.Document document, DKDatastoreICM dkDatastoreICM)
-
DKDDO
public DKDDO(com.filenet.api.core.Document document, DKDatastoreICM dkDatastoreICM, java.lang.String semanticType)
-
DKDDO
public DKDDO(com.filenet.api.core.Folder folder, DKDatastoreICM dkDatastoreICM)
-
DKDDO
public DKDDO(com.filenet.api.core.Folder folder, DKDatastoreICM dkDatastoreICM, java.lang.String semanticType)
-
DKDDO
public DKDDO(DKDatastoreICM datastore)
-
-
Method Detail
-
getDatastore
public dkDatastore getDatastore()
-
getFolder
public com.filenet.api.core.Folder getFolder()
Description copied from class:dkAbstractDataObjectBasePublic accessor for the folder field.- Overrides:
getFolderin classdkAbstractDataObjectBase- Returns:
- The FileNet Folder object
-
getDocument
public com.filenet.api.core.Document getDocument()
Description copied from class:dkAbstractDataObjectBasePublic accessor for the document field.- Overrides:
getDocumentin classdkAbstractDataObjectBase- Returns:
- The FileNet Document object
-
add
public void add() throws DKException, java.lang.Exception- Throws:
DKExceptionjava.lang.Exception
-
retrieve
public void retrieve(int option) throws DKException, java.lang.ExceptionRetrieve (refresh) the document from the object store with options. This overloaded method accepts an integer option parameter but ignores it, internally calling the parameterless retrieve() method.- Parameters:
option- retrieve option (ignored in this implementation)- Throws:
DKException- if the document cannot be retrievedjava.lang.Exception- if an unexpected error occurs
-
retrieve
public void retrieve(DKNVPair[] options) throws DKException, java.lang.Exception
Retrieve (refresh) the document from the object store with options. This overloaded method accepts an array of DKNVPair options but ignores them, internally calling the parameterless retrieve() method.- Parameters:
options- retrieve options (ignored in this implementation)- Throws:
DKException- if the document cannot be retrievedjava.lang.Exception- if an unexpected error occurs
-
retrieve
public void retrieve() throws DKExceptionRetrieve (refresh) the document or folder from the object store. This method fetches the latest version of the object from FileNet P8, refreshing all properties to their current values in the repository. Supports both documents (DK_CM_DOCUMENT) and folders (DK_CM_FOLDER).- Throws:
DKException- if the object cannot be retrieved due to validation errors, FileNet API errors, or unexpected runtime errors
-
update
public void update(int option) throws DKException, java.lang.ExceptionUpdate (save) the document to the object store with options. This overloaded method accepts an integer option parameter but ignores it, internally calling the parameterless update() method.- Parameters:
option- update option (ignored in this implementation)- Throws:
DKException- if the document cannot be updatedjava.lang.Exception- if an unexpected error occurs
-
update
public void update(DKNVPair[] options) throws DKException, java.lang.Exception
Update (save) the document to the object store with options. This overloaded method accepts an array of DKNVPair options but ignores them, internally calling the parameterless update() method.- Parameters:
options- update options (ignored in this implementation)- Throws:
DKException- if the document cannot be updatedjava.lang.Exception- if an unexpected error occurs
-
update
public void update() throws DKExceptionUpdate (save) the document or folder to the object store. This method persists any property changes made to the object back to FileNet P8, saving all modified properties and refreshing the object to reflect the current state. Supports both documents (DK_CM_DOCUMENT) and folders (DK_CM_FOLDER).- Throws:
DKException- if the object cannot be updated due to validation errors, FileNet API errors, or unexpected runtime errors
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
addElement
public void addElement(DKDDO ddoDocument) throws DKUsageError
Add a document DKDDO as an element to this folder DKDDO. This method files the document into the folder using the FileNet P8 API.- Parameters:
ddoDocument- The document DKDDO to add to this folder- Throws:
DKUsageError- if validation fails or filing operation fails
-
removeMember
public void removeMember(DKDDO ddoDocument) throws DKUsageError
- Throws:
DKUsageError
-
del
public void del(int option) throws DKException, java.lang.Exception- Throws:
DKExceptionjava.lang.Exception
-
del
public void del(DKNVPair[] options) throws DKException, java.lang.Exception
- Throws:
DKExceptionjava.lang.Exception
-
del
public void del() throws DKException, java.lang.Exception- Throws:
DKExceptionjava.lang.Exception
-
toXML
public void toXML(DKNVPair options, java.lang.String basePath, int flags) throws DKException, java.lang.Exception
Export this DKDDO to XML format based on the object type (Document or Folder). This method generates FileNet P8-style XML with complete metadata including: - Object Store information - Class name and object ID - Filing information (for documents) - Version information (for documents) - System properties - Custom/business properties - Content metadata (for documents) - Folder identity and path (for folders) The XML format is designed to be compatible with FileNet P8 import/export operations. The actual XML generation is delegated to the FileNet layer (CM8ToFileNetAdapter to FileNetP8Client) to maintain proper separation of concerns.- Parameters:
options- DKNVPair containing export options (currently unused but required for CM8 compatibility)basePath- The file path where the XML should be writtenflags- Export flags (currently unused but required for CM8 compatibility)- Throws:
DKException- if the export fails due to validation errors or I/O issuesjava.lang.Exception- if an unexpected error occurs during XML generation
-
-