Enterprise Information Portal APIs

com.ibm.mm.sdk.server
Class DKDatastoreDL

java.lang.Object
  |
  +--com.ibm.mm.sdk.server.dkAbstractDatastore
        |
        +--com.ibm.mm.sdk.server.DKDatastoreDL
All Implemented Interfaces:
DKConstant, DKConstantDL, dkDatastore, dkDatastoreIntDL, DKMessageId, DKMessageIdDL, dkQueryEvaluator, dkQueryManager

public class DKDatastoreDL
extends dkAbstractDatastore
implements dkDatastoreIntDL, DKConstantDL, DKMessageIdDL

DKDatastoreDL is the specific version of dkDatastore to implement an IBM Content Manager (Version 7.1 and earlier) datastore. For an IBM Content Manager Version 8 and later datastore, use DKDatastoreICM.

This class provides document, part and folder storage and retrieval mechanisms, as well as search and other document processing capabilities supported by earlier Content Manager.

The execute() and evaluate() methods of DKDatastoreDL take parametric query strings expressed in parametric query language type. The syntax of this query string is described below. DKParametricQuery object accepts queries in this syntax; the DKParametricQuery object delegates the low level query processing tasks to DKDatastoreDL.

By itself, earlier Content Manager only supports parametric queries. Integration with other search engines, such as SearchManager/Text Search Engine or Image Search/QBIC, gives Content Manager the capability to index texts and images and collectively process combined queries. Combined query processing is performed by the DKCombinedQuery class, with the help of the associated datastore classes (DKDatastoreDL, TS, or QBIC, for example).

Content Manager Parametric Query String
The syntax for the query string used in earlier Content Manager parametric queries is as follows:

     SEARCH=(INDEX_CLASS=index_class_name,
              MAX_RESULTS=maximum_results,
              COND=(conditional_expression)
               ; ...
              );option_expression...
 
where the option_expression has the form:
      OPTION=(CONTENT=yes_no_attronly,
               TYPE_QUERY=type_of_query,]
 	      TYPE_FILTER=doc_and_or_folder
               WIPSTATUS=work_in_process_filter,
               SUSPEND=suspension_status_filter
              )
 
  Notes:
Words in uppercase are keywords; the words in italics are parameters you supply.

DBCS (double-byte character set) attribute names are in SBCS (single-byte character set) single quotes; DBCS (double-byte character set) attribute values can also be specified in SBCS double quotes. All other characters are SBCS.

The parameters include the following:

index_class_name (optional):
the name of the index class to be searched. If it is not specified, all available index classes will be searched.

maximum_results (optional):
the maximum number of results to be returned. If MAX_RESULTS is 0 or not specified, all items that match the search criteria will be returned.

conditional_expression (required):
an expression composed of attribute_name and attribute_value pairs joined with relational operators, and two subsequent pairs that are connected with logical operators. Each pair is enclosed in paretheses.

Logical operators are NOT (or ^), AND (or &), and OR (or |). Relational operators are EQ (or ==), LEQ (or <=), GEQ (or >=), LT (or <), GT (or >), NEQ (or <>), IN, NOTIN, LIKE, NOTLIKE, BETWEEN, and NOTBETWEEN. These last two operators take a pair of attribute values as a range.

An example of a conditional expression is:

        (DLSEARCH_Date >= "1990") AND (DLSEARCH_Date <= "1993")  AND
         (DLSEARCH_Volume BETWEEN 1 3)
 

Attribute names with spaces must be enclosed within single quotes; this also includes DBCS characters. For example:

        ('last name' == "Smith") AND 
         ('first name' <> "Joe")          
 

Attribute values with DBCS characters must be enclosed within double quotes.

The sequence of INDEX_CLASS, MAX_RESULTS, and COND can be repeated for other index classes to formulate a parametric query using multiple criteria. Each sequence should be separated by a semicolon.

If the user wishes to search for a single quote in a string, the single quote character is specified as follows:

If the user wishes to search for a double quote in a string, the double quote character can be specified in two ways.

  1. Title: 'Jonathan"s book'
  2. Title: "Jonathan""s book"
Each of the options is optional; if you specify an option, the parameter value is required. The parameters for the options are as follows;

yes_no_attronly:
YES or NO or ATTRONLY. If content is YES, the resulting documents and folders will have their contents retrieved. If the value is NO, only the document or folder ids are set. If the value is ATTRONLY, the document or folder ids are set as the attributes and their values. The default is YES if not specified.

For example, content value YES would cause the resulting document or folder DDOs to have their PID, object type, properties and all attributes set. This option also causes the DKParts attribute to be set to a collection of parts with no content. Similarly, the DKFolder attribute is also set to a collection of DDOs with NO content. If the CONTENT value is ATTRONLY, the resulting document or folder DDOs PID, object type, properties, and all attributes are set. If the CONTENT value is NO, the resulting document or folder DDOs PID, object type, and properties are set. The part or DDO content can be retrieved explicitly when needed.

type_of_query:
the valid values are:

STATIC (default value)
process the request using static SQL query. If no static query is available the function uses a dynamic query.

DYNAMIC
process request using a dynamic SQL query.

BUILDONLY
generates a static SQL query based on the input search expressions and saves it for future searches.

doc_and_or_folder (FOLDERDOC is the default value):
takes the value of FOLDERDOC, to search for folders and documents, DOC to search for documents only, and FOLDER to search for folders only.

work_in_process_filter:
The work-in-process status of the items to be searched. These values can be used by themselves or in conjunction with other values. If you use two or more of the values together, the values must be specified in parenthesis separated by commas (for example, WIPSTATUS = (CANCELLED_WF_ITEMS,CURRENT_WF_ITEMS)). The valid values are:

suspension_status_filter:
The suspension status of the items to be searched. The valid values are:

Query String Example
Here is a query string to search the index class DLSAMPLE:

   SEARCH=(INDEX_CLASS=DLSAMPLE, MAX_RESULTS=5,COND=(DLSEARCH_DocType <> NULL)); OPTION=(CONTENT=NO; TYPE_QUERY=DYNAMIC)
 

Data Type Conversion
The following table displays the default data type conversions when you transfer data between an earlier Content Manager server and the EIP APIs and class library.

EIP type Content Manager data type
DKString VSTRING
DKString FSTRING
short SHORT
long LONG
DKString DECIMAL
DKDate DATE
DKTime TIME
DKTimestamp TIMESTAMP
DKBlob BLOB (parts)

Notes:


Fields inherited from interface com.ibm.mm.sdk.common.DKConstantDL
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKConstant
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageIdDL
DK_DL_MSG_INVNBR_TEXTMAPPING, DK_DL_MSG_MSGID_NOT_FOUND
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKDatastoreDL()
          Constructs the datastore and initializes the datastore.
DKDatastoreDL(java.lang.String configuration)
          Constructs the datastore and initializes the datastore.
 
Method Summary
 void addExtension(java.lang.String extensionName, dkExtension extensionObj)
          Adds a new extension object.
 void addObject(dkDataObject ddo)
          Adds this data-object to the Content Manager datastore.
 void changePassword(java.lang.String userId, java.lang.String oldPwd, java.lang.String newPwd)
          Changes the library server user password.
 java.lang.String checkedOutUserid(dkDataObject dobj)
          Lists the user ID who has checked out the document or folder.
 void checkIn(dkDataObject dobj)
          Checks in a document or folder item from datastore.
 void checkOut(dkDataObject dobj)
          Checks out a document or folder item from the datastore.
 void commit()
          Commits a datastore transaction.
 void connect(java.lang.String datastore_name, java.lang.String user_name, java.lang.String authentication, java.lang.String connect_string)
          Connects to a Content Manager datastore.
 DKHandle connection()
          Gets the connection handle for a datastore.
 DKDDO createDDO(java.lang.String objectType, int Flags)
          Creates a new DDO with object type, properties and attributes set for a Content Manager datastore.
 dkQuery createQuery(DKCQExpr qe)
          Creates a query object using a DKCQExpr query expression.
 dkQuery createQuery(java.lang.String command, short commandLangType, DKNVPair[] params)
          Creates a query object.
 DKWorkFlowServiceDL createWorkFlowService()
          Gets the Content Manager work flow service.
 dkDatastoreDef datastoreDef()
          Gets the datastore definition.
 java.lang.String datastoreName()
          Gets the name of this datastore object.
 java.lang.String datastoreType()
          Gets the datastore type for this datastore.
 void deleteObject(dkDataObject ddo)
          Deletes this data-object from the Content Manger datastore.
 void destroy()
          Destroys the datastore object.
 void disconnect()
          Disconnects from a Content Manager datastore.
 java.lang.Object evaluate(DKCQExpr qe)
          Evaluates the query using a DKCQExpr query expression.
 java.lang.Object evaluate(dkQuery query)
          Evaluates the query using a dkQuery object.
 java.lang.Object evaluate(java.lang.String command, short commandLangType, DKNVPair[] params)
          Evaluates the query.
 dkResultSetCursor execute(DKCQExpr cqe)
          Runs a query expression and returns a result set cursor.
 dkResultSetCursor execute(dkQuery query)
          Runs the query.
 dkResultSetCursor execute(java.lang.String command, short commandLangType, DKNVPair[] params)
          Runs the query.
 void executeWithCallback(DKCQExpr qe, dkCallback callbackObj)
          Runs the query with callback function using a DKCQExpr query expression.
 void executeWithCallback(dkQuery query, dkCallback callbackObj)
          Runs the query with callback function using a dkQuery object.
 void executeWithCallback(java.lang.String command, short commandLangType, DKNVPair[] params, dkCallback callbackObj)
          Runs the query with callback function.
 dkExtension getExtension(java.lang.String extensionName)
          Gets the extension object from a given extenstion name.
 dkSchemaMapping getMapping(java.lang.String mappingName)
          Gets a mapping information from this datastore.
 java.lang.Object getOption(int option)
          Gets a datastore option.
 DKHandle handle(java.lang.String type)
          Gets a datastore handle.
 void invokeSearchEngine(java.lang.String searchEngine, java.lang.String searchIndex)
          Invokes a user exit to process search index request.
 boolean isCheckedOut(dkDataObject dobj)
          Checks whether a document or folder is checked out from datastore.
 boolean isConnected()
          Checks to see if the datastore is connected.
 java.lang.String[] listAttrNames()
          Gets a list of attribute names defined in the current datastore.
 dkCollection listAttrs()
          Gets a list of attributes defined in the current datastore.
 java.lang.String[] listDataSourceNames()
          Lists the available datastore server names that can be used to connect with.
 dkCollection listDataSources()
          Lists the available datastores that can be used to connect with.
 dkCollection listEntities()
          Gets a list of entities from persistent datastore.
 java.lang.String[] listEntityAttrNames(java.lang.String entityName)
          Gets a list of attribute names for a given entity name.
 dkCollection listEntityAttrs(java.lang.String entityName)
          Gets a list of attributes for a given entity name.
 java.lang.String[] listEntityNames()
          Gets a list of entity names from persistent datastore.
 java.lang.String[] listExtensionNames()
          Gets the list of the names of the extension objects.
 java.lang.String[] listMappingNames()
          Gets the list of the registered mappings from this datastore.
 java.lang.String[] listRefFolders(dkDataObject ddo)
          Lists the reference folders for a given document or folder.
 java.lang.Object listSchema()
          Deprecated. Replace by listEntities.
 java.lang.Object listSchemaAttributes(java.lang.String schemaEntry)
          Deprecated. Replace by listEntityAttributes
 java.lang.Object listServers()
          Deprecated. Replace by listDataSources.
 void moveObject(dkDataObject ddo, java.lang.String entityName)
          Moves the data-object from one index class to another in this datastore.
 java.lang.String registerMapping(DKNVPair sourceMap)
          Registers a mapping definition to this datastore.
 void removeExtension(java.lang.String extensionName)
          Removes an existing extension object.
 dkXDO retrieveFormOverlay(java.lang.String objid)
          Retrieves the form overlay object.
 void retrieveObject(dkDataObject ddo)
          Retrieves the data-object from the Content Manager datastore.
 void rollback()
          Rollbacks a datastore transaction.
 void setOption(int option, java.lang.Object value)
          Sets a datastore option.
 void startTransaction()
          Starts a transaction.
 DKHandle transactionConnection()
          Gets the transaction handle for a datastore.
 DKCQExpr translate(DKCQExpr cqe)
          Translates a query expression into a native query expression processable by this datastore.
 void unlockCheckedOut(dkDataObject dobj)
          Unlocks a checked-out document or folder item.
 void unRegisterMapping(java.lang.String mappingName)
          Unregisters mapping information from this datastore.
 void updateObject(dkDataObject ddo)
          Updates the data-object in this datastore.
 java.lang.String userName()
          Gets the user name for this datastore.
 void wakeUpService(java.lang.String searchEngine)
          Deprecated. Replace by invokeSearchEngine.
 
Methods inherited from class com.ibm.mm.sdk.server.dkAbstractDatastore
addObject, addObject, addObjects, addObjects, addObjects, clearCache, clearCache, deleteObject, deleteObject, deleteObjects, deleteObjects, deleteObjects, evaluate, execute, executeWithCallback, listAvailableServices, listSearchableEntities, listSearchableEntityNames, listSearchTemplateNames, listSearchTemplates, retrieveObject, retrieveObject, retrieveObjects, retrieveObjects, retrieveObjects, serviceMgr, updateObject, updateObject, updateObjects, updateObjects, updateObjects
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.mm.sdk.common.dkDatastoreIntDL
addFolderItem, removeFolderItem
 
Methods inherited from interface com.ibm.mm.sdk.common.dkDatastore
addObject, addObject, addObjects, addObjects, addObjects, clearCache, clearCache, deleteObject, deleteObject, deleteObjects, deleteObjects, deleteObjects, evaluate, execute, executeWithCallback, listAvailableServices, listSearchableEntities, listSearchableEntityNames, listSearchTemplateNames, listSearchTemplates, retrieveObject, retrieveObject, retrieveObjects, retrieveObjects, retrieveObjects, serviceMgr, updateObject, updateObject, updateObjects, updateObjects, updateObjects
 

Constructor Detail

DKDatastoreDL

public DKDatastoreDL()
              throws DKException,
                     java.lang.Exception
Constructs the datastore and initializes the datastore.
Throws:
DKException - if a problem is encountered.

DKDatastoreDL

public DKDatastoreDL(java.lang.String configuration)
              throws DKException,
                     java.lang.Exception
Constructs the datastore and initializes the datastore.
Parameters:
configuration - configuration string used for initialization. Valid configuration name/value pairs separated by semi colons.
  • DSNAME=<datastore_name> datastore name (optional)
  • GENFEDTEXTQRY=<YES | NO> Use federated text query. (optional) The federated text query will be a word or phase if this is set to YES. (default is NO).
Throws:
DKException - if a problem is encountered.
Method Detail

connect

public void connect(java.lang.String datastore_name,
                    java.lang.String user_name,
                    java.lang.String authentication,
                    java.lang.String connect_string)
             throws DKException,
                    java.lang.Exception
Connects to a Content Manager datastore.
Specified by:
connect in interface dkDatastore
Overrides:
connect in class dkAbstractDatastore
Parameters:
datastore_name - the datastore name used for connection
user_name - the user name used for connection
authentication - the authentication used for connection
connect_string - the connect string used for connection. This is used to provide additional connection options.
Throws:
DKException - if the connections fails.

disconnect

public void disconnect()
                throws DKException,
                       java.lang.Exception
Disconnects from a Content Manager datastore.
Specified by:
disconnect in interface dkDatastore
Overrides:
disconnect in class dkAbstractDatastore
Throws:
DKException - if a problem is encountered.

getOption

public java.lang.Object getOption(int option)
                           throws DKException,
                                  java.lang.Exception
Gets a datastore option.

The valid options and values are as follows:

DK_DL_OPT_RETRIEVAL_ACTION:
The global default retrieval action to retrieve the object content. Valid values are:
DK_DL_RETRIEVAL_GET_IT (default value):
retrieves the object if it is stored on a fixed storage device (such as DASD), or if it is stored on any online storage device. If the storage device is offline, the object server returns an error.
DK_DL_RETRIEVAL_GET_IT_PREFETCH:
similar to DK_DL_RETRIEVAL_GET_IT, except that the object server places the object in the staging area on DASD instead of sending it to the client for caching.
DK_DL_RETRIEVAL_NO_MOUNT:
retrieves the object if it is stored on a fixed storage device (such as DASD). If the object is located on a removable device, such as an optical disk, the object server returns an error.
DK_DL_RETRIEVAL_NO_MOUNT_PREFETCH:
similar to DK_DL_RETRIEVAL_NO_MOUNT, except that the object server places the object in the staging area on DASD instead of sending it to the client for caching.
DK_DL_RETRIEVAL_STAGE_IT:
retrieves the object, regardless of its location.
DK_DL_RETRIEVAL_STAGE_IT_PREFETCH:
similar to DK_DL_RETRIEVAL_STAGE_IT, except that the object server places the object in the staging area on DASD instead of sending it to the client for caching.

Restriction: for media objects, only the following values are valid:
DK_DL_RETRIEVAL_GET_IT
DK_DL_RETRIEVAL_STAGE_IT
DK_DL_RETRIEVAL_STAGE_IT_PREFETCH

DK_DL_OPT_DELETE_OPTION:
The delete option used to delete an object. The valid values for non-media objects are:
DK_DL_DELETE_ITEM
Delete the item if there are no more parts left in the item.
DK_DL_DELETE_OBJECT_ONLY (default value)
Do not delete the item even if the item contains no parts.

The valid values for media objects are:

DK_DL_DELETE_NO_DROPITEM_MEDIA_AVAIL
Do not delete the item even if the item contains no parts. You cannot delete media parts (media objects) when they are in use.

DK_DL_DELETE_NO_DROPITEM_MEDIA_INUSE
Do not delete the item even if the item contains no parts. You can delete media parts (media objects) when they are in use.
DK_DL_DELETE_DROPITEM_MEDIA_AVAIL
Delete the item if the item contains no parts. You cannot delete media parts (media objects) when they are in use.
DK_DL_DELETE_DROPITEM_MEDIA_INUSE
Delete the item if the item contains no parts. You can delete media parts (media objects) when they are in use.

DK_CM_OPT_CONTENT
The retrieval option used to retrieve an object. The valid values are:
DK_CM_CONTENT_ATTRONLY
Retrieve an item with its attributes only. Do not retrieve the parts and/or the folder information. (Any existing DKPart or DKFolder value in the DKDDO will be set to NULL after retrieval.)

DK_CM_CONTENT_YES
Retrieve an item with its attributes, parts, and/or folder information. (This is the current default behaviour.)
Specified by:
getOption in interface dkDatastore
Overrides:
getOption in class dkAbstractDatastore
Parameters:
option - the option identifier
Returns:
an option value

setOption

public void setOption(int option,
                      java.lang.Object value)
               throws DKException,
                      java.lang.Exception
Sets a datastore option.

The valid options and values are as follows:

DK_DL_OPT_RETRIEVAL_ACTION:
The global default retrieval action to retrieve the object content. Valid values are:
DK_DL_RETRIEVAL_GET_IT (default value):
retrieves the object if it is stored on a fixed storage device (such as DASD), or if it is stored on any online storage device. If the storage device is offline, the object server returns an error.
DK_DL_RETRIEVAL_GET_IT_PREFETCH:
similar to DK_DL_RETRIEVAL_GET_IT, except that the object server places the object in the staging area on DASD instead of sending it to the client for caching.
DK_DL_RETRIEVAL_NO_MOUNT:
retrieves the object if it is stored on a fixed storage device (such as DASD). If the object is located on a removable device, such as an optical disk, the object server returns an error.
DK_DL_RETRIEVAL_NO_MOUNT_PREFETCH:
similar to DK_DL_RETRIEVAL_NO_MOUNT, except that the object server places the object in the staging area on DASD instead of sending it to the client for caching.
DK_DL_RETRIEVAL_STAGE_IT:
retrieves the object, regardless of its location.
DK_DL_RETRIEVAL_STAGE_IT_PREFETCH:
similar to DK_DL_RETRIEVAL_STAGE_IT, except that the object server places the object in the staging area on DASD instead of sending it to the client for caching.

Restriction: for media objects, only the following values are valid:
DK_DL_RETRIEVAL_GET_IT
DK_DL_RETRIEVAL_STAGE_IT
DK_DL_RETRIEVAL_STAGE_IT_PREFETCH

DK_DL_OPT_DELETE_OPTION:
The delete option used to delete an object. The valid values for non-media objects are:
DK_DL_DELETE_ITEM
Delete the item if there are no more parts left in the item.
DK_DL_DELETE_OBJECT_ONLY (default value)
Do not delete the item even if the item contains no parts.

The valid values for media objects are:

DK_DL_DELETE_NO_DROPITEM_MEDIA_AVAIL
Do not delete the item even if the item contains no parts. You cannot delete media parts (media objects) when they are in use.
DK_DL_DELETE_NO_DROPITEM_MEDIA_INUSE
Do not delete the item even if the item contains no parts. You can delete media parts (media objects) when they are in use.
DK_DL_DELETE_DROPITEM_MEDIA_AVAIL
Delete the item if the item contains no parts. You cannot delete media parts (media objects) when they are in use.
DK_DL_DELETE_DROPITEM_MEDIA_INUSE
Delete the item if the item contains no parts. You can delete media parts (media objects) when they are in use.

DK_DL_OPT_CONTENT
The retrieval option used to retrieve an object. The valid values are:

DK_DL_CONTENT_ATTRONLY
Retrieve an item with its attributes only. Do not retrieve the parts and/or the folder information. (Any existing DKPart or DKFolder value in the DKDDO will be set to NULL after retrieval.)
DK_DL_CONTENT_YES
Retrieve an item with its attributes, parts, and/or folder information. (This is the current default behaviour.)
Specified by:
setOption in interface dkDatastore
Overrides:
setOption in class dkAbstractDatastore
Parameters:
option - the option identifier
value - the option value

evaluate

public java.lang.Object evaluate(java.lang.String command,
                                 short commandLangType,
                                 DKNVPair[] params)
                          throws DKException,
                                 java.lang.Exception
Evaluates the query.
Specified by:
evaluate in interface dkDatastore
Overrides:
evaluate in class dkAbstractDatastore
Parameters:
command - a query string.
commandLang - a query type.
params - additional query option in the form of a name/value pair.
Returns:
a collection of the results.
Throws:
DKException - if a problem is encountered.

evaluate

public java.lang.Object evaluate(dkQuery query)
                          throws DKException,
                                 java.lang.Exception
Evaluates the query using a dkQuery object.
Specified by:
evaluate in interface dkDatastore
Overrides:
evaluate in class dkAbstractDatastore
Parameters:
query - a query object
Returns:
a collection of the results
Throws:
DKException - if a problem is encountered.

evaluate

public java.lang.Object evaluate(DKCQExpr qe)
                          throws DKException,
                                 java.lang.Exception
Evaluates the query using a DKCQExpr query expression.
Specified by:
evaluate in interface dkDatastore
Overrides:
evaluate in class dkAbstractDatastore
Parameters:
qe - a common query expression object
Returns:
a collection of the results
Throws:
DKException - if a problem is encountered.

execute

public dkResultSetCursor execute(java.lang.String command,
                                 short commandLangType,
                                 DKNVPair[] params)
                          throws DKException,
                                 java.lang.Exception
Runs the query.
Specified by:
execute in interface dkDatastore
Overrides:
execute in class dkAbstractDatastore
Parameters:
command - a query string.
commandLang - a query type.
params - additional query option in the form of aname/value pair.
Returns:
resultSetCursor which represents a datastore cursor.
Throws:
DKException - if a problem is encountered.

execute

public dkResultSetCursor execute(dkQuery query)
                          throws DKException,
                                 java.lang.Exception
Runs the query.
Specified by:
execute in interface dkDatastore
Overrides:
execute in class dkAbstractDatastore
Parameters:
query - a query object.
Returns:
resultSetCursor which represents a datastore cursor.
Throws:
DKException - if a problem is encountered.

execute

public dkResultSetCursor execute(DKCQExpr cqe)
                          throws DKException,
                                 java.lang.Exception
Runs a query expression and returns a result set cursor.
Specified by:
execute in interface dkDatastore
Overrides:
execute in class dkAbstractDatastore
Parameters:
cqe - a common query expression object
Returns:
resultSetCursor which represents a datastore cursor.
Throws:
DKException - if a problem is encountered.

executeWithCallback

public void executeWithCallback(dkQuery query,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Runs the query with callback function using a dkQuery object.
Specified by:
executeWithCallback in interface dkDatastore
Overrides:
executeWithCallback in class dkAbstractDatastore
Parameters:
qo - a query object.
callbackObj - a dkCallback object.
Throws:
DKException - if a problem is encountered.

executeWithCallback

public void executeWithCallback(java.lang.String command,
                                short commandLangType,
                                DKNVPair[] params,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Runs the query with callback function.
Specified by:
executeWithCallback in interface dkDatastore
Overrides:
executeWithCallback in class dkAbstractDatastore
Parameters:
command - a query string.
commandLang - a query type.
params - additional query option in the form of a name/value pair.
callbackObj - a dkCallback object.
Throws:
DKException - if a problem is encountered.

executeWithCallback

public void executeWithCallback(DKCQExpr qe,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Runs the query with callback function using a DKCQExpr query expression.
Specified by:
executeWithCallback in interface dkDatastore
Overrides:
executeWithCallback in class dkAbstractDatastore
Parameters:
qe - a common query expression object.
callbackObj - a dkCallback object.
Throws:
DKException - if a problem is encountered.

createQuery

public dkQuery createQuery(java.lang.String command,
                           short commandLangType,
                           DKNVPair[] params)
                    throws DKException,
                           java.lang.Exception
Creates a query object.
Specified by:
createQuery in interface dkDatastore
Overrides:
createQuery in class dkAbstractDatastore
Parameters:
command - a query string.
commandLang - a query type.
params - additional query option in the form of a name/value pair.
Returns:
a query object.
Throws:
DKException - if a problem is encountered.

createQuery

public dkQuery createQuery(DKCQExpr qe)
                    throws DKException,
                           java.lang.Exception
Creates a query object using a DKCQExpr query expression.
Specified by:
createQuery in interface dkDatastore
Overrides:
createQuery in class dkAbstractDatastore
Parameters:
qe - a common query expression object.
Returns:
a query object.
Throws:
DKException - if a problem is encountered.

addObject

public void addObject(dkDataObject ddo)
               throws DKException,
                      java.lang.Exception
Adds this data-object to the Content Manager datastore.
Specified by:
addObject in interface dkDatastore
Overrides:
addObject in class dkAbstractDatastore
Parameters:
ddo - the data-object to be added to this datastore.
Throws:
DKException - if a problem is encountered.
See Also:
DKDDO.add()

deleteObject

public void deleteObject(dkDataObject ddo)
                  throws DKException,
                         java.lang.Exception
Deletes this data-object from the Content Manger datastore.
Specified by:
deleteObject in interface dkDatastore
Overrides:
deleteObject in class dkAbstractDatastore
Parameters:
ddo - the data-object to be deleted from this datastore.
Throws:
DKException - if a problem is encountered.
See Also:
DKDDO.del()

retrieveObject

public void retrieveObject(dkDataObject ddo)
                    throws DKException,
                           java.lang.Exception
Retrieves the data-object from the Content Manager datastore.
Specified by:
retrieveObject in interface dkDatastore
Overrides:
retrieveObject in class dkAbstractDatastore
Parameters:
ddo - the data-object to be retrieved from this datastore.
Throws:
DKException - if a problem is encountered.
See Also:
DKDDO.retrieve()

updateObject

public void updateObject(dkDataObject ddo)
                  throws DKException,
                         java.lang.Exception
Updates the data-object in this datastore.
Specified by:
updateObject in interface dkDatastore
Overrides:
updateObject in class dkAbstractDatastore
Parameters:
ddo - the data-object to be updated in this datastore.
Throws:
DKException - if a problem is encountered.
See Also:
DKDDO.update()

moveObject

public void moveObject(dkDataObject ddo,
                       java.lang.String entityName)
                throws DKException,
                       java.lang.Exception
Moves the data-object from one index class to another in this datastore.
Specified by:
moveObject in interface dkDatastoreIntDL
Parameters:
ddo - the data-object to be move in this datastore.
entityName - new entity name to move this data-object to.
Throws:
DKException - if a problem is encountered.

startTransaction

public void startTransaction()
                      throws DKException,
                             java.lang.Exception
Starts a transaction.
Specified by:
startTransaction in interface dkDatastoreIntDL
Overrides:
startTransaction in class dkAbstractDatastore
Throws:
DKException - if a problem is encountered.

commit

public void commit()
            throws DKException,
                   java.lang.Exception
Commits a datastore transaction.
Specified by:
commit in interface dkDatastore
Overrides:
commit in class dkAbstractDatastore
Throws:
DKException - if a problem is encountered.

rollback

public void rollback()
              throws DKException,
                     java.lang.Exception
Rollbacks a datastore transaction.
Specified by:
rollback in interface dkDatastore
Overrides:
rollback in class dkAbstractDatastore
Throws:
DKException - if a problem is encountered.

isConnected

public boolean isConnected()
                    throws java.lang.Exception
Checks to see if the datastore is connected.
Specified by:
isConnected in interface dkDatastore
Overrides:
isConnected in class dkAbstractDatastore
Returns:
true, if connected

datastoreName

public java.lang.String datastoreName()
                               throws java.lang.Exception
Gets the name of this datastore object. Usually the return string represents the server name of the datastore.
Specified by:
datastoreName in interface dkDatastore
Overrides:
datastoreName in class dkAbstractDatastore
Returns:
datastore name.

datastoreType

public java.lang.String datastoreType()
                               throws java.lang.Exception
Gets the datastore type for this datastore.
Specified by:
datastoreType in interface dkDatastore
Overrides:
datastoreType in class dkAbstractDatastore
Returns:
datastore type

connection

public DKHandle connection()
                    throws java.lang.Exception
Gets the connection handle for a datastore.
Specified by:
connection in interface dkDatastore
Overrides:
connection in class dkAbstractDatastore
Returns:
connection handle

handle

public DKHandle handle(java.lang.String type)
                throws java.lang.Exception
Gets a datastore handle.
Specified by:
handle in interface dkDatastore
Overrides:
handle in class dkAbstractDatastore
Parameters:
type - type of datastore handle wanted
Returns:
a datastore handle

transactionConnection

public DKHandle transactionConnection()
                               throws DKException,
                                      java.lang.Exception
Gets the transaction handle for a datastore.
Specified by:
transactionConnection in interface dkDatastoreIntDL
Returns:
transaction handle

userName

public java.lang.String userName()
                          throws java.lang.Exception
Gets the user name for this datastore.
Specified by:
userName in interface dkDatastore
Overrides:
userName in class dkAbstractDatastore
Returns:
user name

listDataSources

public dkCollection listDataSources()
                             throws DKException,
                                    java.lang.Exception
Lists the available datastores that can be used to connect with.
Specified by:
listDataSources in interface dkDatastore
Overrides:
listDataSources in class dkAbstractDatastore
Returns:
a collection of server definitions.
Throws:
DKException - if a problem is encountered.

listDataSourceNames

public java.lang.String[] listDataSourceNames()
                                       throws DKException,
                                              java.lang.Exception
Lists the available datastore server names that can be used to connect with.
Specified by:
listDataSourceNames in interface dkDatastore
Overrides:
listDataSourceNames in class dkAbstractDatastore
Returns:
an array of server names.
Throws:
DKException - if a problem is encountered.

listServers

public java.lang.Object listServers()
                             throws DKException,
                                    java.lang.Exception
Deprecated. Replace by listDataSources.

Lists the available datastore server definitions that can be used to connect with.
Specified by:
listServers in interface dkDatastore
Overrides:
listServers in class dkAbstractDatastore
Returns:
a collection of server definitions.
Throws:
DKException - if a problem is encountered.
See Also:
listDataSources()

listSchema

public java.lang.Object listSchema()
                            throws DKUsageError
Deprecated. Replace by listEntities.

Lists the entities that belong to this datastore.
Specified by:
listSchema in interface dkDatastore
Overrides:
listSchema in class dkAbstractDatastore
Returns:
an object that contains the schema.
Throws:
DKUsageError - if a problem is encountered.
See Also:
listEntities()

listSchemaAttributes

public java.lang.Object listSchemaAttributes(java.lang.String schemaEntry)
                                      throws DKUsageError,
                                             DKDatastoreAccessError
Deprecated. Replace by listEntityAttributes

Lists the attributes that belong to a schema.
Specified by:
listSchemaAttributes in interface dkDatastore
Overrides:
listSchemaAttributes in class dkAbstractDatastore
Parameters:
schemaEntry - the name of the schema.
Returns:
an object that contains the attributes that belong to this schema.
Throws:
DKUsageError - if a problem is encountered in the call.
DKUsageError - if a problem is encountered accessing the datastore.
See Also:
listEntityAttrs(java.lang.String)

listEntities

public dkCollection listEntities()
                          throws DKException,
                                 java.lang.Exception
Gets a list of entities from persistent datastore.
Specified by:
listEntities in interface dkDatastore
Overrides:
listEntities in class dkAbstractDatastore
Returns:
a collection of entity definitions.
Throws:
DKException - if error occurs.

listEntityNames

public java.lang.String[] listEntityNames()
                                   throws DKException,
                                          java.lang.Exception
Gets a list of entity names from persistent datastore.
Specified by:
listEntityNames in interface dkDatastore
Overrides:
listEntityNames in class dkAbstractDatastore
Returns:
an array of entity names.
Throws:
DKException - if error occurs.

listEntityAttrs

public dkCollection listEntityAttrs(java.lang.String entityName)
                             throws DKException,
                                    java.lang.Exception
Gets a list of attributes for a given entity name.
Specified by:
listEntityAttrs in interface dkDatastore
Overrides:
listEntityAttrs in class dkAbstractDatastore
Parameters:
entityName - name of entity to retrieve attributes for.
Returns:
a dkCollection of dkAttrDef objects.
Throws:
DKException - if the entity name does not exist.

listEntityAttrNames

public java.lang.String[] listEntityAttrNames(java.lang.String entityName)
                                       throws DKException,
                                              java.lang.Exception
Gets a list of attribute names for a given entity name.
Specified by:
listEntityAttrNames in interface dkDatastore
Overrides:
listEntityAttrNames in class dkAbstractDatastore
Parameters:
entityName - name of entity to retrieve attribute names for.
Returns:
an array of attribute names.
Throws:
DKException - if the entity name does not exist.

listAttrs

public dkCollection listAttrs()
                       throws DKException,
                              java.lang.Exception
Gets a list of attributes defined in the current datastore.
Specified by:
listAttrs in interface dkDatastoreIntDL
Returns:
a dkCollection of dkAttrDef objects.
Throws:
DKException - if the entity name does not exist.

listAttrNames

public java.lang.String[] listAttrNames()
                                 throws DKException,
                                        java.lang.Exception
Gets a list of attribute names defined in the current datastore.
Specified by:
listAttrNames in interface dkDatastoreIntDL
Returns:
an array of attribute names.
Throws:
DKException - if the entity name does not exist.

wakeUpService

public void wakeUpService(java.lang.String searchEngine)
                   throws DKException,
                          java.lang.Exception
Deprecated. Replace by invokeSearchEngine.

Wakes up a user exit to process search index request.
Specified by:
wakeUpService in interface dkDatastoreIntDL
Parameters:
searchEngine - search engine name (SM).
See Also:
invokeSearchEngine(String,String)

invokeSearchEngine

public void invokeSearchEngine(java.lang.String searchEngine,
                               java.lang.String searchIndex)
                        throws DKException,
                               java.lang.Exception
Invokes a user exit to process search index request.
Specified by:
invokeSearchEngine in interface dkDatastoreIntDL
Parameters:
searchEngine - search engine name (ie SM or QBIC).
searchIndex - search index (ie TM-TMINDEX or QBICDB-QBICCAT-QBICSRV).

datastoreDef

public dkDatastoreDef datastoreDef()
Gets the datastore definition.
Specified by:
datastoreDef in interface dkDatastore
Overrides:
datastoreDef in class dkAbstractDatastore
Returns:
the meta-data (dkDatastoreDef) of this datastore.

createWorkFlowService

public DKWorkFlowServiceDL createWorkFlowService()
                                          throws DKException,
                                                 java.lang.Exception
Gets the Content Manager work flow service.
Specified by:
createWorkFlowService in interface dkDatastoreIntDL
Returns:
the a work flow service for this datastore.

registerMapping

public java.lang.String registerMapping(DKNVPair sourceMap)
                                 throws DKException,
                                        java.lang.Exception
Registers a mapping definition to this datastore. The mapping is done by entities.
Specified by:
registerMapping in interface dkDatastore
Overrides:
registerMapping in class dkAbstractDatastore
Parameters:
sourceMap - source name and mapping, a DKNVPair class with the following possible values:
  • ("BUFFER", buffer_ref) : buffer_ref is a reference to a string in memory
  • ("FILE", file_name) : file_name is the name of the file containing the mapping
  • ("URL", url_address) : URL-address location of the mapping
  • ("LDAP", LDAP_file) : LDAP file-name
  • ("SCHEMA", object_ref) : a reference to a dkSchemaMapping object defining the mapping.
Currently, only SCHEMA option is supported, others may be added later.
Returns:
the name of the mapping definition.
Throws:
DKException - if error occurs.
See Also:
unRegisterMapping(java.lang.String)

unRegisterMapping

public void unRegisterMapping(java.lang.String mappingName)
                       throws DKException,
                              java.lang.Exception
Unregisters mapping information from this datastore.
Specified by:
unRegisterMapping in interface dkDatastore
Overrides:
unRegisterMapping in class dkAbstractDatastore
Parameters:
mappingName - name of the mapping information.
Throws:
DKException - if error occurs.
See Also:
registerMapping(com.ibm.mm.sdk.common.DKNVPair)

listMappingNames

public java.lang.String[] listMappingNames()
                                    throws DKException,
                                           java.lang.Exception
Gets the list of the registered mappings from this datastore.
Specified by:
listMappingNames in interface dkDatastore
Overrides:
listMappingNames in class dkAbstractDatastore
Returns:
an array of registered mapping objects' names.
Throws:
DKException - if error occurs.
See Also:
registerMapping(com.ibm.mm.sdk.common.DKNVPair)

getMapping

public dkSchemaMapping getMapping(java.lang.String mappingName)
                           throws DKException,
                                  java.lang.Exception
Gets a mapping information from this datastore.
Specified by:
getMapping in interface dkDatastore
Overrides:
getMapping in class dkAbstractDatastore
Parameters:
mappingName - name of the mapping information.
Returns:
the schema mapping object.
Throws:
DKException - if error occurs.
See Also:
registerMapping(com.ibm.mm.sdk.common.DKNVPair)

getExtension

public dkExtension getExtension(java.lang.String extensionName)
                         throws DKException,
                                java.lang.Exception
Gets the extension object from a given extenstion name.
Specified by:
getExtension in interface dkDatastore
Overrides:
getExtension in class dkAbstractDatastore
Parameters:
extensionName - name of the extension object.
Returns:
extension object.
Throws:
DKException - if error occurs.

addExtension

public void addExtension(java.lang.String extensionName,
                         dkExtension extensionObj)
                  throws DKException,
                         java.lang.Exception
Adds a new extension object.
Specified by:
addExtension in interface dkDatastore
Overrides:
addExtension in class dkAbstractDatastore
Parameters:
extensionName - name of new extension object.
extensionObj - the extension object to be set.
Throws:
DKException - if error occurs.

removeExtension

public void removeExtension(java.lang.String extensionName)
                     throws DKException,
                            java.lang.Exception
Removes an existing extension object.
Specified by:
removeExtension in interface dkDatastore
Overrides:
removeExtension in class dkAbstractDatastore
Parameters:
extensionName - name of extension object to be removed.
Throws:
DKException - if error occurs.

listExtensionNames

public java.lang.String[] listExtensionNames()
                                      throws DKException,
                                             java.lang.Exception
Gets the list of the names of the extension objects.
Specified by:
listExtensionNames in interface dkDatastore
Overrides:
listExtensionNames in class dkAbstractDatastore
Returns:
an array of extension objects names.
Throws:
DKException - if error occurs.

createDDO

public DKDDO createDDO(java.lang.String objectType,
                       int Flags)
                throws DKException,
                       java.lang.Exception
Creates a new DDO with object type, properties and attributes set for a Content Manager datastore.
Specified by:
createDDO in interface dkDatastore
Overrides:
createDDO in class dkAbstractDatastore
Parameters:
objectType - the object type you want to create.
Flags - to indicate various options to specify more detailed characteristics of the DDO to create. Valid values are: DK_CM_DOCUMENT - to create a document DDO, DK_CM_FOLDER - to create a folder DDO. If no flag is supplied (Flags equals zero) the default will be DK_CM_DOCUMENT.
Returns:
a new DDO of the given object type with all the properties and attributes set, so that you only need to set the attribute values.
Throws:
DKException - if error occurs.

destroy

public void destroy()
             throws DKException,
                    java.lang.Exception
Destroys the datastore object. This method performs the datastore object cleanup if needed.
Specified by:
destroy in interface dkDatastore
Overrides:
destroy in class dkAbstractDatastore
Throws:
DKException - if error occurs.

isCheckedOut

public boolean isCheckedOut(dkDataObject dobj)
                     throws DKUsageError,
                            DKDatastoreAccessError
Checks whether a document or folder is checked out from datastore.
Specified by:
isCheckedOut in interface dkDatastoreIntDL
Parameters:
dobj - data object (document or folder item).
Returns:
a boolean indicating if it is checked out or not.
Throws:
DKUsageError - if an error occurs in the call.
DKDatastoreAccessError - if an error occurs at the datastore.

checkedOutUserid

public java.lang.String checkedOutUserid(dkDataObject dobj)
                                  throws DKUsageError,
                                         DKDatastoreAccessError
Lists the user ID who has checked out the document or folder.
Specified by:
checkedOutUserid in interface dkDatastoreIntDL
Parameters:
dobj - data object (document or folder item).
Returns:
a userid or empty string (i.e., not checked out).
Throws:
DKUsageError - if an error occurs in the call.
DKDatastoreAccessError - if an error occurs at the datastore.

unlockCheckedOut

public void unlockCheckedOut(dkDataObject dobj)
                      throws DKUsageError,
                             DKDatastoreAccessError
Unlocks a checked-out document or folder item.
Specified by:
unlockCheckedOut in interface dkDatastoreIntDL
Parameters:
dobj - data object (document or folder item).
Throws:
DKUsageError - if an error occurs in the call.
DKDatastoreAccessError - if an error occurs at the datastore.

checkOut

public void checkOut(dkDataObject dobj)
              throws DKUsageError,
                     DKDatastoreAccessError
Checks out a document or folder item from the datastore.
Specified by:
checkOut in interface dkDatastoreIntDL
Parameters:
dobj - data object (document or folder item).
Throws:
DKUsageError - if an error occurs in the call.
DKDatastoreAccessError - if an error occurs at the datastore.

checkIn

public void checkIn(dkDataObject dobj)
             throws DKUsageError,
                    DKDatastoreAccessError
Checks in a document or folder item from datastore.
Specified by:
checkIn in interface dkDatastoreIntDL
Parameters:
dobj - data object (document or folder item).
Throws:
DKUsageError - if an error occurs in the call.
DKDatastoreAccessError - if an error occurs at the datastore.

changePassword

public void changePassword(java.lang.String userId,
                           java.lang.String oldPwd,
                           java.lang.String newPwd)
                    throws DKException,
                           java.lang.Exception
Changes the library server user password.
Specified by:
changePassword in interface dkDatastore
Overrides:
changePassword in class dkAbstractDatastore
Parameters:
userId - the library server user ID.
oldPwd - the old password.
newPwd - the new password.
Throws:
DKException - if an error occurs.

retrieveFormOverlay

public dkXDO retrieveFormOverlay(java.lang.String objid)
                          throws DKException,
                                 java.lang.Exception
Retrieves the form overlay object.
Specified by:
retrieveFormOverlay in interface dkDatastoreIntDL
Parameters:
id - the ID string to retrieve the object.
Returns:
the form overlay XDO object.
Throws:
DKException - if an error occurs.

listRefFolders

public java.lang.String[] listRefFolders(dkDataObject ddo)
                                  throws DKException,
                                         java.lang.Exception
Lists the reference folders for a given document or folder.
Specified by:
listRefFolders in interface dkDatastoreIntDL
Parameters:
ddo - the data-object to find folder references for.
Throws:
DKException - if an error occurs.

translate

public DKCQExpr translate(DKCQExpr cqe)
                   throws DKException,
                          java.lang.Exception
Translates a query expression into a native query expression processable by this datastore.
Parameters:
cqe - the input compound query expression.
Returns:
a translated query expression or null if the expression is invalid.
Throws:
DKException - if an error occurs.

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.