Enterprise Information Portal APIs

com.ibm.mm.sdk.server
Class DKDatastoreV4

java.lang.Object
  |
  +--com.ibm.mm.sdk.server.dkAbstractDatastore
        |
        +--com.ibm.mm.sdk.server.DKDatastoreV4
All Implemented Interfaces:
DKConstant, DKConstantV4, dkDatastore, dkDatastoreIntV4, DKMessageId, DKMessageIdV4, dkQueryEvaluator, dkQueryManager

public class DKDatastoreV4
extends dkAbstractDatastore
implements dkDatastoreIntV4, DKConstantV4, DKMessageIdV4

DKDatastoreV4 is the VI400 implementation of dkDatastore. It provides Documents, Parts, and Folders storage and retrieval mechanisms. It also provides other document processing capabilities supported by the VI400.


Fields inherited from interface com.ibm.mm.sdk.common.DKConstantV4
    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.DKMessageIdV4
copyright, DK_V4_MSG_MSGID_NOT_FOUND
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKDatastoreV4()
          Constructs and initializes the datastore.
DKDatastoreV4(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 the given ddo to this datastore.
 java.lang.String checkedOutUserid(dkDataObject dobj)
          List the userid who checked out the document or folder
 void checkIn(dkDataObject dobj)
          Check in(un-lock) a document or folder item from datastore
 void checkOut(dkDataObject dobj)
          Check out(lock) a document or folder item from datastore
 void commit()
          commit is not supported by this datastore type
 void connect(java.lang.String datastore_name, java.lang.String user_name, java.lang.String authentication, java.lang.String connect_string)
          Connects to a 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 given backend server.
 dkQuery createQuery(DKCQExpr qe)
          Creates a query object.
 dkQuery createQuery(java.lang.String command, short commandLangType, DKNVPair[] params)
          Creates a query object.
 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 object
 void deleteObject(dkDataObject ddo)
          Deletes the specified ddo from this datastore.
 void destroy()
          datastore destroy - datastore cleanup if needed
 void disconnect()
          Disconnects from a datastore.
 java.lang.Object evaluate(DKCQExpr qe)
          evaluates the query.
 java.lang.Object evaluate(dkQuery query)
          evaluates the query.
 java.lang.Object evaluate(java.lang.String command, short commandLangType, DKNVPair[] params)
          evaluates the query.
 dkResultSetCursor execute(DKCQExpr cqe)
          executes a query expression and returns a result set cursor
 dkResultSetCursor execute(dkQuery query)
          executes the query.
 dkResultSetCursor execute(java.lang.String command, short commandLangType, DKNVPair[] params)
          executes the query.
 void executeWithCallback(DKCQExpr qe, dkCallback callbackObj)
          execute the query with callback function.
 void executeWithCallback(dkQuery query, dkCallback callbackObj)
          execute the query with callback function.
 void executeWithCallback(java.lang.String command, short commandLangType, DKNVPair[] params, dkCallback callbackObj)
          execute 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 the 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
 boolean isCheckedOut(dkDataObject dobj)
          Check whether a document or folder item is checked out from datastore
 boolean isConnected()
          Checks to see if the datastore is connected.
 java.lang.String[] listDataSourceNames()
          List the available datastore source names that can be used to connect with.
 dkCollection listDataSources()
          List the available datastore sources 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 extension object names
 java.lang.String[] listMappingNames()
          Gets the list of the register mappings for this datastore
 java.lang.Object listSchema()
          Deprecated. Replaced by listEntities
 java.lang.Object listSchemaAttributes(java.lang.String schemaEntry)
          Deprecated. Replaced by listEntityAttrs
 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 the mapping definition to this datastore Mapping is done by entities.
 void removeExtension(java.lang.String extensionName)
          Remove an existing extension object
 dkXDO retrieveFormOverlay(java.lang.String objid)
          Retrieves the form overlay object
 void retrieveObject(dkDataObject ddo)
          Retrieves the ddo from this datastore.
 void rollback()
          Rollback is not supported by this datastore type
 void setOption(int option, java.lang.Object value)
          Sets a datastore option.
 void startTransaction()
          startTransaction is not supported by this datastore type
 DKHandle transactionConnection()
          Gets the transaction handle for a datastore - not supported by this datastore type
 DKCQExpr translate(DKCQExpr cqe)
          Translate a query expression into a native query expression processable by this datastore.
 void unlockCheckedOut(dkDataObject dobj)
          Unlock the checked-out document or folder item
 void unRegisterMapping(java.lang.String mappingName)
          Unregisters the mapping information from this datastore
 void updateObject(dkDataObject ddo)
          Updates the specified ddo in this datastore.
 java.lang.String userName()
          Gets the user name for this datastore object
 
Methods inherited from class com.ibm.mm.sdk.server.dkAbstractDatastore
addObject, addObject, addObjects, addObjects, addObjects, changePassword, 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.dkDatastoreIntV4
addFolderItem, removeFolderItem
 
Methods inherited from interface com.ibm.mm.sdk.common.dkDatastore
addObject, addObject, addObjects, addObjects, addObjects, changePassword, 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

DKDatastoreV4

public DKDatastoreV4()
              throws DKException,
                     java.lang.Exception
Constructs and initializes the datastore.
Throws:
DKException - if error detected
java.lang.Exception - if error detected

DKDatastoreV4

public DKDatastoreV4(java.lang.String configuration)
              throws DKException,
                     java.lang.Exception
Constructs the datastore and initializes the datastore.
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 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 error detected
java.lang.Exception - if error detected

disconnect

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

getOption

public java.lang.Object getOption(int option)
                           throws DKException,
                                  java.lang.Exception
Gets a datastore option.
Specified by:
getOption in interface dkDatastore
Overrides:
getOption in class dkAbstractDatastore
Parameters:
option - the option identifier
Returns:
an option value
Throws:
DKException - if error detected
java.lang.Exception - if error detected

setOption

public void setOption(int option,
                      java.lang.Object value)
               throws DKException,
                      java.lang.Exception
Sets a datastore option.
Specified by:
setOption in interface dkDatastore
Overrides:
setOption in class dkAbstractDatastore
Parameters:
option - the option identifier
value - the option value
Throws:
DKException - if error detected
java.lang.Exception - if error detected

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
commandLangType - a query type
params - additional query option in name/value pair
Returns:
a collection of the results
Throws:
DKException - if error detected
java.lang.Exception - if error detected

evaluate

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

evaluate

public java.lang.Object evaluate(DKCQExpr qe)
                          throws DKException,
                                 java.lang.Exception
evaluates the query.
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 error detected
java.lang.Exception - if error detected

execute

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

execute

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

execute

public dkResultSetCursor execute(DKCQExpr cqe)
                          throws DKException,
                                 java.lang.Exception
executes 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.

executeWithCallback

public void executeWithCallback(dkQuery query,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
execute the query with callback function.
Specified by:
executeWithCallback in interface dkDatastore
Overrides:
executeWithCallback in class dkAbstractDatastore
Parameters:
query - a dkQuery object
callbackObj - a dkCallback object
Throws:
DKException - if error detected
java.lang.Exception - if error detected

executeWithCallback

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

executeWithCallback

public void executeWithCallback(DKCQExpr qe,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
execute the query with callback function.
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 error detected
java.lang.Exception - if error detected

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
commandLangType - a query type
params - additional query option in name/value pair
Returns:
a dkQuery object
Throws:
DKException - if error detected
java.lang.Exception - if error detected

createQuery

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

addObject

public void addObject(dkDataObject ddo)
               throws DKException,
                      java.lang.Exception
Adds the given ddo to this datastore.
Specified by:
addObject in interface dkDatastore
Overrides:
addObject in class dkAbstractDatastore
Parameters:
ddo - the ddo to be added to this datastore
Throws:
DKException - if error detected
java.lang.Exception - if error detected
See Also:
#add()

deleteObject

public void deleteObject(dkDataObject ddo)
                  throws DKException,
                         java.lang.Exception
Deletes the specified ddo from this datastore.
Specified by:
deleteObject in interface dkDatastore
Overrides:
deleteObject in class dkAbstractDatastore
Parameters:
ddo - the ddo to be deleted from this datastore
Throws:
DKException - if error detected
java.lang.Exception - if error detected
See Also:
del()

retrieveObject

public void retrieveObject(dkDataObject ddo)
                    throws DKException,
                           java.lang.Exception
Retrieves the ddo from this datastore.
Specified by:
retrieveObject in interface dkDatastore
Overrides:
retrieveObject in class dkAbstractDatastore
Parameters:
ddo - the ddo to be retrieved from this datastore
Throws:
DKException - if error detected
java.lang.Exception - if error detected
See Also:
#retrieve()

updateObject

public void updateObject(dkDataObject ddo)
                  throws DKException,
                         java.lang.Exception
Updates the specified ddo in this datastore.
Specified by:
updateObject in interface dkDatastore
Overrides:
updateObject in class dkAbstractDatastore
Parameters:
ddo - the ddo to be updated in this datastore
Throws:
DKException - if error detected
java.lang.Exception - if error detected
See Also:
#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 dkDatastoreIntV4
Parameters:
ddo - the data-object to be move in this datastore
entityName - new entity name to move this data-object to

startTransaction

public void startTransaction()
                      throws DKException,
                             java.lang.Exception
startTransaction is not supported by this datastore type
Specified by:
startTransaction in interface dkDatastoreIntV4
Overrides:
startTransaction in class dkAbstractDatastore
Throws:
DKException - always
java.lang.Exception - always

commit

public void commit()
            throws DKException,
                   java.lang.Exception
commit is not supported by this datastore type
Specified by:
commit in interface dkDatastore
Overrides:
commit in class dkAbstractDatastore
Throws:
DKException - always
java.lang.Exception - always

rollback

public void rollback()
              throws DKException,
                     java.lang.Exception
Rollback is not supported by this datastore type
Specified by:
rollback in interface dkDatastore
Overrides:
rollback in class dkAbstractDatastore
Throws:
DKException - always
java.lang.Exception - always

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
Throws:
java.lang.Exception - if error detected

datastoreName

public java.lang.String datastoreName()
                               throws java.lang.Exception
Gets the name of this datastore object. Usually it represents a datastore source's server name.
Specified by:
datastoreName in interface dkDatastore
Overrides:
datastoreName in class dkAbstractDatastore
Returns:
datastore name
Throws:
java.lang.Exception - if error detected

datastoreType

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

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
Throws:
java.lang.Exception - if error detected

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 - not supported by this datastore type
Specified by:
transactionConnection in interface dkDatastoreIntV4
Returns:
null always
Throws:
DKException - if error detected
java.lang.Exception - if error detected

userName

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

listDataSources

public dkCollection listDataSources()
                             throws DKException,
                                    java.lang.Exception
List the available datastore sources that can be used to connect with.
Specified by:
listDataSources in interface dkDatastore
Overrides:
listDataSources in class dkAbstractDatastore
Returns:
a collection of server definitions (DKServerDefV4)
Throws:
DKException - if error detected
java.lang.Exception - if error detected

listDataSourceNames

public java.lang.String[] listDataSourceNames()
                                       throws DKException,
                                              java.lang.Exception
List the available datastore source 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 error detected
java.lang.Exception - if error detected

listServers

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

List the available datastore sources that can be used to connect with.
Specified by:
listServers in interface dkDatastore
Overrides:
listServers in class dkAbstractDatastore
Returns:
a collection of server definitions (DKServerDefV4)
Throws:
DKException - if error detected
java.lang.Exception - if error detected
See Also:
listDataSources()

listSchema

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

List the entities that belong to this datastore
Specified by:
listSchema in interface dkDatastore
Overrides:
listSchema in class dkAbstractDatastore
Returns:
an object (String) that contains the schema
Throws:
DKUsageError - if error detected
See Also:
listEntities()

listSchemaAttributes

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

List 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 (DKAttributeDef) that contains the attributes that belong to this schema
Throws:
DKUsageError - if error detected
DKDatastoreAccessError - if error detected
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 defs
Throws:
DKException - if error detected
java.lang.Exception - if error detected

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
java.lang.Exception - if error detected

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 - the name of entity to retrieve attributes for
Returns:
a dkCollection of dkAttrDef objects
Throws:
DKException - if the entity name does not exist
java.lang.Exception - if error detected

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 - the name of entity to retrieve attribute names for
Returns:
an array of attribute names
Throws:
DKException - if the entity name does not exist
java.lang.Exception - if error detected

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

registerMapping

public java.lang.String registerMapping(DKNVPair sourceMap)
                                 throws DKException,
                                        java.lang.Exception
Registers the mapping definition to this datastore 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: Currently, only "SCHEMA" option is supported, others may be added later.
Returns:
the mapping name for the mapping definition
Throws:
DKException - if error detected
java.lang.Exception - if error detected
See Also:
unRegisterMapping(java.lang.String)

unRegisterMapping

public void unRegisterMapping(java.lang.String mappingName)
                       throws DKException,
                              java.lang.Exception
Unregisters the 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 detected
java.lang.Exception - if error detected
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 register mappings for this datastore
Specified by:
listMappingNames in interface dkDatastore
Overrides:
listMappingNames in class dkAbstractDatastore
Returns:
an array of registered mapping objects' names, or null if there is no registered mapping object
Throws:
DKException - if error detected
java.lang.Exception - if error detected
See Also:
registerMapping(com.ibm.mm.sdk.common.DKNVPair)

getMapping

public dkSchemaMapping getMapping(java.lang.String mappingName)
                           throws DKException,
                                  java.lang.Exception
Gets the mapping information from this datastore
Specified by:
getMapping in interface dkDatastore
Overrides:
getMapping in class dkAbstractDatastore
Parameters:
mappingName - the name of the mapping information
Returns:
the schema mapping object
Throws:
DKException - if error detected
java.lang.Exception - if error detected
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 - the name of the extension object.
Returns:
the extension object found, or one of the supported objects: PDatastoreDefImpV4, PAccessControlImpV4, PLobImpV4, or DKDatastoreExtV4.
Throws:
DKException - if error detected
java.lang.Exception - if error detected

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 - the name of new extension object
extensionObj - the extension object to be set
Throws:
DKException - if error detected
java.lang.Exception - if error detected

removeExtension

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

listExtensionNames

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

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 given backend server.
Specified by:
createDDO in interface dkDatastore
Overrides:
createDDO in class dkAbstractDatastore
Parameters:
objectType - the object type 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 the user only needs to set the attribute values
Throws:
DKException - if error detected
java.lang.Exception - if error detected

destroy

public void destroy()
             throws DKException,
                    java.lang.Exception
datastore destroy - datastore cleanup if needed
Specified by:
destroy in interface dkDatastore
Overrides:
destroy in class dkAbstractDatastore

isCheckedOut

public boolean isCheckedOut(dkDataObject dobj)
                     throws DKUsageError,
                            DKDatastoreAccessError
Check whether a document or folder item is checked out from datastore
Specified by:
isCheckedOut in interface dkDatastoreIntV4
Parameters:
dobj - data object (document or folder item)
Returns:
a boolean indicating if it is checked out or not

checkedOutUserid

public java.lang.String checkedOutUserid(dkDataObject dobj)
                                  throws DKUsageError,
                                         DKDatastoreAccessError
List the userid who checked out the document or folder
Specified by:
checkedOutUserid in interface dkDatastoreIntV4
Parameters:
dobj - data object (document or folder item)
Returns:
a userid or empty string (i.e., not checked out)

unlockCheckedOut

public void unlockCheckedOut(dkDataObject dobj)
                      throws DKUsageError,
                             DKDatastoreAccessError
Unlock the checked-out document or folder item
Specified by:
unlockCheckedOut in interface dkDatastoreIntV4
Parameters:
dobj - data object (document or folder item)

checkOut

public void checkOut(dkDataObject dobj)
              throws DKUsageError,
                     DKDatastoreAccessError
Check out(lock) a document or folder item from datastore
Specified by:
checkOut in interface dkDatastoreIntV4
Parameters:
dobj - the dkDataObject(document or folder item) to be checked out
Throws:
DKUsageError - if error detected
DKDatastoreAccessError - if error detected

checkIn

public void checkIn(dkDataObject dobj)
             throws DKUsageError,
                    DKDatastoreAccessError
Check in(un-lock) a document or folder item from datastore
Specified by:
checkIn in interface dkDatastoreIntV4
Parameters:
dobj - the dkDataObject(document or folder item) to be checked in
Throws:
DKUsageError - if error detected
DKDatastoreAccessError - if error detected

retrieveFormOverlay

public dkXDO retrieveFormOverlay(java.lang.String objid)
                          throws DKException,
                                 java.lang.Exception
Retrieves the form overlay object
Specified by:
retrieveFormOverlay in interface dkDatastoreIntV4
Parameters:
id - the id string to retrieve the object
Returns:
the form overlay xdo object

translate

public DKCQExpr translate(DKCQExpr cqe)
                   throws DKException,
                          java.lang.Exception
Translate 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

EIP Java APIs

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