Enterprise Information Portal APIs

com.ibm.mm.sdk.server
Class DKDatastoreOD

java.lang.Object
  |
  +--com.ibm.mm.sdk.server.dkAbstractDatastore
        |
        +--com.ibm.mm.sdk.server.DKDatastoreOD
All Implemented Interfaces:
DKConstant, DKConstantOD, dkDatastore, dkDatastoreIntOD, DKMessageId, DKMessageIdOD, dkQueryEvaluator, dkQueryManager

public class DKDatastoreOD
extends dkAbstractDatastore
implements dkDatastoreIntOD, DKConstantOD, DKMessageIdOD

DKDatastoreOD is the OnDemand implementation of dkDatastore. It provides Document, Part, and Folder storage and retrieval mechanisms for working with OnDemand content servers.


Field Summary
static long dll_count
           
 
Fields inherited from interface com.ibm.mm.sdk.common.DKConstantOD
    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.DKMessageIdOD
DK_OD_MSG_INIT_FAILED, DK_OD_MSG_INVALID_API, DK_OD_MSG_INVALID_CHOICE, DK_OD_MSG_INVALID_DATE, DK_OD_MSG_INVALID_DECIMAL, DK_OD_MSG_INVALID_INTEGER, DK_OD_MSG_INVALID_OPERATOR, DK_OD_MSG_INVALID_RANGE, DK_OD_MSG_INVALID_SEARCH, DK_OD_MSG_INVALID_SEGMENT_NUM, DK_OD_MSG_MSGID_NOT_FOUND, DK_OD_MSG_NO_VALUES_SPECIFIED, DK_OD_MSG_ONLY_ONE_VALUE_GIVEN, DK_OD_MSG_SERVER_TIMEOUT, DK_OD_MSG_UNDEFINED, DK_OD_MSG_UNKNOWN_ERROR, DK_OD_MSG_VALUE_NOT_SPECIFIED
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKDatastoreOD()
          Constructs and initializes the datastore.
DKDatastoreOD(java.lang.String configuration)
          Constructs 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.
 void callbackIsDone()
           
 void changePassword(java.lang.String userId, java.lang.String oldPwd, java.lang.String newPwd)
          Changes the user password.
 void commit()
          Commit is not supported for this datastore.
 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 content 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()
          Destroys the datastore.
 void disconnect()
          Disconnects from the datastore.
 java.lang.Object evaluate(DKCQExpr qe)
          Evaluates the query.
 java.lang.Object evaluate(dkQuery query)
          Evaluates the query.
 java.lang.Object evaluate(dkSearchTemplate st)
          Evaluates the query.
 java.lang.Object evaluate(dkSearchTemplate st, DKNVPair[] params)
          Evaluates the query.
 java.lang.Object evaluate(java.lang.String command, short commandLangType, DKNVPair[] params)
          Evaluates the query.
 dkResultSetCursor execute(DKCQExpr cqe)
          Executes the query.
 dkResultSetCursor execute(DKCQExpr cqe, com.ibm.mm.sdk.server.PCallbackThreadOD callbackThread)
           
 dkResultSetCursor execute(dkQuery query)
          Executes the query.
 dkResultSetCursor execute(dkQuery query, com.ibm.mm.sdk.server.PCallbackThreadOD callbackThread)
           
 dkResultSetCursor execute(dkSearchTemplate st)
          Executes the query.
 dkResultSetCursor execute(dkSearchTemplate st, DKNVPair[] params, DKNVPair[] options)
          Executes the query.
 dkResultSetCursor execute(dkSearchTemplate st, DKNVPair[] params, DKNVPair[] options, com.ibm.mm.sdk.server.PCallbackThreadOD callbackThread)
           
 dkResultSetCursor execute(java.lang.String command, short commandLangType, DKNVPair[] params)
          Executes the query.
 dkResultSetCursor execute(java.lang.String command, short commandLangType, DKNVPair[] params, com.ibm.mm.sdk.server.PCallbackThreadOD callbackThread)
           
 void executeWithCallback(DKCQExpr qe, dkCallback callbackObj)
          Executes the query with a callback function.
 void executeWithCallback(dkQuery query, dkCallback callbackObj)
          Executes the query with a callback function.
 void executeWithCallback(dkSearchTemplate st, dkCallback callbackObj)
          execute the query with callback function.
 void executeWithCallback(dkSearchTemplate st, DKNVPair[] params, dkCallback callbackObj)
           
 void executeWithCallback(java.lang.String command, short commandLangType, DKNVPair[] params, dkCallback callbackObj)
          Executes the query with a callback function.
 int getCallbkCnt()
           
 int getEntityType()
           
 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.
 java.lang.String getProperty(java.lang.String key)
           
 int getRefreshInterval()
           
 DKHandle handle(java.lang.String type)
          Gets a datastore handle.
 boolean isConnected()
          Checks to see if the datastore is connected.
 java.lang.String[] listDataSourceNames()
          Lists the available datastore source names that can be used to connect with.
 dkCollection listDataSources()
          Lists the available datastore sources that can be used to connect with.
 dkCollection listEntities()
          Gets a list of entities from a 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 a 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. Replace by listEntities
 java.lang.Object listSchemaAttributes(java.lang.String schemaEntry)
          Deprecated. Replace by listEntityAttributes
 dkCollection listSearchableEntities(int type)
          Gets a list of folders/applgrps from a persistent datastore.
 dkCollection listSearchTemplates()
          Gets a list of folders from a persistent datastore.
 java.lang.Object listServers()
          Deprecated. Replace by listDataSources
 void refreshServer()
           
 java.lang.String registerMapping(DKNVPair sourceMap)
          Registers the mapping definition to this datastore.
 void removeExtension(java.lang.String extensionName)
          Remove an existing extension object
 void retrieveObject(dkDataObject ddo)
          Retrieves the specified DDO from this datastore.
 void rollback()
          Rollback is not supported for this datastore.
 void setDateData(dkDataObject ddo, short index, java.lang.String val, int yyyy, int mm, int dd)
          Sets the date attribute for a data item for a DDO.
 void setOption(int option, java.lang.Object value)
          Sets a datastore option.
 void setStringData(dkDataObject ddo, short index, java.lang.String val, short attrtype_native)
          Sets an attribute value for a DDO.
 void startRefreshThread()
           
 void startTransaction()
          startTransaction is not supported for this datastore.
 void stopRefreshThread()
           
 DKCQExpr translate(DKCQExpr cqe)
          Translates a query expression into a native query expression processable by this datastore.
 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, clearCache, clearCache, deleteObject, deleteObject, deleteObjects, deleteObjects, deleteObjects, listAvailableServices, listSearchableEntities, listSearchableEntityNames, listSearchTemplateNames, 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.dkDatastore
addObject, addObject, addObjects, addObjects, addObjects, clearCache, clearCache, deleteObject, deleteObject, deleteObjects, deleteObjects, deleteObjects, listAvailableServices, listSearchableEntities, listSearchableEntityNames, listSearchTemplateNames, retrieveObject, retrieveObject, retrieveObjects, retrieveObjects, retrieveObjects, serviceMgr, updateObject, updateObject, updateObjects, updateObjects, updateObjects
 

Field Detail

dll_count

public static long dll_count
Constructor Detail

DKDatastoreOD

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

DKDatastoreOD

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

Use connection_string to pass parameters to the OnDemand content server as a connection string. The parameters and the syntax you can use in the connection string include:


All the connection string parameters are optional.

An example of a connection string:

     "ODPORT=1009;ODCONNECT=T;CACHEAGS=1;STAYCONNECT=1"
  
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 an error is detected
java.lang.Exception - if an error is detected

disconnect

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

changePassword

public void changePassword(java.lang.String userId,
                           java.lang.String oldPwd,
                           java.lang.String newPwd)
                    throws DKException,
                           java.lang.Exception
Changes the user password.
Specified by:
changePassword in interface dkDatastore
Overrides:
changePassword in class dkAbstractDatastore
Parameters:
userID - the user ID whose password you want to change
oldPwd - the current password
newPwd - the new password you want
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is 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 for the option you want
Returns:
an option value
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is 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 you want to set
value - the option value
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is 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 an error is detected
java.lang.Exception - if an error is 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 an error is detected
java.lang.Exception - if an error is 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 an error is detected
java.lang.Exception - if an error is detected

evaluate

public java.lang.Object evaluate(dkSearchTemplate st)
                          throws DKException,
                                 java.lang.Exception
Evaluates the query.
Specified by:
evaluate in interface dkDatastore
Overrides:
evaluate in class dkAbstractDatastore
Parameters:
st - an OD folder object
Returns:
a collection of the results
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is detected

evaluate

