Purpose:
The DXBlobDL class defines the public interface for basic Binary Large Object (BLOB) data types in Content Manager. It supports persistency and may exist as a stand-alone object, without the associated DDO object. It provides a set of methods specifically used to communicate with DXDatastoreDL objects such as Add/Retrieve/Update/Delete functions. These functions enable an application to store and retrieve the object's data to and from a datastore, without the existence of an associated DDO object. A stand-alone DXBlobDL object must have its PID set in order to be able to locate the position in the datastore where it belongs. If the object is used in conjunction with a DDO object, the PID is set automatically.
Methods:
init(LPDISPATCH datastore);
If this method is used it must be called following the creation of a DXBlobDL object (except for methods returning a DXBlobDL object). Initialize XDO with the datastore from Content Manager. The input parameter LPDISPATCH pointer contains a DXDatastoreDL object.
LPDISPATCH getPidObject();
Gets the PID object. The returned LPDISPATCH pointer contains a DXPidXDODL object.
setPidObject(LPDISPATCH pidXDO);
Sets the PID object. The input parameter LPDISPATCH pointer contains a DXPidXDODL object.
add();
Adds the persistent data of this object to the datastore. If no file name is specified, then this object, identified by its PID, will be added to the persistent datastore. A new object with the given PID will be created in the datastore; note that an object having the same PID cannot exist there already, otherwise this method will throw an exception. The object itself is not changed.
If a file name is specified, then the content of the file will be added to the persistent datastore. The filename could be a full path name. With a very large file, this operation is more efficient than calling setContentFromClientFile, followed by add(); this will serve to help avoid out-of-memory problems. To allow the addition of very large files (>15 MB), set the environmental variable MAXPIECE. For example, setting MAXPIECE=4 will break the object content into 4 megabyte pieces, thus avoiding out-of-memory problems.
retrieve();
Retrieves the persistent data of this object from the datastore. If no file name is specified, then this object, identified by its PID, will be retrieved from the persistent datastore.
If a file name is specified, then the content of the persistent datastore will be retrieved into the given filename, which can be an absolute pathname. For a very large object, this will serve to help avoid out-of-memory problems.
update();
Updates the persistent data of this object to the datastore. If no file name is specified, the persistent data of this object, identified by its PID, will be updated in the persistent datastore. The object itself is not changed.
If a file name is specified, then the object and the persistent datastore will be updated with the content of the given file.
del();
Deletes the persistent data of this object, identified by its PID, in the persistent datastore. The object itself is not changed. The next action depends on the value of flushFlag. If flushFlag is TRUE, it will clear the content, otherwise the current content will be preserved. The default is to clear the current content, that is, flushFlag is equal to TRUE.
BSTR getContent();
setContent(LPCTSTR content);
BOOL isContentChanged();
BOOL isSet();
setAffiliatedType(long affiliatedType);
Set the affiliated type of the object. The valid values are:
If setAffiliatedType is not set, the default value is DX_DL_BASE.
long getAffiliatedType();
BSTR getMimeType();
BSTR getContentType();
setContentType(LPCTSTR contentType);
LPDISPATCH datastore();
Gets the datastore. The returned LPDISPATCH pointer contains a DXDatastoreDL object.
void changeStorage();
Changes the system-managed storage (SMS) criteria for an object. The collection name, management class name and storage class name will be all converted to upper case by the system. These names must be valid on the object server where you store the object. If you change the collection name and specify a null string as the management and storage class name, the function places the object in the default class for the specified collection.
You cannot move the object from one server to another using this function, therefore you cannot change the StoreSite. If the change causes any physical movement of the object, it might be deferred until the storage management cycle runs on the server.
Dim dsDL As New DXDatastoreDL Dim xdo As New DXBlobDL ... //------- set DXStorageManageInfoDL ------- Dim aSMS As New DXStorageManageInfoDL aSMS.setCollectionName "CBR.COLLECT3" aSMS.setRetention 888 aSMS.setManagementClass "MGTCLASS" aSMS.setStorageClass "FIXED" xdo.setExtension aSMS axdo.changeStorage
setExtension(LPDISPATCH extensionObj);
Sets the extension object for this object. Valid extension object names are: The input parameter LPDISPATCH pointer contains a DXAnnotationDL object or a DXSearchEngineInfoDL object or a DXMediaStreamInfoDL object or a DXStorageManageInfoDL object.
Dim dsDL As New DXDatastoreDL Dim xdo As New DXBlobDL xdo.init dsDL xdo.setPartId 10 xdo.setItemId "GAWCVGGVFUG428UJ" //------- set DXStorageManageInfoDL ------- Dim aSMS As New DXStorageManageInfoDL aSMS.setCollectionName "CBR.COLLECT3" aSMS.setRetention 888 aSMS.setManagementClass "MGTCLASS" aSMS.setStorageClass "FIXED" xdo.setExtension aSMS xdo.setContentClass DX_DL_CC_IBMVSS axdo.add
LPDISPATCH getExtension(LPCTSTR extensionName);
Gets the extension object for this object. Valid extension names are:
The returned LPDISPATCH pointer contains a DXAnnotationDL object or a DXSearchEngineInfoDL object or a DXMediaStreamInfoDL object or a DXStorageManageInfoDL object.
addExtension(LPDISPATCH extensionObj);
Adds the extension object for this object. The valid extension object names are the same as for setting extension object The input parameter LPDISPATCH pointer contains a DXAnnotationDL object or a DXSearchEngineInfoDL object or a DXMediaStreamInfoDL object or a DXStorageManageInfoDL object.
removeExtension(LPDISPATCH extensionObj);
Removes the extension object from this object. The input parameter LPDISPATCH pointer contains a DXAnnotationDL object or a DXSearchEngineInfoDL object or a DXMediaStreamInfoDL object or a DXStorageManageInfoDL object.
BOOL isNull(short data_id);
setNull();
addWithFile(LPCTSTR filename);
retrieveToFile(LPCTSTR filename);
Retrieves the persistent data from the datastore and store in the file.
updateWithFile(LPCTSTR filename);
delAndFlush(BOOL flush);
Deletes the persistent data of this object from the datastore and clear the content of this object if flush is equal to TRUE. If flush is equal to FALSE the content of this object is not cleared.
BSTR getContentToFile(LPCTSTR filename, long fileOption);
Copies the blob data of this object to the given file. FileOption DX_DL_WRITEFILE will create or overwrite an existing file; fileOption DX_DL_WRITEFILEIFEXIST will only create the file, but will also throw an exception if the file already exists; fileOption DX_DL_APPENDFILE appends to an existing file.
setContentFromFile(LPCTSTR filename);
Replaces the LOB data of this object with the contents of the file "filename." The file must be accessible by the client.
open();
The content of the object will be unloaded to a client file with a system generated name and then a default handler will be invoked against the file. If no file name is specified, the content of the object will be unloaded to a client file with a system generated name and then a default handler will be invoked against the file. Note that not all browsers work the same for this operation. For example, the Microsoft Internet Explorer needs a full path name and the correct file extension to function correctly here.
If a file name is specified, the content of the object will be unloaded to the file specified and a default handler invoked against the file.
openWithFile(LPCTSTR filename);
The content of the object will be unloaded to the specified client file and then a default handler will be invoked against the file.
long length();
setInstanceOpenHandler(LPCTSTR aHandler, BOOL newSynchronousFlag);
Sets the executable handler program name, and whether this handler should be invoked synchronously or asynchronously for this object instance. The handler name must be accessible from the client application.
setClassOpenHandler(LPCTSTR aHandler, BOOL newSynchronousFlag);
Sets the executable handler program name for the whole class instead of for this instance only.
BSTR getOpenHandler();
Returns the currently active handler program name for this object. It could be either class handler or instance handler.
BOOL isOpenSynchronous();
Returns the current synchronization property for this handler.
BSTR getRepType();
Gets the representation type of the LOB data content as a string.
setRepType(LPCTSTR repType);
Sets the representation type of the LOB data content. The default value is FRN$NULL. This default value is also used if the input aRType is a null string.
BSTR getItemId();
setItemId(LPCTSTR itemId);
long getPartId();
setPartId(long partId);
setRank(long partId);
Sets the search result ranking value of the object; default is -1.
long getRank();
Gets the search result ranking value of the object; default is -1.
BSTR getCreatedTimestamp();
setCreatedTimestamp(LPCTSTR createdTimestamp);
BSTR getUpdatedTimestamp();
setUpdatedTimestamp(LPCTSTR updatedTimestamp);
setOption(long option, VARIANT value);
Sets the value for an option. The valid options and values are:
The valid values for media objects are:
Restriction: for media objects, only the following values are valid:
Dim dsDL As New DXDatastoreDL Dim xdo As New DXBlobDL xdo.init dsDL xdo.setPartId 1 xdo.setPidObject "GAWCVGGVFUG428UJ" xdo.setOption DX_DL_OPT_RETRIEVAL_ACTION, DX_DL_RETRIEVAL_STAGE_IT_PREFETCH xdo.retrieve
getOption(long option, VARIANT* value);
Get the value of an option. See the setOption method for a list of the valid options and values.
Dim dsDL As New DXDatastoreDL Dim xdo As New DXBlobDL xdo.init dsDL xdo.setPartId 10 xdo.setPidObject "GAWCVGGVFUG428UJ" Dim opt As Long xdo.getOption DX_DL_OPT_DELETE_OPTION, opt cout "getOption of deleteOption=" & opt
BOOL isCategoryOf(long category);
Returns the value TRUE if the object is a specified category object. The valid category names are:
Dim dsDL As New DXDatastoreDL Dim xdo As New DXBlobDL xdo.init dsDL xdo.setPartId 10 xdo.setPidObject "GAWCVGGVFUG428UJ" Dim catflag As Boolean catflag = xdo.isCategoryOf(DX_DL_MEDIA_OBJECT)
long retrieveObjectState(long objectCategory);
Retrieves the state of a specified category object. This method performs dynamic retrieval. The valid category names are:
Dim dsDL As New DXDatastoreDL Dim xdo As New DXBlobDL xdo.init dsDL xdo.setPartId 10 xdo.setPidObject "GAWCVGGVFUG428UJ" Dim indexState As Long Dim mediaState As Long indexState = xdo.retrieveObjectState(DX_DL_INDEXED_OBJECT) mediaState = xdo.retrieveObjectState(DX_DL_MEDIA_OBJECT)
(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.