|
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.DKDatastoreFed
DKDatastoreFed is a specific version of dkDatastore to implement a federation of
datastores. Federated datastore provides facilities to store, manage,
query, and retrieve documents which may contain multi-media data across
multiple heterogeneous backend servers.
Fields inherited from interface com.ibm.mm.sdk.common.DKConstantFed |
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.DKMessageIdFed |
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 | |
DKDatastoreFed()
Constructs the datastore and initializes it with the default configuration. |
|
DKDatastoreFed(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. |
void |
addObject(dkDataObject dataobj)
Adds a DDO object - since federated datastore does not allow adding object dynamically, this method will throw DKUsageError exception. |
void |
addObject(dkDataObject dataobj,
DKNVPair[] options)
Adds a DDO object - since federated datastore does not allow adding object dynamically, this method will throw DKUsageError exception. |
void |
addObject(dkDataObject dataobj,
int option)
Adds a DDO object - since federated datastore does not allow adding object dynamically, this method will throw DKUsageError exception. |
void |
clearCache()
Clear datastore cache |
void |
commit()
Commits all activities since the last commit. |
void |
connect(java.lang.String datastore_name,
java.lang.String user_name,
java.lang.String authentication,
java.lang.String connect_string)
Establish a connection to a federated datastore. |
DKHandle |
connection()
Gets the connection handle for the datastore |
void |
connectToService(dkService service)
Connects to a service |
void |
connectToService(java.lang.String serviceId)
Connects to a service |
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 an federated query object. |
dkDatastoreDef |
datastoreDef()
Get 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 dataobj)
Deletes a data-object. |
void |
deleteObject(dkDataObject dataobj,
DKNVPair[] options)
Deletes a data-object. |
void |
deleteObject(dkDataObject dataobj,
int option)
Deletes a data-object. |
void |
destroy()
datastore destroy - datastore cleanup if needed |
void |
disconnect()
Disconnects from the federated datastore. |
java.lang.Object |
evaluate(DKCQExpr qe)
Evaluates a query. |
java.lang.Object |
evaluate(dkQuery query)
Evaluates a query and returns the result as a DKAny containing dkQueryableCollection. |
java.lang.Object |
evaluate(java.lang.String command,
short commandLangType,
DKNVPair[] params)
Evaluates a query and returns the result as a dkQueryableCollection object. |
dkResultSetCursor |
execute(DKCQExpr cqe)
Executes a query expression. |
dkResultSetCursor |
execute(dkQuery query)
Executes a command query of the federated datastore and returns a result set cursor. |
dkResultSetCursor |
execute(java.lang.String command,
short commandLangType,
DKNVPair[] params)
Executes a command query of the federated datastore and returns a result set cursor. |
void |
executeWithCallback(DKCQExpr cqe,
dkCallback callbackObj)
Execute a query expression with callback function. |
void |
executeWithCallback(dkQuery query,
dkCallback callbackObj)
Executes a 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 a mapping information from this datastore. |
java.lang.Object |
getOption(int option)
Gets defined datastore option |
dkSearchTemplate |
getSearchTemplate(java.lang.String templateName)
Gets a search template information from a given template name |
DKHandle |
handle(java.lang.String type)
Gets a datastore handle |
boolean |
isConnected()
Checks to see if the datastore is connected |
java.lang.String[] |
listDataSourceNames()
Gets a list of datasource names |
dkCollection |
listDataSources()
List the available datastore sources that you can connect to. |
dkCollection |
listEntities()
Gets a list of federated entities from Federated server. |
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 federated entities names from Federated server. |
java.lang.String[] |
listExtensionNames()
Gets the list of extension objects' names |
java.lang.String[] |
listMappingNames()
Gets the list of the registered mappings for this datastore |
java.lang.String[] |
listParmEntityNames()
Gets a list of federated parametric search entities names from Federated server. |
java.lang.String[] |
listSearchTemplateNames()
Gets a list search templates' names from an federated server |
dkCollection |
listSearchTemplates()
Gets a list search templates from an federated server |
java.lang.String[] |
listTextEntityNames()
Gets a list of federated text search entities names from Federated server. |
java.lang.String |
registerMapping(DKNVPair sourceMap)
Registers a mapping definition to this datastore. |
void |
removeExtension(java.lang.String extensionName)
Remove an existing extension object |
void |
retrieveObject(dkDataObject dataobj)
Retrieves a data-object. |
void |
retrieveObject(dkDataObject dataobj,
DKNVPair[] options)
Retrieves a data-object. |
void |
retrieveObject(dkDataObject dataobj,
int option)
Retrieves a data-object. |
void |
rollback()
Rollbacks all activities since the last commit. |
java.lang.String |
schemaName()
Returns the schema Name |
dkServiceMgr |
serviceMgr()
Gets a service manager |
void |
setOption(int option,
java.lang.Object value)
Sets the given "option" with a specific "value" |
void |
unRegisterMapping(java.lang.String mappingName)
Unregisters mapping information from this datastore. |
void |
updateObject(dkDataObject dataobj)
Updates the data-object. |
void |
updateObject(dkDataObject dataobj,
DKNVPair[] options)
Updates the data-object. |
void |
updateObject(dkDataObject dataobj,
int option)
Updates the data-object. |
java.lang.String |
userName()
Gets the user name that used to logon to the datastore |
Methods inherited from class com.ibm.mm.sdk.server.dkAbstractDatastore |
addObjects, addObjects, addObjects, changePassword, clearCache, deleteObjects, deleteObjects, deleteObjects, evaluate, execute, executeWithCallback, listAvailableServices, listSchema, listSchemaAttributes, listSearchableEntities, listSearchableEntityNames, listServers, retrieveObjects, retrieveObjects, retrieveObjects, startTransaction, 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.dkFederation |
changePassword, clearExcludedServers, datastoreByServerName, datastoreByServerName, excludeServer, listExcludedServers, requestConnection |
Constructor Detail |
public DKDatastoreFed() throws DKException, java.lang.Exception
DKException
- if a problem is encountered.public DKDatastoreFed(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:
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 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 class dkAbstractDatastore
DKException
- for if unable to disconnect from server.public java.lang.Object getOption(int option) throws DKException
getOption
in class dkAbstractDatastore
option
- an option idDKException
- if option is not setpublic void setOption(int option, java.lang.Object value) throws DKException
setOption
in class dkAbstractDatastore
option
- an option idvalue
- the value for the "option"DKException
- if option/value is invalidpublic java.lang.Object evaluate(java.lang.String command, short commandLangType, DKNVPair[] params) throws DKException, java.lang.Exception
evaluate
in class dkAbstractDatastore
command
- a query stirng that represent the query criteriacommandLangType
- a query language type, for Federated, it will
be DK_FEDERATED_QL_TYPEparams
- a name/value pairs listDKException
- if "command" argument is nullpublic java.lang.Object evaluate(dkQuery query) throws DKException, java.lang.Exception
evaluate
in class dkAbstractDatastore
query
- a given query objectDKException
- if the "query" input is null or not of
federated query type.public java.lang.Object evaluate(DKCQExpr qe) throws DKException, java.lang.Exception
evaluate
in class dkAbstractDatastore
qe
- a common query expression objectDKException
- if common query expression object is invalidpublic dkResultSetCursor execute(java.lang.String command, short commandLangType, DKNVPair[] params) throws DKException, java.lang.Exception
execute
in class dkAbstractDatastore
command
- a query string that represents the query criteria.commandLangType
- a query language type, for Federated, it will
be DK_FEDERATED_QL_TYPE.params[]
- a name/value pairs list.DKException
- if "command" is null or invalid, or
"commandLangType" is not Federated Query type.public dkResultSetCursor execute(dkQuery query) throws DKException, java.lang.Exception
execute
in class dkAbstractDatastore
query
- an Federated dkQuery objectDKException
- if "query" object is null or query.qlType() is not
DK_FEDERATED_QL_TYPEpublic dkResultSetCursor execute(DKCQExpr cqe) throws DKException, java.lang.Exception
execute
in class dkAbstractDatastore
cqe
- a common query expression objectDKException
- if "cqe" object is invalidpublic void executeWithCallback(dkQuery query, dkCallback callbackObj) throws DKException, java.lang.Exception
executeWithCallback
in class dkAbstractDatastore
query
- a query objectcallbackObj
- a dkCallback objectpublic void executeWithCallback(java.lang.String command, short commandLangType, DKNVPair[] params, dkCallback callbackObj) throws DKException, java.lang.Exception
executeWithCallback
in class dkAbstractDatastore
command
- a query stringcommandLang
- a query typeparams
- additional query option in name/value paircallbackObj
- a dkCallback objectpublic void executeWithCallback(DKCQExpr cqe, dkCallback callbackObj) throws DKException, java.lang.Exception
executeWithCallback
in class dkAbstractDatastore
cqe
- a common query expression objectcallbackObj
- a dkCallback objectpublic dkQuery createQuery(java.lang.String command, short commandLangType, DKNVPair[] params) throws DKException
createQuery
in class dkAbstractDatastore
command
- a query string that represents the query criteriacommandLangType
- a query language type,
it will be one of the following:
params[]
- a name/value pairs listDKException
- if "command" is nullpublic dkQuery createQuery(DKCQExpr qe) throws DKException
createQuery
in class dkAbstractDatastore
cqe
- a common query expression objectDKException
- if "cqe" object is invalidpublic dkCollection listDataSources() throws DKException, java.lang.Exception
listDataSources
in class dkAbstractDatastore
DKException
- if internal error occurs from serverpublic java.lang.String[] listDataSourceNames() throws DKException, java.lang.Exception
listDataSourceNames
in class dkAbstractDatastore
DKException
- if error occurs when retrieving datasource namespublic void addObject(dkDataObject dataobj) throws DKException, java.lang.Exception
addObject
in class dkAbstractDatastore
ddo
- an Federated object to be add.DKException
- is thrown for all calls to this method.public void addObject(dkDataObject dataobj, int option) throws DKException, java.lang.Exception
addObject
in class dkAbstractDatastore
ddo
- an Federated object to be add.option
- option for addDKException
- is thrown for all calls to this method.public void addObject(dkDataObject dataobj, DKNVPair[] options) throws DKException, java.lang.Exception
addObject
in class dkAbstractDatastore
ddo
- an Federated object to be add.options
- options for addDKException
- is thrown for all calls to this method.public void deleteObject(dkDataObject dataobj) throws DKException, java.lang.Exception
deleteObject
in class dkAbstractDatastore
ddo
- an Federated DDO object to be deletedDKException
- since Federated server does not support
deletion of documents for now.public void deleteObject(dkDataObject dataobj, int option) throws DKException, java.lang.Exception
deleteObject
in class dkAbstractDatastore
ddo
- an Federated DDO object to be deletedoption
- option for deleteDKException
- since Federated server does not support
deletion of documents for now.public void deleteObject(dkDataObject dataobj, DKNVPair[] options) throws DKException, java.lang.Exception
deleteObject
in class dkAbstractDatastore
ddo
- an Federated DDO object to be deletedoptions
- options for deleteDKException
- since Federated server does not support
deletion of documents for now.public void retrieveObject(dkDataObject dataobj) throws DKException, java.lang.Exception
retrieveObject
in class dkAbstractDatastore
ddo
- document object to be retrieved.DKException
- when retrieve failed.public void retrieveObject(dkDataObject dataobj, int option) throws DKException, java.lang.Exception
retrieveObject
in class dkAbstractDatastore
ddo
- document object to be retrieved.option
- option for retrieveDKException
- when retrieve failed.public void retrieveObject(dkDataObject dataobj, DKNVPair[] options) throws DKException, java.lang.Exception
retrieveObject
in class dkAbstractDatastore
ddo
- document object to be retrieved.options
- options for retrieveDKException
- when retrieve failed.public void updateObject(dkDataObject dataobj) throws DKException, java.lang.Exception
updateObject
in class dkAbstractDatastore
ddo
- the data-object to be updated.DKException
- if error occurs in the datastorepublic void updateObject(dkDataObject dataobj, int option) throws DKException, java.lang.Exception
updateObject
in class dkAbstractDatastore
ddo
- the data-object to be updated.option
- option for updateDKException
- if error occurs in the datastorepublic void updateObject(dkDataObject dataobj, DKNVPair[] options) throws DKException, java.lang.Exception
updateObject
in class dkAbstractDatastore
ddo
- the data-object to be updated.options
- options for updateDKException
- if error occurs in the datastorepublic void commit() throws DKException
commit
in class dkAbstractDatastore
DKException
- is thrown since federated datastore does not support
transaction scope for now.public void rollback() throws DKException
rollback
in class dkAbstractDatastore
DKException
- is thrown since Federated does not support
transaction scope for now.public boolean isConnected()
isConnected
in class dkAbstractDatastore
public DKHandle connection() throws java.lang.Exception
connection
in class dkAbstractDatastore
public DKHandle handle(java.lang.String type) throws java.lang.Exception
handle
in class dkAbstractDatastore
type
- type of datastore handle wantedpublic java.lang.String userName()
userName
in class dkAbstractDatastore
public java.lang.String datastoreName() throws java.lang.Exception
datastoreName
in class dkAbstractDatastore
public java.lang.String datastoreType() throws java.lang.Exception
datastoreType
in class dkAbstractDatastore
public dkDatastoreDef datastoreDef() throws DKException, java.lang.Exception
datastoreDef
in class dkAbstractDatastore
public dkCollection listEntities() throws DKException, java.lang.Exception
listEntities
in class dkAbstractDatastore
DKException
- if error occurspublic java.lang.String[] listEntityNames() throws DKException, java.lang.Exception
listEntityNames
in class dkAbstractDatastore
DKException
- if error occurspublic java.lang.String[] listTextEntityNames() throws DKException, java.lang.Exception
DKException
- if error occurspublic java.lang.String[] listParmEntityNames() throws DKException, java.lang.Exception
DKException
- if error occurspublic dkCollection listEntityAttrs(java.lang.String entityName) throws DKException, java.lang.Exception
listEntityAttrs
in class dkAbstractDatastore
entityName
- name of entity to retrieve attributes forDKException
- if the entity name does not existpublic java.lang.String[] listEntityAttrNames(java.lang.String entityName) throws DKException, java.lang.Exception
listEntityAttrNames
in class dkAbstractDatastore
entityName
- name of entity to retrieve attribute names forDKException
- if the entity name does not existpublic java.lang.String registerMapping(DKNVPair sourceMap) throws DKException, java.lang.Exception
registerMapping
in class dkAbstractDatastore
sourceMap
- source name and mapping, a DKNVPair class with the following
possible values:
unRegisterMapping(java.lang.String)
public void unRegisterMapping(java.lang.String mappingName) throws DKException, java.lang.Exception
unRegisterMapping
in class dkAbstractDatastore
mappingName
- name of the mapping informationregisterMapping(com.ibm.mm.sdk.common.DKNVPair)
public java.lang.String[] listMappingNames() throws DKException, java.lang.Exception
listMappingNames
in class dkAbstractDatastore
registerMapping(com.ibm.mm.sdk.common.DKNVPair)
public dkSchemaMapping getMapping(java.lang.String mappingName) throws DKException, java.lang.Exception
getMapping
in class dkAbstractDatastore
mappingName
- name of the mapping informationregisterMapping(com.ibm.mm.sdk.common.DKNVPair)
public dkExtension getExtension(java.lang.String extensionName) throws DKException, java.lang.Exception
getExtension
in class dkAbstractDatastore
extensionName
- name of the extension object.public void addExtension(java.lang.String extensionName, dkExtension extensionObj) throws DKException, java.lang.Exception
addExtension
in class dkAbstractDatastore
extensionName
- name of new extension objectextensionObj
- the extension object to be setpublic void removeExtension(java.lang.String extensionName) throws DKException, java.lang.Exception
removeExtension
in class dkAbstractDatastore
extensionName
- name of extension object to be removedpublic java.lang.String[] listExtensionNames() throws DKException, java.lang.Exception
listExtensionNames
in class dkAbstractDatastore
public DKDDO createDDO(java.lang.String objectType, int Flags) throws DKException, java.lang.Exception
createDDO
in class dkAbstractDatastore
objectType
- the object type you want to create. This must be
a federated object type.Flags
- Indicate various options to specify
more detail characteristics of the DDO to create.
For example, it may create a
document DDO, a folder DDO or an item DDO.
Valid values are (DK_CM_DOCUMENT, DK_CM_FOLDER or DK_CM_ITEM).public dkServiceMgr serviceMgr() throws DKException, java.lang.Exception
serviceMgr
in interface dkFederation
serviceMgr
in class dkAbstractDatastore
public void connectToService(dkService service) throws DKException, java.lang.Exception
connectToService
in interface dkFederation
service
- a service objectpublic void connectToService(java.lang.String serviceId) throws DKException, java.lang.Exception
connectToService
in interface dkFederation
service
- a service idpublic dkCollection listSearchTemplates() throws DKException, java.lang.Exception
listSearchTemplates
in interface dkFederation
listSearchTemplates
in class dkAbstractDatastore
DKException
- if internal datastore error occurspublic java.lang.String[] listSearchTemplateNames() throws DKException, java.lang.Exception
listSearchTemplateNames
in interface dkFederation
listSearchTemplateNames
in class dkAbstractDatastore
DKException
- if internal datastore error occurspublic dkSearchTemplate getSearchTemplate(java.lang.String templateName) throws DKException, java.lang.Exception
getSearchTemplate
in interface dkFederation
DKException
- if internal datastore error occurspublic void clearCache() throws DKException, java.lang.Exception
Note:DKUsageError exception thrown if method is not implemented
clearCache
in class dkAbstractDatastore
public void destroy() throws DKException, java.lang.Exception
destroy
in class dkAbstractDatastore
public java.lang.String schemaName() throws DKException, java.lang.Exception
|
EIP Java APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |