Purpose:
The DKLobICM class represents an abstraction for a generic resource object in IBM Content Manager. A resource object consists of content stored in a resource manager and the meta-data describing the content stored in the library server component of Content Manager. A resource has state and behavior. The state of a resource is described by its meta-data; that is, its attributes and their values as well as its data or content. The behavior is implemented by this class, and its more specialized subclasses. Resources are defined as a collection of "instances of user defined types" called "resource item types".
Essentially, resources represent files in a file system, data objects in HSM servers, video clips in a video server, and BLOBs in RDBMS tables. At runtime, instances of DKLobICM or its subclasses are used to access the physical data they point to. Content Manager resources are typed, which means that they are designed to hold media-specific state and provide media-specific behavior. In a Content Manager system, the library server and its associated resource managers share a schema to store the state of the managed resources.
The base resource types provided by a Content Manager system are: the generic large object or LOB, text, an image, and a stream resource class. This class can be instantiated to hold both the meta-data and the content of data objects. Within the Content Manager framework, the resource types are represented by the classes: DKLobICM and its subclasses DKTextICM, DKImageICM, DKStreamICM, and DKVideoStreamICM. If necessary they can be sub-classed and further specialized by Content Manager applications. The rich media content of a resource can be stored in and retrieved from a Content Manager resource manager. For this purpose a set of resource services and functions are made available.
The behavior of a resource is implemented through the methods of the DKLobICM class and its derived sub classes. They constitute the resource services. The resource services in Content Manager represent the end-to-end support for content access and delivery. The core role of these methods include, among others, the basic CRUD (Create (Add), Retrieve, Update, and Delete) methods. They are meant to support content access and delivery using the push, pull and stream models over commonly used data transport protocols like HTTP, FTP, and file system. The major goal of the resource framework is to provide transactional content access and distribution functions in order to ensure referential integrity between the meta-data and the data of resources.
The actual content of a resource is persistently stored in a Content Manager resource manager. At runtime, a copy is stored within a DKLobICM instance in a byte buffer. It is the responsibility of the application to synchronize the in-memory content with the content stored on a resource manager.
See Also: dkResource, DKTextICM, DKStreamICM, DKVideoStreamICM
Hierarchy:
DKDDO / dkXDO dkResource DKLobICM
Since: Version 8
Class summary:
class DKEXPORT DKLobICM : public dkResource { public: DKLobICM(); DKLobICM(DKDatastoreICM* ds); DKLobICM(DKDatastoreICM* ds, DKByteArray *pByteArray); DKLobICM(const DKLobICM& aDKLobICM); ~DKLobICM(); DKEXPORT DKString getOpenHandler(); DKEXPORT DKString getMimeType(); DKEXPORT DKString getResourceName(); DKEXPORT DKString getOrgFileName(); DKEXPORT DKString getContentURL(int option,int offset,int len); DKEXPORT DKString getContentURL(int operation, int option,int offset,int len); DKEXPORT DKString getRMName(); DKEXPORT DKString getSMSCollName(); DKEXPORT DKByteArray* getContent(); DKEXPORT DKBoolean isContentChanged()const; DKEXPORT DKBoolean isSet()const; DKEXPORT DKBoolean isNull()const; DKEXPORT DKBoolean compareData(dkXDO *adkXDO); DKEXPORT DKBoolean isOpenSynchronous(); DKEXPORT DKBoolean getNewVersion(); DKEXPORT DKBoolean isChangeSMSRequested(); DKEXPORT DKBoolean operator==(DKLobICM &Lob1); DKEXPORT void setSMSCollName(DKString smsCollName); DKEXPORT void changeSMSInfo(DKString tCollection); DKEXPORT void setContentChanged(bool aFlag); DKEXPORT void setNull(); DKEXPORT void open(); DKEXPORT void open(DKString afileName); DKEXPORT void add(int option,DKRMSMSPairDefICM *rmsmspairs); DKEXPORT void update(int option,DKRMSMSPairDefICM *rmsmspairs); DKEXPORT void addExtension(const char *extensionName,dkExtension *extensionObj); DKEXPORT void removeExtension(const char *extensionName); DKEXPORT void setMimeType(DKString mType); DKEXPORT void setOption(int option, DKAny value); DKEXPORT void changeStorage(); DKEXPORT void setResourceName (DKString name); DKEXPORT void setDatastore(DKDatastoreICM *ds); DKEXPORT void setOrgFileName(DKString of); DKEXPORT void setInstanceOpenHandler(DKString ahandler,bool newSynchronousFlag); DKEXPORT void setClassOpenHandler(DKString ahandler,bool newSynchronousFlag); DKEXPORT void update(int option); DKEXPORT void querySMSInfo(); DKEXPORT void catalogContent(DKString fileName , DKString rmScopeFilePath); DKEXPORT void setNewVersion(DKBoolean bNewVersion); DKEXPORT void setPartNumber(int partNum); DKEXPORT void setSemanticType(long lSemanticType); DKEXPORT void setDatastore(dkDatastore *ds); DKEXPORT void add(DKThirdPartyServerDef *pServerDef,int iOption); DKEXPORT void update(DKThirdPartyServerDef *pServerDef,int iOption); DKEXPORT void setUpdateLocationOption(DKString dksLocation); DKEXPORT void setUpdateLocation(DKNVPair *pOptions,long lOptionCount); DKEXPORT void setAddLocationOption(DKString dksLocation); DKEXPORT void setAddLocation(DKNVPair *pOptions,long lOptionCount); DKEXPORT void retrieve(DKString dksFileName,DKNVPair *pOptions,long lOptionCount); DKEXPORT void retrieve(DKThirdPartyServerDef *pServerDef,int iOption); DKEXPORT void retrieve(DKThirdPartyServerDef *pServerDef,DKNVPair *pOptions,long lOptionCount); DKEXPORT void retrieve(DKNVPair *pOptions,long lOptionCount,DKString dksFileName,long lOffset, long lLen); DKEXPORT void retrieve(DKNVPair *pOptions,long lOptionCount,long lOffset, long lLen); DKEXPORT void setChangeSMSRequested(DKBoolean dkbIsRequested); DKEXPORT dkDataObjectBase& copyData(const dkXDO &adkXDO); DKEXPORT dkDataObjectBase& setContent(const DKString& astring); DKEXPORT dkDataObjectBase& setContent(char *pData,longlong llLength); DKEXPORT dkDataObjectBase& setContent(DKByteArray *pByteArray); DKEXPORT dkDataObjectBase& getContentToClientFile(const char *afileName,int fileOption)const; DKEXPORT dkDataObjectBase& setContentFromClientFile(const char *afileName); DKEXPORT dkDataObjectBase& add(); DKEXPORT dkDataObjectBase& add(int iOption); DKEXPORT dkDataObjectBase& add(DKString aFullFileName); DKEXPORT dkDataObjectBase& add(DKString aFullFileName,int iOption); DKEXPORT dkDataObjectBase& add(istream *is,long length); DKEXPORT dkDataObjectBase& retrieve(int option, long offset, long len ); DKEXPORT dkDataObjectBase& retrieve(int metaOption, int contentOption,long offset, long len ); DKEXPORT dkDataObjectBase& retrieve(int option); DKEXPORT dkDataObjectBase& retrieve(); DKEXPORT dkDataObjectBase& retrieve(int option,DKString fileName,int offset , int length); DKEXPORT dkDataObjectBase& retrieve(const char* fileName); DKEXPORT dkDataObjectBase& retrieve(DKNVPair *parms); DKEXPORT dkDataObjectBase& update(); DKEXPORT dkDataObjectBase& update(DKString aFullFileName ); DKEXPORT dkDataObjectBase& update(istream *is,long length); DKEXPORT dkDataObjectBase& del(); DKEXPORT dkDataObjectBase& del(DKBoolean flush); DKEXPORT long size(); DKEXPORT long length() const; DKEXPORT longlong lengthInMemory(); DKEXPORT longlong sizeInDatastore(); DKEXPORT int getPartNumber(); DKEXPORT long getSemanticType(); DKEXPORT const dkExtension* getExtension(const char *extensionName); DKEXPORT virtual dkXDO* cloneSkeleton(); DKEXPORT strstream* getInputStream(int option,int offset, int length); DKEXPORT strstream* openStream(); DKEXPORT DKAny getOption(int option); DKEXPORT DKReplicaInfoICM* getReplicaInfo(); DKEXPORT DKNVPair* getUpdateLocation(long &lArraySize); DKEXPORT DKNVPair* getAddLocation(long &lArraySize); DKEXPORT DKString* getContentURLs(int operation, int option,int offset,int len,long & arraySize); DKEXPORT DKString* getContentURLs(int option,int offset,int len,long & arraySize); DKEXPORT DKBoolean getAsyncStatus(); public: // Deprecated methods dkDataObjectBase& addFrom(); dkDataObjectBase& addFrom(DKString hostname, DKString userid, DKString passwd, DKString protocol, int port, DKString filename); dkDataObjectBase& addFromAsync(DKString hostname, DKString userid, DKString passwd, DKString protocol, int port, DKString filename); dkDataObjectBase& addFromAsync(); double getInputContentlength(); DKString getInputFilename(); DKString getInputFilelist(); DKString getInputFilepath(); DKString getInputRclist(); DKString getInputProtocol(); DKBoolean loadDataFromFile(DKString afileName); void setAffiliatedType(int aflType); void setInputUpdateDate(DKString Update); void setReferencedTimestamp(DKString ts); DKString getCreatedTimestamp(); DKString getReferencedTimestamp(); DKString getUpdatedTimestamp(); int getInputRetention(); DKString getThirdPartyHostname(); DKString getThirdPartyUserid(); DKString getThirdPartyPasswd(); int getThirdPartyPort(); DKString getUpdateDate(); void retrieveTo(); void retrieveToAsync(); void setInputContentlength(int Clength); void setInputContentlength(double dLength); void setInputFilename(DKString Filename); void setInputFilelist(DKString Filelist); void setInputFilepath(DKString Filepath); void setInputProtocol(DKString Protocol); void setInputRclist(DKString rclist); void setInputRetention(int Retention); void setThirdPartyHostname(DKString Hostname); void setThirdPartyPassword(DKString Passwd); void setThirdPartyPort(int Port); void setThirdPartyUserid(DKString Userid); void updateFrom(); void updateFrom(int Option); void updateFrom(DKString hostname, DKString userid, DKString passwd, DKString protocol, int port, DKString filename); void updateFrom(DKString hostname, DKString userid, DKString passwd, DKString protocol, int port, DKString filename, int Option); void updateFromAsync( DKString hostname, DKString userid, DKString passwd, DKString protocol, int port, DKString filename); void updateFromAsync( DKString hostname, DKString userid, DKString passwd, DKString protocol, int port, DKString filename, int Option); void updateFromAsync(); void updateFromAsync(int Option); void set3rdPartyIngest(DKBoolean ingest); void setInputNewVersionFlag(int verflag); void setAsync(DKBoolean dkbIsAsync); unsigned long getAffiliatedType(); };
Members:
Parameters: None.
Returns: Program name of the handler as a string variable.
DKString getOpenHandler();
Parameters: None.
Returns: MIME type for this resource as a string variable.
DKString getMimeType();
Parameters: None.
Returns: External object name for this resource as a string variable. An external object name is a string identifier assigned as the external name for this object.
DKString getResourceName();
Parameters: None.
Returns: Original file name from which the contents for this resource were loaded.
DKString getOrgFileName();
Parameters: option - valid option to retrieve the meta-data.Valid option values are:
offset - The byte offset into the resource len - the number of bytes from the offset. To retrieve the entire object using this URL, set the offset to -1 and len to -1.
Returns: The URL address that will be used to retrieve the content associated with this resource object.
DKString getContentURL(int option,int offset,int len);
Parameters: operation - specifies the operation to perform. Valid operations can be :
DK_CM_RETRIEVE - Retrieve the content directly from the resource manager.
DK_CM_STORE - Store the content directly to the resource manager.
DK_CM_UPDATE - Update the content directly on to the resource manager.
option - Options for the operation to be performed. Valid values are:
DK_CM_RETRIEVE option can be: DK_CM_VERSION_LATEST - Retrieve the latest version of this item.
DK_CM_CHECKOUT - Perform a checkout of the item from the library server. An option of -1 is the same as DK_CM_CHECKOUT.
DK_CM_STORE options can be: DK_CM_CHECKOUT - Perform a checkout of the item from the library server.
DK_CM_CHECKIN - Perform a checkin of the item in the library server. After the store is complete. An option of -1 is the same as DK_CM_CHECKIN.
DK_CM_UPDATE options can be: DK_CM_CHECKOUT -Pperform a checkout of the item from the Library Server.
DK_CM_CHECKIN - perform a checkin of the item in the Library Server after the update is complete. An option of -1 is the same as DK_CM_CHECKIN.
offset - The byte offset in the resource. len - the number of bytes from the offset. To retrieve or update entire object set offset to -1 and len to -1.
Returns: Retrieves the URL address to be used for retrieving the content directly from the resource manager.
DKString getContentURL(int operation,int option,int offset,int len);
Parameters: None.
Returns: Name of the resource manager as a string variable.
DKString getRMName();
Parameters: None.
Returns: Name of the SMS collection used to store this object's content as a string variable.
DKString getSMSCollName();
Parameters: None.
Returns: Pointer to the DKByteArray which holds the content.
Memory Management: Do not delete this object, it is a pointer to the resource content.
DKByteArray* getContent();
Parameters: None.
Returns: TRUE if the content has changed, FALSE otherwise.
Memory Management: None
DKBoolean isContentChanged() const;
Parameters: None.
Returns: TRUE if the content has been set, FALSE otherwise.
DKBoolean isSet()const;
Parameters: None.
Returns: TRUE if the content is NULL, FALSE otherwise.
DKBoolean isNull()const;
Parameters: adkXDO - object to compare data with, as an instance of dkXDO.
Returns: TRUE if both resource objects have the same data.FALSE otherwise
DKBoolean compareData(dkXDO *adkXDO);
Parameters: None.
Returns: TRUE or FALSE
DKBoolean isOpenSynchronous();
Parameters: None.
Returns: TRUE if a new version is to be created when updating a part; FALSE otherwise.
DKBoolean getNewVersion();
Parameters: None
Returns: TRUE if the ChangeSMSFlag is set; FALSE otherwise.
DKBoolean isChangeSMSRequested();
Parameters: None
Returns: TRUE if the objects have the same type, persistent identifier, content, and search index information; FALSE otherwise.
DKBoolean operator==(DKLobICM &Lob1);
Parameters: smsCollName - name of the SMS collection that will be henceforth used to store this resource object's content.
Returns: None
void setSMSCollName(DKString smsCollName);
Parameters: tCollection - name of the target collection.
Returns: None
void changeSMSInfo(DKString tCollection);
Parameters: aFlag - a boolean value that if true indicates that the content has been changed; false means unchanged.
Returns: None
void setContentChanged(bool aFlag);
Parameters: None
Returns: None
void setNull();
Parameters: None
Returns: None
void open();
Parameters: aFileName - file name into which the content in the resource object will be unloaded
Returns: None
void open(DKString afileName);
void add(int option,DKRMSMSPairDefICM *rmsmspairs);
void update(int option,DKRMSMSPairDefICM *rmsmspairs);
Parameters: extensionName - The extension name. The valid extension names are currently only DKStorageManageInfoICM. extensionObj - A source extension object.
Returns: None
void addExtension(const char *extensionName,dkExtension *extensionObj);
Parameters: extensionName - the extension name.
Returns: None
void removeExtension(const char *extensionName);
Parameters: mimeType- MIME type value for the object's content (example, "image/bmp").
Returns: None
void setMimeType(DKString mType);
Parameters: option - an option. The valid options are:
DK_DL_OPT_DELETE_OPTION: For delete
DK_DL_OPT_RETRIEVAL_ACTION: For retrieve
value - the option value. For DK_DL_OPT_DELETE_OPTION, the valid values are: For Non-media objects only:
DK_DELETE_ITEM - Deletes this item if no more parts are left in the item.
DK_DELETE_OBJECT_ONLY (default if not set) - Don't delete this item, even if there are no more parts left in the item.
For Media objects only:
DK_DELETE_NO_DROPITEM_MEDIA_AVAIL - Don't delete the item if there is no part left in the item. Media parts (media objects) cannot be deleted when they are in use.
DK_DELETE_NO_DROPITEM_MEDIA_INUSE - Don't delete the item, even if there are no parts left in the item. Media parts (media objects) can be deleted, even if they are in use.
DK_DELETE_DROPITEM_MEDIA_AVAIL - Deletes the item if there is no part left in the item. Media parts (media objects) cannot be deleted when they are in use.
DK_DELETE_DROPITEM_MEDIA_INUSE - Deletes the item if there is no part left in the item. Media parts (media objects) can be deleted, even if they are in use.
For DK_DL_OPT_RETRIEVAL_ACTION, the valid values are:
DK_RETRIEVAL_GET_IT
DK_RETRIEVAL_GET_IT_PREFETCH
DK_RETRIEVAL_NO_MOUNT
DK_RETRIEVAL_NO_MOUNT_PREFETCH
DK_RETRIEVAL_STAGE_IT
DK_RETRIEVAL_STAGE_IT_PREFETCH
Returns: None
void setOption(int option, DKAny value);
Parameters: None
Returns: None
void changeStorage();
Parameters: name - new external object name for this resource.
Returns: None
void setResourceName(DKString name);
Parameters: ds- datastore to associate with this resource object. The datastore object should be an instance of DKDatastoreICM.
Returns: None
void setDatastore(DKDatastoreICM *ds);
Parameters: of - original file name for this resource.
Returns: None
void setOrgFileName(DKString of);
Parameters: ahandler - the handler program name to view the content. It could be simply a text editor or a specific viewer for this content type. newSynchronousFlag - TRUE for synchronous process; FALSE otherwise.
Returns: None
void setInstanceOpenHandler(DKString ahandler,bool newSynchronousFlag);
Parameters: ahandler - the handler program name to view the content. It could be simply a text editor or a specific viewer for this content type. newSynchronousFlag - TRUE for synchronous process; FALSE otherwise.
Returns: None
void setClassOpenHandler(DKString ahandler,bool newSynchronousFlag);
Parameters: option - valid update option. See DKDatastoreICM.updateObject(dkDataObject, int) for valid options.
Returns: None
void update(int option);
Parameters: None
Returns: None
void querySMSInfo();
Parameters: fileName - name of the file to be cataloged. rmScopeFilePath - absolute path of the file to be cataloged.
Returns: None
void catalogContent(DKString fileName , DKString rmScopeFilePath);
Parameters: bNewVersion - If TRUE , specifies that a new version is to be created when updating a part.
Returns: None
void setNewVersion(DKBoolean bNewVersion);
Parameters: partNum - part number for this part (the resource object is being used as a part).
Returns: None
void setPartNumber(int partNum);
DK_CM_FOLDER, DK_CM_DOCUMENT
DK_CM_ITEM.
Parameters: usSemanticType - semantic type value for this resource object.
Returns: None
void setSemanticType(long lSemanticType);
void setDatastore(dkDatastore *ds);
Adds or stores the content and meta-data of this resource object into the persistent store. The content is stored in the resource manager associated with the user or the item type. If the resource manager associated with user or item type is unavailable, the content is stored into one of its replica servers. he meta-data describing the content is stored in the Content Manager library server. Both pieces of information are tied together.
If the content is not available, only the meta-data is created. The content can be added later.
Note: Objects larger than 50 MB are not supported on OS/390 Parameter : option - add option Returns : Reference to the existing resource object
void add(int iOption);
Adds or stores the content and meta-data of this resource object into the persistent store. The content is stored in the resource manager associated with the user or the item type. If the resource manager associated with user or item type is unavailable, the content is stored into one of its replica servers. he meta-data describing the content is stored in the Content Manager library server. Both pieces of information are tied together.
If the content is not available, only the meta-data is created. The content can be added later.
OS/390 limitions: Objects larger than 50 MB are not supported. Third Party is not supported. Parameters: aFullFileName - a fully qualified path and file name, default is the current directory. option - add option Returns : Reference to the existing resource object
void add(DKThirdPartyServerDef *pServerDef,int iOption);
This method is not currently available.
Adds the content and meta-information of this resource object into the persistent store with input file. The content is stored directly from the given file into the resource manager associated with the user or the item type. If the resource manager associated with the user or item type is not available, the content is stored into one of its replica servers. The meta-data describing the content is stored in the of Content Manager library server. Both pieces of information are tied together.
OS/390 limitions: Objects larger than 50 MB are not supported. Third Party is not supported.
Parameters: pServerDef - instance of DKThirdPartyServerDef containing the third-party source information option - valid update option. See DKDatastoreICM.updateObject(dkDataObject, int) for valid option values.
Returns: None
void update(DKThirdPartyServerDef *pServerDef,int iOption);
Sets the next update operation to get the content from the specified location for a part in a document. The location information must have been specified already by calling setUpdateLocation method. You only need to call this method if you want to change the location since the last time it is set by this method or by method setUpdateLocation.
Parameters: dksLocation - the location code. See setAddLocationOption(DKString) for valid values.
Returns: None
void setUpdateLocationOption(DKString dksLocation);
Specifies the location from which to get the resource content for an update operation on a part of a document. In addition, it makes it possible to switch between locations specified in the DKNVPair for the next update operation, by calling setAddLocationOption(String). Once the store location has been set, the actual update of the content will get initiated automatically at the document update time.
Parameters: pOptions - an array of name-value pairs. See setAddLocation(DKNVPair *,long) for the valid values. lOptionCount - count of the options array in the first parameter.
Returns: None
void setUpdateLocation(DKNVPair *pOptions,long lOptionCount);
Sets the next add or store operation to get the content from the specified location for a part in a document. The location information must have been specified already by calling setAddLocation method. You only need to call this method if you want to change the location since the last time it is set by this method or by the setAddLocation method. Parameters: dksLocation - the location code. Valid values for location code are:
MEMORY - Get the content from this object, by calling getContent method. This is the default.
FILE - Get the content from a file.
STREAM - Get the content from an input stream.
THIRD_PARTY - Get the content form a third party server.
Returns: None
void setAddLocationOption(DKString dksLocation);
Specifies the location from which to get the resource content for add or store operation on a part of a document. In addition, it makes it possible to switch between locations specified in the DKNVPair for the next add or store operation, by calling setAddLocationOption(String). Once the store location has been set, the actual store of the content will get initiated automatically at the document store time.
Parameters: pOptions - an array of name-value pairs, with the following possible values:
(MEMORY, null): Get the content from this object, by calling getContent method. This is the default.
(FILE, file_name): file_name - A String, the name of the file, including the path, to read the content from.
An array of the following:
(STREAM, input_stream) : input_stream - an InputStream object to read the content from. The length of the stream must be known and supplied as the next parameter below.
(LENGTH, length) : length - the length of the input stream as an Long. It must be supplied.
(THIRD_PARTY, third_party_obj) : third_party_obj - a DKThirdPartyServerDef object, specifying the third party server to get the content from.
The last name-value pair specifies the default operation and can be changed using the setAddLocationOption(java.lang.String). MEMORY, FILE, STREAM and THIRD_PARTY, are constant fields defined in this class. lOptionCount - count of DKNVPair array members
Returns: None
void setAddLocation(DKNVPair *pOptions,long lOptionCount);
Retrieves resource meta-data from the library server and the whole or partial content object from the resource manager to the memory buffer.
Parameters: dksFileName - fully-qualified path and file name into which the resource content is to be retrieved. If no path is specified, current directory is used. pOptions- A DKNVPair array which can have in it the retrieve related options.The name for the retrieve option in the NVPair will be DK_CM_PARM_RETRIEVE. See retrieve(int) for acceptable values. The DKNVPair can also have projection related options. The name for the projection option in the NVPair will be DK_CM_PARM_PROJECTION_LIST. See DKDatastoreICM::retrieveObject(dkDataObject *,DKNVPair*,long) for acceptable values.
Returns: None
void retrieve(DKString dksFileName,DKNVPair *pOptions,long lOptionCount);
Asynchronously retrieves the content and meta-data of the resource stored in the resource manager and Content Manager persistent store to a third party destination. If the resource manager associated with this object is not available, the object is retrieved from one of the replica servers associated with the item. If the resource manager associated with the user of the datastore is lancache enabled and the lancache option of the datastore is set, the object is cached in and retrieved from the resource manager of the datastore user. The information describing the third party destination, such as hostname, userId, password, protocol, and port number, must be set prior to calling this method into the DKThirdPartyServerDef object.
Parameters: pServerDef - instance of DKThirdPartyServerDef object containing third-party destination information. iOption - retrieval options. see retrieve(int) for valid values.
Returns: None
void retrieve(DKThirdPartyServerDef *pServerDef,int iOption);
Retrieves the content and meta-data of the resource stored in the resource manager and Content Manager persistent store to a third party destination. The information describing the third party destination, such as hostname, userId, password, protocol, and port number, must be set prior to calling this method into the DKThirdPartyServerDef object.
Parameters: pServerDef - instance of DKThirdPartyServerDef object containing third-party destination information. pOptions - A DKNVPair that can have in it the retrieve related options. The name for the retrieve option in the NVPair will be DK_CM_PARM_RETRIEVE. See retrieve(int) for acceptable values. It can also have projection related options. The name for the projection option in the NVPair is DK_CM_PARM_PROJECTION_LIST. See DKDatastoreICM::retrieveObject(dkDataObject * ,DKNVPair*,long) for acceptable values. lOptionCount - count of the options array
Returns: None
void retrieve(DKThirdPartyServerDef *pServerDef,DKNVPair *pOptions,long lOptionCount);
Retrieves the meta-data for this object and a partial or whole content from the resource manager to the specified file name.
Parameters: pOptions- A DKNVPair that can have in it the retrieve related options.The name for the retrieve option in the NVPair is DK_CM_PARM_RETRIEVE. See retrieve(int) for acceptable values. It can also have projection related options. The name for the projection option in the NVPair is DK_CM_PARM_PROJECTION_LIST. See DKDatastoreICM::retrieveObject(dkDataObject * ,DKNVPair*,long) for acceptable values. lOptionCount - Count of the options array dksFileName - fileName into which the content is to be retrieved lOffset - The byte offset in the resource lLen - The number of bytes from the offset. To retrieve or update entire object set offset to -1 and len to -1.
Returns: None
void retrieve(DKNVPair *pOptions,long lOptionCount,DKString dksFileName,long lOffset, long lLen);
Retrieves resource meta-data from the library server and the whole or partial contentobject from the resource manager to the memory buffer.
Parameters: pOptions- A DKNVPair array that can have in it the retrieve related options.The name for the retrieve option in the NVPair will be DK_CM_PARM_RETRIEVE. See retrieve(int) for acceptable values. The array can also have the projection related options. The name for the projection option in the NVPair is DK_CM_PARM_PROJECTION_LIST. See DKDatastoreICM::retrieveObject(dkDataObject *,DKNVPair*,long) for acceptable values. lOffset - the byte offset in the resource. lLen - the number of bytes from the offset. To retrieve or update entire object set offset to -1 and len to -1.
Returns: None
void retrieve(DKNVPair *pOptions,long lOptionCount,long lOffset, long lLen);
Parameters: dkbIsRequested - New value for ChangeSmS flag for this part.
Returns: None
void setChangeSMSRequested(DKBoolean dkbIsRequested);
Parameters: adKXDO - Reference to the resource to be used as a source for content for this resource
Returns: Modified resource object
dkDataObjectBase& copyData(const dkXDO &adkXDO);
Parameters: pData - data buffer whose contents are to be copied into the resource object lLength - length of the data buffer
Returns: Modified resource object
dkDataObjectBase& setContent(char *pData,longlong lLength);
Parameters: pByteArray - byte array whose contents are to be copied into the resource object
Returns: Modified resource object
dkDataObjectBase& setContent(DKByteArray *pByteArray);
Parameters: afileName - A fully qualified path with file name. If no path is supplied, the default option is to assume that the file is located in the current directory. fileOption. - The following are valid file options:
OVERWRITE : A new file is created or an existing file is overwritten
NOOVERWRITE : A new file is created, but will also throw an exception if the file already exists
APPEND : resource data will be appended to the existing file
Returns: Modified resource object
dkDataObjectBase& getContentToClientFile(const char *afileName,int fileOption)const;
Parameters: afileName - A fully qualified path with file name. If no path is specified, the default is to assume that the file is located in the current directory.
Returns: Modified resource object
dkDataObjectBase& setContentFromClientFile(const char *afileName);
Note: Objects larger than 50 MB are not supported on OS/390
Parameters: None
Returns: Reference to the existing resource object
dkDataObjectBase& add();
Note: Objects larger than 50 MB are not supported on OS/390
Parameters: option - add option
Returns: Reference to the existing resource object
dkDataObjectBase& add(int iOption);
Note: Objects larger than 50 MB are not supported on OS/390
Parameters: aFullFileName - Name of the file from which to load content into the resource manager. The file name can be fully qualified. If the file name is not fully qualified, it is assumed that it exists in the current directory.
Returns: Reference to the existing resource object
dkDataObjectBase& add(DKString aFullFileName);
Note: Objects larger than 50 MB are not supported on OS/390
Parameters: aFullFileName - a fully qualified path and file name, default is the current directory. option - add option
Returns: Reference to the existing resource object
dkDataObjectBase& add(DKString a FullFileName,int iOption);
Note: Objects larger than 50 MB are not supported on OS/390
Parameters: is - a valid input stream object length - the number of bytes to be stored
Returns: Reference to the existing resource object
dkDataObjectBase& add(istream *is,long length);
Parameters: option - See retrieve(int) offset - For partial content only. The offset of the resource. length - For partial content only. The number of bytes from the offset. A length of -1, signifies the end of resource. If both offset and length are -1, it means to retrieve the entire object.
Returns: Reference to the existing resource object
dkDataObjectBase& retrieve(int option, long offset, long len );
dkDataObjectBase& retrieve(int metaOption, int contentOption,long offset, long len );
Parameters: option - acceptable values can be:
DK_CM_CONTENT_YES - Retrieve meta data and content.
DK_CM_CONTENT_NO - Retrieve meta only.
DK_CM_CONTENT_ONLY - Retrieve content only , assuming meta is retrieved.
DK_CM_CONTENT_ATTRONLY- Retrieves Item Attributes.
DK_CM_CONTENT_CHILDREN- Retrieves the children of the current DDO.
DK_CM_CONTENT_LINKS - Retrieves Inbound and Outbound links.
DK_CM_CONTENT_ONELEVEL- Retrieves all information, including attributes, child components, but without links, for the current component level in the hierarchy.
DK_CM_CONTENT_ITEMTREE- Retrieves the whole item tree hierarchy.
DK_CM_VERSION_LATEST - Retrieves the latest version of this item.
DK_CM_CHECKOUT - Retrieves the item and checks it out.
Returns: Reference to the existing resource object
dkDataObjectBase& retrieve(int option);
Parameters: None
Returns: Reference to the existing resource object
dkDataObjectBase& retrieve();
Parameters: fileName - A fully qualified path and file name, the default is current directory. option - Valid retrieval option , default -1. for other options. See DKLobICM#retrieve(int) offset - For partial content retrieval only. The byte offset position in the resource. length - For partial content retrieval only. The number of bytes from the offset. A value of 1 indicates up to the end of resource.Offset -1 and length -1 means retrieve the whole object.
Returns: Reference to the existing resource object
dkDataObjectBase& retrieve(int option,DKString fileName,int offset , int length);
Parameters: fileName - A fully qualified path and file name. If the path is not specified, the file is assumed to exist in the current directory.
Returns: Reference to the existing resource object
dkDataObjectBase& retrieve(const char* fileName);
dkDataObjectBase& retrieve(DKNVPair *parms);
Note: Objects larger than 50 MB are not supported on OS/390
Parameters: None
Returns: Reference to the existing resource object.
dkDataObjectBase& update();
Note: Objects larger than 50 MB are not supported on OS/390
Parameters: fileName - A fully qualified path and file name. If the path is not specified, the file is assumed to exist in the current directory.
Returns: Reference to the existing resource object
dkDataObjectBase& update(DKString aFullFileName);
Parameters: None
Returns: Reference to the existing resource object
dkDataObjectBase& del();
Parameters: flush - If true, the in-memory contents of the resource object are flushed.
Returns: Reference to the existing resource object
dkDataObjectBase& del(DKBoolean flush);
Parameters: None
Returns: Size of the object in the datastore.
long size();
Parameters: None
Returns: Size of the object loaded inot memory.
long lenth() const;
Parameters: None
Returns: Size of the object in memory as a 64-bit long value.
longlong lengthInMemory();
Parameters: None
Returns: Size of the object in the datastore as a 64-bit long value.
longlong sizeInDatastore();
Parameters: None
Returns: Part number of the resource item in its parent document.
int getPartNumber();
Parameters: None
Returns: Semantic type of the resource. See setSemanticType for more information on the semantic type.
long getSemanticType();
Parameters: None
Returns: Extension object corresponding to the specified name.
const dkExtension* getExtension(const char *extensionName);
Parameters: None
Returns: Cloned resource object.
virtual dkXDO* cloneSkeleton();
Parameters: option - Valid options, the default is -1 offset - For partial content only. The byte offset position in the resource length - For partial content only. The number of bytes from the offset, -1 means to the end of the resource Offset -1 and length -1, means retrieve the whole object.
Returns: Pointer to a stream holding the object's content.
Memory Management: You must free the returned stream after you are finished with it.
strstream* getInputStream(int option,int offset, int length);
strstream* openStream();
Parameters: option - ID of the option to be retrieved
Returns: Retrieval or delete option
DKAny getOption(int option);
Parameters: lArraySize - size of the returned DKNVPair array
Returns: Pointer to a DKNVPair array that will hold the update location information.
Memory Management: Do not delete this object
DKNVPair* getUpdateLocation(long &lArraySize);
Parameters: lArraySize - size of the returned DKNVPair array
Returns: Pointer to a DKNVPair array that will hold the add location information.
Memory Management: Do not delete this object
DKNVPair* getAddLocation(long &lArraySize);
DKString* getContentURLs(int operation, int option,int offset,int len,long & arraySize);
DKString* getContentURLs(int option,int offset,int len,long & arraySize);
DKBoolean getAsyncStatus();
(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.