public java.lang.Object evaluate(dkSearchTemplate st,
                                 DKNVPair[] params)
                          throws DKException,
                                 java.lang.Exception
Evaluates the query.
Specified by:
evaluate in interface dkDatastoreIntOD
Parameters:
st - an OD folder object
params - additional query option in name/value pair
Returns:
a collection of the results
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is 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 an error is detected
java.lang.Exception - if an error is detected

execute

public dkResultSetCursor execute(java.lang.String command,
                                 short commandLangType,
                                 DKNVPair[] params,
                                 com.ibm.mm.sdk.server.PCallbackThreadOD callbackThread)
                          throws DKException,
                                 java.lang.Exception

execute

public dkResultSetCursor execute(dkSearchTemplate st)
                          throws DKException,
                                 java.lang.Exception
Executes the query.
Specified by:
execute in interface dkDatastore
Overrides:
execute in class dkAbstractDatastore
Parameters:
folder -  
params - additional query option in name/value pair
Returns:
resultSetCursor which represents a datastore cursor.
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is detected

execute

public dkResultSetCursor execute(dkSearchTemplate st,
                                 DKNVPair[] params,
                                 DKNVPair[] options)
                          throws DKException,
                                 java.lang.Exception
Executes the query.
Parameters:
folder -  
params - additional query parameters in name/value pair
options - additional query options in name/value pair
Returns:
resultSetCursor which represents a datastore cursor.
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is detected

execute

public dkResultSetCursor execute(dkSearchTemplate st,
                                 DKNVPair[] params,
                                 DKNVPair[] options,
                                 com.ibm.mm.sdk.server.PCallbackThreadOD callbackThread)
                          throws DKException,
                                 java.lang.Exception

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

execute

public dkResultSetCursor execute(dkQuery query,
                                 com.ibm.mm.sdk.server.PCallbackThreadOD callbackThread)
                          throws DKException,
                                 java.lang.Exception

execute

public dkResultSetCursor execute(DKCQExpr cqe)
                          throws DKException,
                                 java.lang.Exception
Executes the query.
Specified by:
execute in interface dkDatastore
Overrides:
execute in class dkAbstractDatastore
Parameters:
qe - a common query expression object
Returns:
resultSetCursor which represents a datastore cursor.
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is detected

execute

public dkResultSetCursor execute(DKCQExpr cqe,
                                 com.ibm.mm.sdk.server.PCallbackThreadOD callbackThread)
                          throws DKException,
                                 java.lang.Exception

executeWithCallback

public void executeWithCallback(dkQuery query,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Executes the query with a 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 an error is detected
java.lang.Exception - if an error is detected

executeWithCallback

public void executeWithCallback(java.lang.String command,
                                short commandLangType,
                                DKNVPair[] params,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Executes the query with a 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 an error is detected
java.lang.Exception - if an error is detected

executeWithCallback

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

executeWithCallback

public void executeWithCallback(dkSearchTemplate st,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Description copied from interface: dkDatastore
execute the query with callback function.

Note: Default behavior will call dkDatastore.executeWithCallback(DKCQExpr,dkCallback)

Specified by:
executeWithCallback in interface dkDatastore
Overrides:
executeWithCallback in class dkAbstractDatastore
Following copied from interface: com.ibm.mm.sdk.common.dkDatastore
Parameters:
st - a search template object
callbackObj - a dkCallback object

executeWithCallback

public void executeWithCallback(dkSearchTemplate st,
                                DKNVPair[] params,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Specified by:
executeWithCallback in interface dkDatastoreIntOD

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

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 an error is detected
java.lang.Exception - if an error is 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 an error is detected
java.lang.Exception - if an error is 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 an error is detected
java.lang.Exception - if an error is 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 an error is detected
java.lang.Exception - if an error is detected
See Also:
del()

setDateData

public void setDateData(dkDataObject ddo,
                        short index,
                        java.lang.String val,
                        int yyyy,
                        int mm,
                        int dd)
                 throws DKException,
                        java.lang.Exception
Sets the date attribute for a data item for a DDO.
Parameters:
ddo - the DDO
index - the index of the data item (data ID)
yyyy - the year
mm - the month
dd - the dayr
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is detected

setStringData

public void setStringData(dkDataObject ddo,
                          short index,
                          java.lang.String val,
                          short attrtype_native)
                   throws DKException,
                          java.lang.Exception
Sets an attribute value for a DDO.
Parameters:
ddo - the DDO to contain this attribute
index - the index of the data item (data ID)
val - the attribute value
attrtype - the attribute type
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is detected

retrieveObject

public void retrieveObject(dkDataObject ddo)
                    throws DKException,
                           java.lang.Exception
Retrieves the specified 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 an error is detected
java.lang.Exception - if an error is 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 an error is detected
java.lang.Exception - if an error is detected
See Also:
#update()

startTransaction

public void startTransaction()
                      throws DKException,
                             java.lang.Exception
startTransaction is not supported for this datastore.
Specified by:
startTransaction in interface dkDatastoreIntOD
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 for this datastore.
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 for this datastore.
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 an error is detected

datastoreName

public java.lang.String datastoreName()
                               throws java.lang.Exception
Gets the name of this datastore object. This name usually represents the server name for the datastore source.
Specified by:
datastoreName in interface dkDatastore
Overrides:
datastoreName in class dkAbstractDatastore
Returns:
datastore name
Throws:
java.lang.Exception - if an error is 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 an error is 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 an error is 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

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 an error is detected

listDataSources

public dkCollection listDataSources()
                             throws DKException,
                                    java.lang.Exception
Lists 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
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is detected

listDataSourceNames

public java.lang.String[] listDataSourceNames()
                                       throws DKException,
                                              java.lang.Exception
Lists 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 an error is detected
java.lang.Exception - if an error is 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
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is detected
See Also:
listDataSources()

listSchema

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

List 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 an error is detected
See Also:
listEntities()

listSchemaAttributes

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

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 that contains the attributes that belong to this schema
Throws:
DKUsageError - if an error is detected
DKDatastoreAccessError - if an error is detected
See Also:
listEntityAttrs(java.lang.String)

listEntities

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

listEntityNames

public java.lang.String[] listEntityNames()
                                   throws DKException,
                                          java.lang.Exception
Gets a list of entity names from a 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 an error is detected

listSearchTemplates

public dkCollection listSearchTemplates()
                                 throws DKException,
                                        java.lang.Exception
Gets a list of folders from a persistent datastore.
Specified by:
listSearchTemplates in interface dkDatastore
Overrides:
listSearchTemplates in class dkAbstractDatastore
Returns:
a collection of DKFolderOD objects
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is detected

listSearchableEntities

public dkCollection listSearchableEntities(int type)
                                    throws DKException,
                                           java.lang.Exception
Gets a list of folders/applgrps from a persistent datastore.
Returns:
a collection of entity objects
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is 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 an error is 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 an error is 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. The mapping is done by the 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 is a reference to a string in memory
  • ("FILE", ) : file_name is the name of the file containing the mapping
  • ("URL", ) : URL-address location of the mapping
  • ("LDAP", ) : LDAP file-name
  • ("SCHEMA", ) : a reference to a dkSchemaMapping object defining the mapping. Currently, only "SCHEMA" option is supported, others may be added later.
    Returns:
    the mapping name for the mapping definition
    Throws:
    DKException - if an error is detected
    java.lang.Exception - if an error is 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 an error is detected
java.lang.Exception - if an error is 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 the names of the register mapping objects
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is 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 an error is detected
java.lang.Exception - if an error is 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:
extension object.
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is 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 an error is detected
java.lang.Exception - if an error is 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 an error is detected
java.lang.Exception - if an error is 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 an error is detected
java.lang.Exception - if an error is 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 content server. This method returns a DKDDO object with all the properties and attributes set, so that you only have to set the attribute values.
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. For OD, this parameter must be set to DK_CM_DOCUMENT.
Returns:
a new DKDDO object of the given object type
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is detected

destroy

public void destroy()
             throws DKException,
                    java.lang.Exception
Destroys the datastore. Provides cleanup for the datastore if it is needed.
Specified by:
destroy in interface dkDatastore
Overrides:
destroy in class dkAbstractDatastore
Throws:
DKException - if an error is detected
java.lang.Exception - if an error is detected

getCallbkCnt

public int getCallbkCnt()

callbackIsDone

public void callbackIsDone()

getProperty

public java.lang.String getProperty(java.lang.String key)

getEntityType

public int getEntityType()

getRefreshInterval

public int getRefreshInterval()

startRefreshThread

public void startRefreshThread()

stopRefreshThread

public void stopRefreshThread()

refreshServer

public void refreshServer()

EIP Java APIs

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