|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.sdk.server.dkAbstractDatastore | +--com.ibm.mm.sdk.server.DKDatastoreICM
The DKDatastoreICM class is the IBM Content Manager Version 8 and later implementation of the abstract class dkDatastore. Use this class to represent a Content Manager content server in your program. For earlier versions of Content Manager, use DKDatastoreDL.
This class provides facilities to query, retrieve, update, store, and manage content stored in a Content Manager datastore.
The DKDatastoreICM class does not support concurrent access from multiple threads in a multi-threaded program. You need to synchronize concurrent access to the datastore instance in your application. It is recommended that you use one instance of the datastore for each thread.
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.DKMessageId |
For details, see the class or interface |
Constructor Summary | |
DKDatastoreICM()
Constructs the datastore and initializes it with the default configuration. |
|
DKDatastoreICM(java.lang.String configuration)
Constructs the datastore and initializes it using the supplied configuration string. |
Method Summary | |
void |
addExtension(java.lang.String extensionName,
dkExtension extensionObj)
Adds a new extension object to this datastore. |
void |
addObject(dkDataObject ddo)
Adds this DDO into the Content Manager persistent store. |
void |
addObject(dkDataObject ddo,
int option)
Adds this DDO into the Content Manager persistent sore, with options. |
boolean |
adminDomainEnabled()
Returns whether administration domain is enabled for this datastore. |
void |
changePassword(java.lang.String userId,
java.lang.String oldPwd,
java.lang.String newPwd)
Allows a user to change password if authorized |
void |
checkIn(dkDataObject item)
Checks in an item previously checked out from the datastore. |
void |
checkOut(dkDataObject item)
Checks out an 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)
Establishes a connection to a Content Manager datastore. |
DKHandle |
connection()
Gets the connection handle for this datastore. |
DKDDO |
createChildDDO(java.lang.String objectType,
java.lang.String componentName)
Creates a child DDO of the given component name under the specified root component. |
DKDDO |
createDDO(DKPidICM pid)
Creates a new DDO with object type, properties and attributes set according to the corresponding definition of the item type in this datastore. |
DKDDO |
createDDO(DKPidICM pid,
java.lang.String[] fedAttributeList)
Creates a new DDO with object type, properties and attributes set based on the suplied Pid and attribute list. |
DKDDO |
createDDO(java.lang.String pidString)
Creates a new DDO with object type, properties and attributes set according to the corresponding definition of the item type in this datastore. |
DKDDO |
createDDO(java.lang.String objectType,
int flags)
Creates a new DDO with object type, properties and attributes set according to the definition of the corresponding item type in this datastore. |
dkDatastoreDef |
datastoreDef()
Gets the datastore definition object. |
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 the specified DDO from the persistent datastore. |
void |
deleteObject(dkDataObject ddo,
int option)
Deletes this DDO from the persistent store. |
void |
deleteObjects(dkCollection ddoCollection)
Deletes a collection of DDOs from the persistent store. |
void |
deleteObjects(dkCollection ddoCollection,
int option)
Deletes DDOs from this datastore. |
void |
destroy()
Destroys the datastore object. |
void |
disconnect()
Disconnects from a Content Manager datastore. |
java.lang.Object |
evaluate(DKCQExpr cqe)
Evaluates a combined query expression cqe
against this datastore and returns the results in a collection. |
java.lang.Object |
evaluate(java.lang.String command,
short commandLangType,
DKNVPair[] params)
Evaluates query string command by executing it against
this datastore and returning all results in a collection. |
dkResultSetCursor |
execute(DKCQExpr cqe)
Executes a combined query expression cqe against this
datastore and returns a result set cursor object to provide access
to the results. |
dkResultSetCursor |
execute(java.lang.String command,
short commandLangType,
DKNVPair[] params)
Executes query string command against this datastore and
returns a result set cursor object to provide access to the results. |
void |
executeWithCallback(DKCQExpr cqe,
dkCallback callbackObj)
Executes a combined query expression cqe against this
datastore in asynchronous manner and sends the results to the specified
callback object callbackObj in blocks. |
void |
executeWithCallback(java.lang.String command,
short commandLangType,
DKNVPair[] params,
dkCallback callbackObj)
Executes query string command against this datastore
in asynchronous manner and sends the results to the specified
callback object callbackObj in blocks. |
dkExtension |
getExtension(java.lang.String extensionName)
Gets the specified extension object from this datastore. |
dkSchemaMapping |
getMapping(java.lang.String mappingName)
Gets the specified schema mapping information registered in this datastore. |
java.lang.Object |
getOption(int option)
Gets a datastore option. |
DKHandle |
handle(java.lang.String type)
Gets a datastore handle. |
boolean |
isConnected()
Checks to see if the datastore is connected. |
boolean |
LDAPEnabled()
Returns whether LDAP is enabled for this datastore. |
dkCollection |
listAdminEvents(short maxResults)
Lists all events related to System Administration functions. |
java.lang.String[] |
listDataSourceNames()
Lists the names of the available datastores 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 store. |
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 store. |
dkCollection |
listEvents(java.lang.String itemId,
short maxResults)
Lists all events related to the given item id. |
java.lang.String[] |
listExtensionNames()
Gets the list of extension objects' names available in this datastore. |
java.lang.String[] |
listMappingNames()
Gets the list of registered mapping information from this datastore. |
void |
moveObject(dkDataObject sourceDDO,
dkDataObject destinationDDO,
int options)
Moves the data-object from the current item type to another in this datastore. |
void |
moveObject(dkDataObject ddo,
java.lang.String destinationItemType)
Moves the data-object from the current item type to another item type in this datastore. |
short |
platform()
Returns the platform on which the server for this datastore. |
java.lang.String |
registerMapping(DKNVPair sourceMap)
Registers mapping information to this datastore. |
void |
removeExtension(java.lang.String extensionName)
Removes an existing extension object from this datastore. |
dkCollection |
retrieveEvent(int eventCode,
short maxResults)
Retrieves events information for the given event code from the persistent event log. |
dkXDO |
retrieveFormOverlay(java.lang.String name)
Retrieves the form overlay object. |
void |
retrieveObject(dkDataObject ddo)
Retrieves a DDO from Content Manager persistent store. |
void |
retrieveObject(dkDataObject ddo,
DKNVPair[] options)
Retrieves this DDO from the persistant store, with options. |
void |
retrieveObject(dkDataObject ddo,
int option)
Retrieves this DDO from the Content Manager Persistant store, with options. |
void |
retrieveObjects(dkCollection ddoCollection)
Retrieves this collection of DDO's from the persistant store. |
void |
retrieveObjects(dkCollection ddo,
DKNVPair[] options)
Retrieves a collection of DDO's from the persistant store. |
void |
retrieveObjects(dkCollection ddoCollection,
int option)
Retrieves this collection of DDO's from the persistant store. |
void |
rollback()
Rollbacks a datastore transaction. |
java.lang.String |
schemaName()
Returns the schema Name |
void |
setOption(int option,
java.lang.Object value)
Sets a datastore option. |
void |
startTransaction()
Starts an explicit transaction. |
boolean |
textSearchEnabled()
Returns whether text search is enabled for this datastore. |
void |
unRegisterMapping(java.lang.String mappingName)
Unregisters mapping information from this datastore. |
void |
updateObject(dkDataObject ddo)
Updates this DDO in the persistent store. |
void |
updateObject(dkDataObject ddo,
int option)
Updates this DDO in the persistent store. |
java.lang.String |
userName()
Gets the user name for this datastore. |
void |
writeEvent(DKEventDefICM aEvent)
Writes this event information to the persistent event log. |
Methods inherited from class com.ibm.mm.sdk.server.dkAbstractDatastore |
addObject, addObjects, addObjects, addObjects, clearCache, clearCache, createQuery, createQuery, deleteObject, deleteObjects, evaluate, evaluate, execute, execute, executeWithCallback, executeWithCallback, listAvailableServices, listSchema, listSchemaAttributes, listSearchableEntities, listSearchableEntityNames, listSearchTemplateNames, listSearchTemplates, listServers, serviceMgr, 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.dkDatastoreIntICM |
informationMiningEnabled, workflowEnabled |
Methods inherited from interface com.ibm.mm.sdk.common.dkDatastore |
addObject, addObjects, addObjects, addObjects, clearCache, clearCache, createQuery, createQuery, deleteObject, deleteObjects, evaluate, evaluate, execute, execute, executeWithCallback, executeWithCallback, listAvailableServices, listSchema, listSchemaAttributes, listSearchableEntities, listSearchableEntityNames, listSearchTemplateNames, listSearchTemplates, listServers, serviceMgr, updateObject, updateObjects, updateObjects, updateObjects |
Constructor Detail |
public DKDatastoreICM() throws DKException, java.lang.Exception
DKException
- if a problem is encountered.public DKDatastoreICM(java.lang.String configuration) throws DKException, java.lang.Exception
configuration
- configuration string used for initialization.
Configuration string is a sequence of name/value pairs separated by
semi colons.
Valid name/value pairs are:
DKException
- if a problem is encountered.Method Detail |
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
connect
in interface dkDatastore
connect
in class dkAbstractDatastore
datastore_name
- the datastore name to connect withuser_name
- the user name for establishing the connectionauthentication
- user's passwordconnect_string
- the connect string used for initializing
connection options.
Connect string is a sequence of name/value pairs separated by
semi-colons.
Valid name/value pairs are listed below:
DKException
- if a problem is encountered.public void disconnect() throws DKException, java.lang.Exception
disconnect
in interface dkDatastore
disconnect
in class dkAbstractDatastore
DKException
- if a problem is encountered.public java.lang.Object getOption(int option) throws DKException, java.lang.Exception
getOption
in interface dkDatastore
getOption
in class dkAbstractDatastore
option
- the option identifier.DKException
- if a problem is encountered.public void setOption(int option, java.lang.Object value) throws DKException, java.lang.Exception
setOption
in interface dkDatastore
setOption
in class dkAbstractDatastore
option
- the option identifier.value
- the option value.DKException
- if a problem is encountered.above for valid options and values.
public java.lang.Object evaluate(java.lang.String command, short commandLangType, DKNVPair[] params) throws DKException, java.lang.Exception
command
by executing it against
this datastore and returning all results in a collection.
The total number of returned results can be limited by specifying the
DKConstant.DK_CM_PARM_MAX_RESULTS
query option.
For details on query syntax, refer to the Application Programming Guide.
Example:
String query = "/Journal/Journal_Article[contains-text"
+ "(@Title, \" 'Design' & 'Index' \")=1] SORTBY (@Title)";
DKNVPair options[] = new DKNVPair[3];
options[0] = new DKNVPair(DKConstant.DK_CM_PARM_MAX_RESULTS, "50");
options[1] = new DKNVPair(DKConstant.DK_CM_PARM_RETRIEVE,
new Integer(DKConstant.DK_CM_CONTENT_ATTRONLY |
DKConstant.DK_CM_CONTENT_LINKS_OUTBOUND));
options[2] = new DKNVPair(DKConstant.DK_CM_PARM_END, null);
DKResults results = (DKResults)dsICM.evaluate(query,
DKConstant.DK_CM_XQPE_QL_TYPE, options);
// Display results in the collection.
dkIterator iter = results.createIterator();
System.out.println(" Number of Results: " + results.cardinality());
DKDDO ddo = null;
while(iter.more()) {
ddo = (DKDDO) iter.next();
System.out.println(" - Item ID: "
+ ((DKPidICM)ddo.getPidObject()).getItemId()
+ " (" + ddo.getPidObject().getObjectType() + ")");
}
evaluate
in interface dkDatastore
evaluate
in class dkAbstractDatastore
command
- a query stringcommandLangType
- a type of query
(must be DKConstant.DK_CM_XQPE_QL_TYPE
)params
- additional query options in the form of name/value pairs
(refer to the execute
method for more details)DKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredexecute(String, short, DKNVPair[])
,
executeWithCallback(String, short, DKNVPair[], dkCallback)
public java.lang.Object evaluate(DKCQExpr cqe) throws DKException, java.lang.Exception
cqe
against this datastore and returns the results in a collection.
This method is mostly used internally to run federated queries
and is not advised for external use. Use the string
version of the evaluate
method to execute your queries.
evaluate
in interface dkDatastore
evaluate
in class dkAbstractDatastore
cqe
- a combined query expression objectDKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredevaluate(String, short, DKNVPair[])
,
execute(String, short, DKNVPair[])
,
executeWithCallback(String, short, DKNVPair[], dkCallback)
public dkResultSetCursor execute(java.lang.String command, short commandLangType, DKNVPair[] params) throws DKException, java.lang.Exception
command
against this datastore and
returns a result set cursor object to provide access to the results.
For details on query syntax, refer to the Application Programming Guide.
A few notes about using the result set cursor.
Important: make sure to close and destroy the result set cursor once
you have finished using it.
To close the result set cursor, call one of the following methods:
dkResultSetCursor.close()
,
dkResultSetCursor.destroy()
.
To completely clean up the result set cursor,
it is suggested that you use dkResultSetCursor.destroy()
.
All open result set cursors are closed when either
dkDatastore.disconnect()
or
dkDatastore.destroy()
method is called.
If you want the result set cursor to be automatically processed for you
while performing a query, use the DKDatastoreICM.evaluate
method. This method automatically closes the result set cursor before
returning all the results in a collection.
Example:
String query = "/Journal[@NumPages > 50]";
DKNVPair options[] = new DKNVPair[3];
options[0] = new DKNVPair(DKConstant.DK_CM_PARM_MAX_RESULTS, "100");
options[1] = new DKNVPair(DKConstant.DK_CM_PARM_RETRIEVE,
new Integer(DKConstant.DK_CM_CONTENT_CHILDREN));
options[2] = new DKNVPair(DKConstant.DK_CM_PARM_END, null);
dkResultSetCursor cursor = dsICM.execute(query,
DKConstant.DK_CM_XQPE_QL_TYPE, options);
DKDDO ddo = null;
String itemId = "";
// Display results using a result set cursor.
while((ddo = cursor.fetchNext()) != null){
itemId = ((DKPidICM)ddo.getPidObject()).getItemId();
System.out.println(" - Item ID: " + itemId + " ("
+ ddo.getPidObject().getObjectType() + ")");
}
// VERY IMPORTANT STEP:
cursor.destroy(); // Close & destroy cursor, ending implicit transaction.
execute
in interface dkDatastore
execute
in class dkAbstractDatastore
command
- a query stringcommandLangType
- a type of query
(must be DKConstant.DK_CM_XQPE_QL_TYPE
)params
- additional query options in the form of name/value pairs
DKConstant.DK_CM_PARM_MAX_RESULTS
DKConstant.DK_CM_PREPARE_QUERY
open()
method
must be called to open the cursor and execute the query.
DKConstant.DK_CM_PARM_PREFETCH_SIZE
DKConstant.DK_CM_PARM_CONTENT
DKConstant.DK_CM_PARM_RETRIEVE
is specified.
It is suggested to always use
DKConstant.DK_CM_PARM_RETRIEVE
option instead of the
DKConstant.DK_CM_PARM_CONTENT
option.
"IDONLY"
, "NO"
, "ATTRONLY"
,
and "YES"
.
DKConstant.DK_CM_PARM_RETRIEVE
option:
"IDONLY"
= DKConstant.DK_CM_CONTENT_IDONLY
"NO"
= DKConstant.DK_CM_CONTENT_NO
"ATTRONLY"
= DKConstant.DK_CM_CONTENT_ATTRONLY
"YES"
=
(DK_CM_CONTENT_ATTRONLY | DK_CM_CONTENT_CHILDREN | DK_CM_CONTENT_YES
)
"ATTRONLY"
.
DKConstant.DK_CM_PARM_RETRIEVE
DKDatastoreICM.retrieveObject(dkDataObject, int)
method.
DKConstant.DK_CM_PARM_CONTENT
option above.
This option specifies what to retrieve for the items that are
returned.
DKConstant.DK_CM_CONTENT_ATTRONLY
.
DKConstant.DK_CM_CONTENT_IDONLY
.
DKConstant.DK_CM_PARM_PROJECTION_LIST
DKDatastoreICM.retrieveObject(dkDataObject, DKNVPair[])
method.
DKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredevaluate(String, short, DKNVPair[])
,
executeWithCallback(String, short, DKNVPair[], dkCallback)
,
retrieveObject(dkDataObject, int)
,
retrieveObject(dkDataObject, DKNVPair[])
public dkResultSetCursor execute(DKCQExpr cqe) throws DKException, java.lang.Exception
cqe
against this
datastore and returns a result set cursor object to provide access
to the results.
This method is mostly used internally to run federated queries
and is not advised for external use. Use the string
version of the execute
method to execute your queries.
execute
in interface dkDatastore
execute
in class dkAbstractDatastore
cqe
- a combined query expression objectDKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredexecute(String, short, DKNVPair[])
,
evaluate(String, short, DKNVPair[])
,
executeWithCallback(String, short, DKNVPair[], dkCallback)
public void executeWithCallback(java.lang.String command, short commandLangType, DKNVPair[] params, dkCallback callbackObj) throws DKException, java.lang.Exception
command
against this datastore
in asynchronous manner and sends the results to the specified
callback object callbackObj
in blocks.
You can get the results from the callback object as soon as they
are available. A callback object is any object that implements the
dkCallback
interface. This object is defined and created
by the user program.
IMPORTANT: NO datastore operations are allowed from the callback object.
For example, it is not allowed to list item type definitions or call
CRUD (Create, Retrieve, Update, Delete) methods inside of the callback
object's dataCallback(dkCollection, boolean)
method.
You can display the results as long as this does not require
datastore operations or you can wait until the query completes as
indicated by the isDone()
method returning true
.
If you want to stop receiving results, call the
cancelQuery()
method on your callbackObj
object
and wait until the isDone()
method returns true
.
Example:
String query = "/Journal/Journal_Article[@VERSIONID = latest-version(.)]";
DKNVPair options[] = new DKNVPair[2];
options[0] = new DKNVPair(DKConstant.DK_CM_PARM_RETRIEVE,
new Integer(DKConstant.DK_CM_CONTENT_ITEMTREE));
options[1] = new DKNVPair(DKConstant.DK_CM_PARM_END, null);
// Create Callback Object (any object implementing dkCallback interface).
SSearchCallbackObjectICM callbackObject = new SSearchCallbackObjectICM();
dsICM.executeWithCallback(query, DKConstant.DK_CM_XQPE_QL_TYPE,
options, callbackObject);
// Wait for Callback Object to receive all results.
// This thread would normally do other work instead of simply waiting.
boolean isDone = false;
while(isDone == false) {
System.out.println("Waiting...");
java.lang.Thread.sleep(100);
isDone = callbackObject.isDone();
if(callbackObject.error()) {
throw callbackObject.getFirstException();
}
}
// Method in the callback object's class
// that is called for every block of results.
public boolean dataCallback (dkCollection ddoList,
boolean resultsComplete) {
serverIsDone = resultsComplete;
try {
if (ddoList != null) {
dkIterator iter = ddoList.createIterator();
String itemId = "";
while (iter.more()) {
DKDDO ddo = (DKDDO) iter.next();
results.add(ddo);
itemId = ((DKPidICM)ddo.getPidObject()).getItemId();
System.out.println ("Callback Object: - Item ID: " +
itemId + " (" +
ddo.getPidObject().getObjectType() + ")");
}
}
} catch (DKException e) {
printException(e);
if (firstException == null) // If it is the first failure, save it
firstException = e;
}
if (userRequestsCancel) { // If the user requests to cancel the query,
// report to server.
return (true);
} else { // Otherwise, return whether or not the server
// has indicated that it is done.
return (serverIsDone);
}
}
executeWithCallback
in interface dkDatastore
executeWithCallback
in class dkAbstractDatastore
command
- a query stringcommandLangType
- a type of query
(must be DKConstant.DK_CM_XQPE_QL_TYPE
)params
- additional query options in the form of name/value pairscallbackObj
- an object that will be called by this method for every
block of resultsDKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredexecute(String, short, DKNVPair[])
,
evaluate(String, short, DKNVPair[])
public void executeWithCallback(DKCQExpr cqe, dkCallback callbackObj) throws DKException, java.lang.Exception
cqe
against this
datastore in asynchronous manner and sends the results to the specified
callback object callbackObj
in blocks.
This method is mostly used internally to run federated queries
and is not advised for external use. Use the string
version of the executeWithCallback
method to execute
your queries.
executeWithCallback
in interface dkDatastore
executeWithCallback
in class dkAbstractDatastore
cqe
- a combined query expression objectcallbackObj
- an object that will be called by this method for every
block of resultsDKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredexecute(String, short, DKNVPair[])
,
evaluate(String, short, DKNVPair[])
,
executeWithCallback(String, short, DKNVPair[], dkCallback)
public void addObject(dkDataObject ddo) throws DKException, java.lang.Exception
addObject
in interface dkDatastore
addObject
in class dkAbstractDatastore
ddo
- The DDO to be added to this datastore.DKException
- if a problem is encountered.public void addObject(dkDataObject ddo, int option) throws DKException, java.lang.Exception
DKConstant.DK_CM_CHECKOUT
Use this option
to check the item out after creation. The default is not to check-out the item.
addObject
in interface dkDatastore
addObject
in class dkAbstractDatastore
ddo
- the DDO to be added to this datastore.option
- option for add.DKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredpublic void retrieveObject(dkDataObject ddo) throws DKException, java.lang.Exception
retrieveObject
in interface dkDatastore
retrieveObject
in class dkAbstractDatastore
ddo
- the ddo to be retrieved from this datastoreDKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredDKDataObjectNotFound
- if a problem is encounteredretrieveObject(dkDataObject, int)
public void retrieveObject(dkDataObject ddo, int option) throws DKException, java.lang.Exception
retrieveObject
in interface dkDatastore
retrieveObject
in class dkAbstractDatastore
ddo
- the ddo to be retrieved from this datastoreoption
- retrieve option, constructed by performing a logical OR
(with | operator) of the supported options described aboveDKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredpublic void retrieveObjects(dkCollection ddoCollection) throws DKException, java.lang.Exception
retrieveObject (dkDataObject, int)
method.
This default will be applied to all DDO's in the collection.
DK_CM_CONTENT_NO
. The parts TOC is not retrieved by default.
DK_CM_CONTENT_YES
option retrieves the parts TOC for documents.
Use retrieve methods that accept a single DDO to retrieve content.retrieveObjects
in interface dkDatastore
retrieveObjects
in class dkAbstractDatastore
ddoCollection
- collection of DDO's to be retrieved from
this datastoreDKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredDKDataObjectNotFound
- if a problem is encounteredpublic void retrieveObjects(dkCollection ddoCollection, int option) throws DKException, java.lang.Exception
retrieveObject (dkDataObject, int)
method.
DK_CM_CONTENT_NO
. Use retrieve methods that accept
a single DDO to retrieve content.retrieveObjects
in interface dkDatastore
retrieveObjects
in class dkAbstractDatastore
ddoCollection
- the collection of DDO's to be retrieved from
this datastoreoption
- option for retrieveDKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredpublic void retrieveObject(dkDataObject ddo, DKNVPair[] options) throws java.lang.Exception
retrieveObject
in interface dkDatastore
retrieveObject
in class dkAbstractDatastore
ddo
- DDO to be retrieved from this datastoreoptions
- DKNVPair[] options for retrieveDKConstant.DK_CM_PARM_RETRIEVE
, VALUE: Integer
DKConstant.DK_CM_CONTENT_ITEMTREE
DKConstant.DK_CM_CONTENT_ITEMTREE_NO_LINKS
DKConstant.DK_CM_CHECKOUT
DKConstant.DK_CM_VERSION_LATEST
DKConstant.DK_CM_CONTENT_LINKS_OUTBOUND
DKConstant.DK_CM_CONTENT_LINKS_INBOUND
retrieveObject (dkDataObject, int)
method)
DKConstant.DK_CM_PARM_PROJECTION_LIST
, VALUE: DKNVPair[]
String of itemtype0 name
, VALUE: dkCollection of Strings
that are the qualified names of attributes to be projected for this item type
String of itemtype1 name
, VALUE: dkCollection of Strings
that are the qualified names of attributes to be projected for this item type
String of itemtype2 name
, VALUE: dkCollection of Strings
that are the qualified names of attributes to be projected for this item type
String of itemtype... name
, VALUE: dkCollection of Strings
that are the qualified names of attributes to be projected for this item type
String of itemtypeN name
, VALUE: dkCollection of Strings
that are the qualified names of attributes to be projected for this item type
DKConstant.DK_CM_PARM_PROJECTION_LIST
, VALUE: DKNVPair[
- element 0: Name = "Journal",
Value = collection of "Journal_Article/Journal_Section/Title",
"Title", "Journal_Article/Title", "Journal_Article/Classification"
- element 1: Name = "Book"
Value = collection of "Book_Chapter/" + DK_ICM_ALL_ATTRS,
"Book_Author/" + DK_ICM_SYSTEM_ATTRS,
"Book_Chapter/Book_Section/SectionNum"
- element 2: Name = "Conference"
Value = collection of DK_ICM_ALL_ATTRS,
"Conference_Note/NoteNum"]
DKAttrDefICM.getQualifiedName()
and related methods for details.
The names should not be fully qualified because the schema mapping
already includes the entity name, which points to the root item type.
DKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredpublic void retrieveObjects(dkCollection ddo, DKNVPair[] options) throws java.lang.Exception
DK_CM_CONTENT_NO
. Use retrieve methods that accept
a single DDO to retrieve content.retrieveObjects
in interface dkDatastore
retrieveObjects
in class dkAbstractDatastore
ddo
- collection of DDO's to be retrieved from
this datastoreoptions
- DKNVPair[] options for retrieve
retrieveObject(dkDataObject, DKNVPair[])
method for more detailsDKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredpublic void updateObject(dkDataObject ddo) throws DKException, java.lang.Exception
updateObject
in interface dkDatastore
updateObject
in class dkAbstractDatastore
ddo
- - the DDO to be updated.DKException
- if a problem is encountered.public void updateObject(dkDataObject ddo, int option) throws DKException, java.lang.Exception
updateObject
in interface dkDatastore
updateObject
in class dkAbstractDatastore
ddo
- - the item DDO to be updated in this datastore.option
- - The update options.
Valid values are:
DK_CM_CHECKIN : check the item in after update. The default is not to check in the item.
DK_CM_VERSION_LATEST: update the latest version.
DK_CM_VERSION_NEW: create a new version of this item. This is
applicable only if the version control on the item
type is set to version the item or to application controlled.
If this is not the case, the item is updated and no error is
returned but a new version is not created.DKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredpublic void deleteObject(dkDataObject ddo) throws DKException, java.lang.Exception
deleteObject
in interface dkDatastore
deleteObject
in class dkAbstractDatastore
ddo
- - DDO to be deleted from this datastore.DKException
- if a problem is encountered.public void deleteObject(dkDataObject ddo, int option) throws DKException, java.lang.Exception
deleteObject
in interface dkDatastore
deleteObject
in class dkAbstractDatastore
ddo
- the DDO to be deleted from this datastore.option
- delete option, the default is 0 (zero) which will perform a regular deleteDKException
- if a problem is encountered.
DKConstantICM.DK_ICM_DELETE_ALL_VERSIONS
- Delete all versions of the item
public void deleteObjects(dkCollection ddoCollection) throws DKException, java.lang.Exception
deleteObjects
in interface dkDatastore
deleteObjects
in class dkAbstractDatastore
ddoCollectoin
- - the collection of DDOs representing items to be deleted from this persistent store.DKException
- if a problem is encountered.public void deleteObjects(dkCollection ddoCollection, int option) throws DKException, java.lang.Exception
deleteObjects
in interface dkDatastore
deleteObjects
in class dkAbstractDatastore
ddoCollectoin
- the DDO collection to be deleted from this datastore.option
- delete option, the default is 0 (zero) which will perform a regular deleteDKException
- if a problem is encountered.
DKConstantICM.DK_ICM_DELETE_ALL_VERSIONS
- Delete all versions of the item
public void moveObject(dkDataObject ddo, java.lang.String destinationItemType) throws DKException, java.lang.Exception
moveObject
in interface dkDatastoreIntICM
ddo
- the data-object to be moveddestinationItemType
- the destination item type to move this data-object to.DKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredmoveObject(dkDataObject, dkDataObject, int)
public void moveObject(dkDataObject sourceDDO, dkDataObject destinationDDO, int options) throws DKException, java.lang.Exception
moveObject
in interface dkDatastoreIntICM
sourceDDO
- the data-object to be moveddestinationDDO
- the template of destination data-objectoptions
- valid options are
DKException
- if a problem is encounteredjava.lang.Exception
- if a problem is encounteredmoveObject(dkDataObject, java.lang.String)
public void commit() throws DKException, java.lang.Exception
commit
in interface dkDatastore
commit
in class dkAbstractDatastore
DKException
- if a problem is encountered.public void rollback() throws DKException, java.lang.Exception
rollback
in interface dkDatastore
rollback
in class dkAbstractDatastore
DKException
- if a problem is encountered.public boolean isConnected() throws java.lang.Exception
isConnected
in interface dkDatastore
isConnected
in class dkAbstractDatastore
public java.lang.String datastoreName() throws java.lang.Exception
datastoreName
in interface dkDatastore
datastoreName
in class dkAbstractDatastore
public java.lang.String datastoreType() throws java.lang.Exception
datastoreType
in interface dkDatastore
datastoreType
in class dkAbstractDatastore
public DKHandle connection() throws java.lang.Exception
connection
in interface dkDatastore
connection
in class dkAbstractDatastore
public DKHandle handle(java.lang.String type) throws java.lang.Exception
handle
in interface dkDatastore
handle
in class dkAbstractDatastore
type
- type of datastore handle wanted.
Hande Types public java.lang.String userName() throws java.lang.Exception
userName
in interface dkDatastore
userName
in class dkAbstractDatastore
public dkCollection listDataSources() throws DKException, java.lang.Exception
listDataSources
in interface dkDatastore
listDataSources
in class dkAbstractDatastore
DKException
- if a problem is encountered.public java.lang.String[] listDataSourceNames() throws DKException, java.lang.Exception
listDataSourceNames
in interface dkDatastore
listDataSourceNames
in class dkAbstractDatastore
DKException
- if a problem is encountered.public dkCollection listEntities() throws DKException, java.lang.Exception
listEntities
in interface dkDatastore
listEntities
in class dkAbstractDatastore
DKException
- if an error occurs.public java.lang.String[] listEntityNames() throws DKException, java.lang.Exception
listEntityNames
in interface dkDatastore
listEntityNames
in class dkAbstractDatastore
DKException
- if an error occurs.public dkCollection listEntityAttrs(java.lang.String entityName) throws DKException, java.lang.Exception
listEntityAttrs
in interface dkDatastore
listEntityAttrs
in class dkAbstractDatastore
entityName
- the name of the entity that owns the attributes.DKException
- if the entity name does not exist.public java.lang.String[] listEntityAttrNames(java.lang.String entityName) throws DKException, java.lang.Exception
listEntityAttrNames
in interface dkDatastore
listEntityAttrNames
in class dkAbstractDatastore
entityName
- name of the entity that owns the attributes.DKException
- if the entity name does not exist.public dkDatastoreDef datastoreDef() throws DKException, java.lang.Exception
datastoreDef
in interface dkDatastore
datastoreDef
in class dkAbstractDatastore
DKException
- if a problem is encountered.DKDatastoreDefICM
public java.lang.String registerMapping(DKNVPair sourceMap) throws DKException, java.lang.Exception
registerMapping
in interface dkDatastore
registerMapping
in class dkAbstractDatastore
sourceMap
- - source name and mapping information. The name part of the NVPair specifies the source of mapping information. A string literal "SCHEMA" indicates that the mapping informaiton is provided in the value part in form of schema mapping object.DKException
- if a problem is encountered.public void unRegisterMapping(java.lang.String mappingName) throws DKException, java.lang.Exception
unRegisterMapping
in interface dkDatastore
unRegisterMapping
in class dkAbstractDatastore
mappingName
- - the name of the mapping information.DKException
- if a problem is encountered.public java.lang.String[] listMappingNames() throws DKException, java.lang.Exception
listMappingNames
in interface dkDatastore
listMappingNames
in class dkAbstractDatastore
DKException
- if a problem is encountered.public dkSchemaMapping getMapping(java.lang.String mappingName) throws DKException, java.lang.Exception
getMapping
in interface dkDatastore
getMapping
in class dkAbstractDatastore
mappingName
- - the name of the schema mapping information.DKException
- if a problem is encountered.public dkExtension getExtension(java.lang.String extensionName) throws DKException, java.lang.Exception
getExtension
in interface dkDatastore
getExtension
in class dkAbstractDatastore
extensionName
- name of the extension object.DKException
- if a problem is encountered.extension methods]
public void addExtension(java.lang.String extensionName, dkExtension extensionObj) throws DKException, java.lang.Exception
addExtension
in interface dkDatastore
addExtension
in class dkAbstractDatastore
extensionName
- - the name of new extension object.extensionObj
- - the extension object to be added.DKException
- if a problem is encountered.extension methods]
public void removeExtension(java.lang.String extensionName) throws DKException, java.lang.Exception
removeExtension
in interface dkDatastore
removeExtension
in class dkAbstractDatastore
extensionName
- - name of extension object to be removed.DKException
- if a problem is encountered.extension methods]
public java.lang.String[] listExtensionNames() throws DKException, java.lang.Exception
listExtensionNames
in interface dkDatastore
listExtensionNames
in class dkAbstractDatastore
DKException
- if a problem is encountered.extension methods]
public DKDDO createDDO(java.lang.String objectType, int flags) throws DKException, java.lang.Exception
Available Item Property Types: Item Property Constant Definition ------------- -------------- ------------------------------------------------------ Document DK_CM_DOCUMENT Item will represent a document or stored data. The information contained in this item will may form a document. This can be considered a "Common Document" since it does not rigidly mean an implementation of a specific document model. ...................................................................................... Folder DK_CM_FOLDER Item will represent an object somehow containing or referencing contents / objects. This can be considered a "Common Folder" since it does not rigidly mean an implementation of a specific document model. In the ICM Connector, it will automatically create an empty DKFolder collection which can hold contents. ...................................................................................... Item (Default) DK_CM_ITEM Generic Item. This is the Item Property Type for all Semantic Types that are not Document or Folder. -------------------------------------------------------------------------------------- Note: Constants available in com.ibm.mm.sdk.common.DKConstant.Semantic Type
Available Semantic Types: Semantic Type Constant Definition ------------- ---------------- ------------------------------------------------ <Any> <User Specified> CreateDDO will assign any value specified to the semantic type value. Since user-programs may enforce semantics as they wish, no values will be disallowed, except for Item Type Definitions of classification Document Model. .................................................................................. Document DK_ICM_SEMANTIC_ Item will represent a document or stored data. TYPE_DOCUMENT The information contained in this item will may form a document. This can be considered a "Common Document" since it does not rigidly mean an implementation of a specific document model. .................................................................................. Folder DK_ICM_SEMANTIC_ Item will represent an object somehow TYPE_FOLDER containing or referencing contents / objects. This can be considered a "Common Folder" since it does not rigidly mean an implementation of a specific document model. In the ICM Connector, it will automatically create an empty DKFolder collection which can hold contents. .................................................................................. Container DK_ICM_SEMANTIC_ Item will represent a container or generic item. TYPE_CONTAINER This is equivalent to the Item Property Type of DK_CM_ITEM. .................................................................................. Annotation DK_ICM_SEMANTIC_ CM Document Model Annotation Part. For Items TYPE_ANNOTATION created of an Item Type with a classification declaring CM Document Model, parts may be created and added to make up a document. .................................................................................. History DK_ICM_SEMANTIC_ CM Document Model History Part. For Items TYPE_HISTORY created of an Item Type with a classification declaring CM Document Model, parts may be created and added to make up a document. .................................................................................. Note DK_ICM_SEMANTIC_ CM Document Model Note Part. For Items TYPE_NOTE created of an Item Type with a classification declaring CM Document Model, parts may be created and added to make up a document. .................................................................................. Base DK_ICM_SEMANTIC_ CM Document Model Base Part. For Items TYPE_BASE created of an Item Type with a classification declaring CM Document Model, parts may be created and added to make up a document. .................................................................................. <User Defined> <User Defined> A User Defined Semantic Type. Please refer to the Semantic Type Samples for more information. ---------------------------------------------------------------------------------- Note: Constants available in com.ibm.mm.sdk.common.DKConstantICM.
createDDO
in interface dkDatastore
createDDO
in class dkAbstractDatastore
objectType
- - the name of the Item Type defined in this datastore.
The first parameter takes the name of the Item Type that defines the entire
Item. This may also be considered the Root Item Type, since the DDO returned
is the Root Component DDO. The Item Type definition should be defined at
design-time in this datastore through the System Administration Client or API.
flags
- - indicates additional properties of the DDO. This is the
Item Property / Semantic Type. The second parameter determines
the Item Property & Semantic Type of the DDO, such as Document, Folder, Item,
or User-Defined.DKException
- if errors are detected such as the following: createDDO(java.lang.String pidString)
,
createChildDDO(java.lang.String, java.lang.String)
public DKDDO createDDO(java.lang.String pidString) throws DKException, DKUsageError, java.lang.Exception
createDDO
in interface dkDatastoreIntICM
pidString
- - a string created from DKPidICM.pidString() method.DKException
- if a problem is encountered.DKUsageError
- if a problem is encountered.java.lang.Exception
- if a problem is encountered.createDDO methods]
public DKDDO createDDO(DKPidICM pid, java.lang.String[] fedAttributeList) throws DKException, DKUsageError, java.lang.Exception
pid
- - a valid instance of DKPidICM object.fedAttributeList
- - an array of attribute stringsDKException
- if a problem is encountered.DKUsageError
- if a problem is encountered.java.lang.Exception
- if a problem is encountered.createDDO methods]
public DKDDO createDDO(DKPidICM pid) throws DKException, DKUsageError, java.lang.Exception
createDDO
in interface dkDatastoreIntICM
pid
- a valid instance of DKPidICMDKException
- if a problem is encountered.DKUsageError
- if a problem is encountered.java.lang.Exception
- if a problem is encountered.createDDO methods]
public DKDDO createChildDDO(java.lang.String objectType, java.lang.String componentName) throws DKException, java.lang.Exception
createChildDDO
in interface dkDatastoreIntICM
objectType
- - the name of the item type (root).componentName
- - the name of the child component to be created.DKException
- if a problem is encountered.java.lang.Exception
- if a problem is encountered.createDDO methods above]
public void destroy() throws DKException, java.lang.Exception
destroy
in interface dkDatastore
destroy
in class dkAbstractDatastore
DKException
- if a problem is encountered.public void startTransaction() throws DKException, java.lang.Exception
startTransaction
in interface dkDatastoreIntICM
startTransaction
in class dkAbstractDatastore
DKException
- if a problem is encountered.public void checkIn(dkDataObject item) throws DKException, java.lang.Exception
checkIn
in interface dkDatastoreIntICM
item
- the item to checked in.DKException
- if a problem is encountered.public void checkOut(dkDataObject item) throws DKException, java.lang.Exception
checkOut
in interface dkDatastoreIntICM
item
- the item to checked-out.DKException
- if a problem is encountered.public void writeEvent(DKEventDefICM aEvent) throws DKException, java.lang.Exception
aEvent
- a DKEventDefICM object to be written to the event log.DKException
- if a problem is encountered.public dkCollection listEvents(java.lang.String itemId, short maxResults) throws DKException, java.lang.Exception
itemId
- an item id .maxResults
- the maxium number of DKEventDefICM objects to be returned in the collection.DKException
- if a problem is encountered.public dkCollection listAdminEvents(short maxResults) throws DKException, java.lang.Exception
maxResults
- the maxium number of events to retrieve. 0 means no limits.public dkCollection retrieveEvent(int eventCode, short maxResults) throws DKException, java.lang.Exception
eventCode
- the given event code to retrieve the DKEventDefICM object.public void changePassword(java.lang.String userId, java.lang.String oldPwd, java.lang.String newPwd) throws DKException, java.lang.Exception
dkDatastore
Note:DKUsageError exception thrown if method is not implemented
changePassword
in interface dkDatastore
changePassword
in class dkAbstractDatastore
com.ibm.mm.sdk.common.dkDatastore
userId
- - useridoldPwd
- - old passwordnewPwd
- - new passworddkUserManagement.changePassword(
java.lang.String, java.lang.String,java.lang.String)
public dkXDO retrieveFormOverlay(java.lang.String name) throws DKException, java.lang.Exception
name
- the name of the form overlay object.DKException
- if an error occurs.public boolean textSearchEnabled() throws java.lang.Exception
textSearchEnabled
in interface dkDatastoreIntICM
true
if text search is enabled,
false
otherwisepublic boolean LDAPEnabled() throws java.lang.Exception
LDAPEnabled
in interface dkDatastoreIntICM
public boolean adminDomainEnabled() throws java.lang.Exception
adminDomainEnabled
in interface dkDatastoreIntICM
public short platform()
platform
in interface dkDatastoreIntICM
public java.lang.String schemaName() throws DKException, java.lang.Exception
schemaName
in interface dkDatastoreIntICM
|
EIP Java APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |