Enterprise Information Portal APIs

com.ibm.mm.sdk.server
Class DKDatastoreIP

java.lang.Object
  |
  +--com.ibm.mm.sdk.server.dkAbstractDatastore
        |
        +--com.ibm.mm.sdk.server.DKDatastoreIP
All Implemented Interfaces:
DKConstant, DKConstantIP, dkDatastore, dkDatastoreIntIP, DKMessageId, DKMessageIdIP, dkQueryEvaluator, dkQueryManager

public class DKDatastoreIP
extends dkAbstractDatastore
implements dkDatastoreIntIP, DKConstantIP, DKMessageIdIP

The DKDatastoreIP class is the ImagePlus/390 implementation of the abstract class dkDatastore. The ImagePlus/390 datastore provides facilities to query, retrieve, update, store, and manage documents stored on an ImagePlus/390 server.

IBM Confidential

See Also:
dkDatastore

Fields inherited from interface com.ibm.mm.sdk.common.DKConstantIP
    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.DKMessageIdIP
copyright, DK_IP_MSG_API_PROTOCOL_ERROR, DK_IP_MSG_CLIENT_API_NOT_OK, DK_IP_MSG_DATASTORE_READONLY, DK_IP_MSG_DOCIDNOTSET, DK_IP_MSG_FAF_ERROR, DK_IP_MSG_FAF_INTERNAL_ERROR, DK_IP_MSG_FAF_NOT_OK, DK_IP_MSG_FAF_WARNING, DK_IP_MSG_FOLDER_NOT_EMPTY, DK_IP_MSG_HOST_TIMEOUT, DK_IP_MSG_INVALID_CONN_OPTION, DK_IP_MSG_INVALID_DOCTYPE, DK_IP_MSG_INVALID_IODM_RC, DK_IP_MSG_INVALID_PARM, DK_IP_MSG_IODM_FAILURE, DK_IP_MSG_IODM_NOT_AVAILABLE, DK_IP_MSG_LOCKEDBYANOTHER, DK_IP_MSG_MISSING_CONN_OPTION, DK_IP_MSG_MSGID_NOT_FOUND, DK_IP_MSG_PROTOCOL_ERROR
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKDatastoreIP()
          Constructs and initializes an ImagePlus/390 datastore.
DKDatastoreIP(java.lang.String configuration)
          Constructs and initializes an ImagePlus/390 datastore.
 
Method Summary
 void addExtension(java.lang.String extensionName, dkExtension extensionObj)
          Adds a new extension object, which provides a set of new functions.
 void addObject(dkDataObject ddo)
          Adds the data object (DDO) to this datastore.
 java.lang.String checkedOutUserid(dkDataObject dobj)
          Returns the userid who currently has the document or folder checked out.
 void checkIn(dkDataObject dobj)
          Checkin (unlock) document or folder item from datastore.
 void checkOut(dkDataObject dobj)
          Checkout document or folder item from datastore.
 void connect(java.lang.String datastore_name, java.lang.String user_name, java.lang.String authentication, java.lang.String connect_string)
          Connects to the datastore.
 DKHandle connection()
          Returns the connection handle for the datastore.
 DKDDO createDDO(java.lang.String objectType, int Flags)
          Creates a new DDO with object type, properties and attributes set for the ImagePlus/390 back-end server.
 dkQuery createQuery(DKCQExpr qe)
          Creates a query object using the specified common query expression.
 dkQuery createQuery(java.lang.String command, short commandLangType, DKNVPair[] params)
          Creates a query object using the specified parameters.
 dkDatastoreDef datastoreDef()
          Returns the datastore definition for this datastore.
 java.lang.String datastoreName()
          Returns the name of this datastore object.
 java.lang.String datastoreType()
          Returns the datastore type for this datastore object.
 void deleteObject(dkDataObject ddo)
          Deletes the data object (DDO) from the persistent store.
 void disconnect()
          Disconnects from the backend server.
 java.lang.Object evaluate(DKCQExpr qe)
          Evaluates a query and returns the result as an Object containing dkQueryableCollection.
 java.lang.Object evaluate(dkQuery query)
          Evaluates a query and returns the result as an Object containing dkQueryableCollection.
 java.lang.Object evaluate(java.lang.String command, short commandLangType, DKNVPair[] params)
          Evaluates a query and returns the result as an Object containing dkQueryableCollection.
 dkResultSetCursor execute(DKCQExpr cqe)
          Executes a command query against the datastore and returns a result set cursor.
 dkResultSetCursor execute(dkQuery query)
          Executes a command query against the datastore and returns a result set cursor.
 dkResultSetCursor execute(java.lang.String command, short commandLangType, DKNVPair[] params)
          Executes a command query against the datastore and returns a result set cursor.
 void executeWithCallback(DKCQExpr qe, dkCallback callbackObj)
          Execute a query using a callback function.
 void executeWithCallback(dkQuery query, dkCallback callbackObj)
          Executes a query using a callback function.
 void executeWithCallback(java.lang.String command, short commandLangType, DKNVPair[] params, dkCallback callbackObj)
          Executes a query using a callback function.
 dkExtension getExtension(java.lang.String extensionName)
          Returns the extension object of the given extension name.
 dkSchemaMapping getMapping(java.lang.String mappingName)
          Returns the mapping definition for the specified registered mapping.
 java.lang.Object getOption(int option)
          Returns the value of the specified datastore option.
 boolean isCheckedOut(dkDataObject dobj)
          Check whether a document or folder item is checked out from datastore.
 boolean isConnected()
          Checks to see if the datastore is connected.
 java.lang.String[] listDataSourceNames()
          Returns a list of the names of the data sources that one can connect to.
 dkCollection listDataSources()
          Returns a list of valid servers or data sources that one can connect to.
 dkCollection listEntities()
          Returns the list of entities defined in this datastore.
 java.lang.String[] listEntityAttrNames(java.lang.String entityName)
          Returns a list of attribute names for a given entity name.
 dkCollection listEntityAttrs(java.lang.String entityName)
          Returns a list of attributes for a given entity name.
 java.lang.String[] listEntityNames()
          Gets the list of entity names defined for this datastore.
 java.lang.String[] listExtensionNames()
          Gets the list of the names of the available extensions.
 java.lang.String[] listMappingNames()
          Returns the list of the registered mappings for this datastore.
 java.lang.Object listSchema()
          Deprecated. Replace by listEntities
 java.lang.Object listSchemaAttributes(java.lang.String schemaEntry)
          Deprecated. Replace by listEntityAttrs
 java.lang.Object listServers()
          Deprecated. Replace by listDataSources
 java.lang.String registerMapping(DKNVPair sourceMap)
          Registers a mapping definition to this datastore.
 void removeExtension(java.lang.String extensionName)
          Remove an existing extension object
 dkXDO retrieveFormOverlay(java.lang.String objid)
          Retrieves the form overlay object
 void retrieveObject(dkDataObject ddo)
          Retrieves the data object (DDO) from the persistent store into memory.
 void setOption(int option, java.lang.Object value)
          Sets the given "option" with specific "value".
 void unlockCheckedOut(dkDataObject dobj)
          Unlock the checked-out document or folder item
 void unRegisterMapping(java.lang.String mappingName)
          Unregisters mapping information from this datastore.
 void updateObject(dkDataObject ddo)
          Updates the persistent store with the new value of this data object (DDO).
 java.lang.String userName()
          Returns the user name that was used to logon to the datastore.
 
Methods inherited from class com.ibm.mm.sdk.server.dkAbstractDatastore
addObject, addObject, addObjects, addObjects, addObjects, changePassword, clearCache, clearCache, commit, deleteObject, deleteObject, deleteObjects, deleteObjects, deleteObjects, destroy, evaluate, execute, executeWithCallback, handle, listAvailableServices, listSearchableEntities, listSearchableEntityNames, listSearchTemplateNames, listSearchTemplates, retrieveObject, retrieveObject, retrieveObjects, retrieveObjects, retrieveObjects, rollback, serviceMgr, startTransaction, 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, changePassword, clearCache, clearCache, commit, deleteObject, deleteObject, deleteObjects, deleteObjects, deleteObjects, destroy, evaluate, execute, executeWithCallback, handle, listAvailableServices, listSearchableEntities, listSearchableEntityNames, listSearchTemplateNames, listSearchTemplates, retrieveObject, retrieveObject, retrieveObjects, retrieveObjects, retrieveObjects, rollback, serviceMgr, startTransaction, updateObject, updateObject, updateObjects, updateObjects, updateObjects
 

Constructor Detail

DKDatastoreIP

public DKDatastoreIP()
              throws DKException,
                     java.lang.Exception
Constructs and initializes an ImagePlus/390 datastore.

Reminder: A connection will not be established by this constructor.

See Also:
connect(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

DKDatastoreIP

public DKDatastoreIP(java.lang.String configuration)
              throws DKException,
                     java.lang.Exception
Constructs and initializes an ImagePlus/390 datastore.
Parameters:
configuration - a string which supplies the specific initialization parameters. Valid parameters include:
CC2MIMEURL=value
The URL for the file containing the content class to mime type mapping.
CC2MIMEFILE=value
The name of the file containing the content class to mime type mapping. This parameter is ignored if the CC2MIMEURL is specified.
DSNAME=value
The name of this datastore.

Reminder: A connection will not be established by this constructor.

See Also:
connect(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
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 the datastore.
Specified by:
connect in interface dkDatastore
Overrides:
connect in class dkAbstractDatastore
Parameters:
datastore_name - the name associated with a specific backend server.
user_name - the name of the user connecting to the backend server
authentication - the authentication or password being used to connect
connect_string - a string which supplies all of the specific connection parameters to establish and maintain a connection to the backend server. Valid parameters include:
APPL=value
The Application Id of the FAF Host application to connect. This MUST be specified.
FAFIP=value
The TCPIP address of the FAF Host to connect. This MUST be specified.
IODMIP=value
The TCPIP address of the IODM Host to connect. This MUST be specified.
FAFPORT=value
The TCPIP port number of the FAF Host. This MUST be specified.
IODMPORT=value
The TCPIP port number of the IODM Host. This MUST be specified.
FAFPROT=value
The communication protocol of the FAF Host. Valid values are (4000 for TCPIP on CICS, and 4500 for TCPIP on IMS). This MUST be specified.
IODMPROT=value
The communication protocol of the IODM Host. Valid values are (4000 for TCPIP on CICS, and 4500 for TCPIP on IMS). This MUST be specified.
TERMID=value
This is the IODM Terminal Id for this workstation. If not specified, the UserId will be used as the Terminal Id.
FAFSITE=value
The 4 character symbolic ID of the FAF that owns and catalogs the documents associated with this datastore. This parameter is required for locking, adding, updating or deleting annotations, and for locking folders and documents.
NPWD=value
This is the new password value to be used to change the users password at connect time. This value must have a length of 8 characters or less.
OVERLAYS=value
This is the IODM Collection Class where all form overlays are stored. If not specified, forms will be searched for from the collection class where the last document was retrieved.
IODMCNTL=value
This is the IODM document storage location control. If the document is not located at the specified location, the document will not be retrieved. Valid choices for value are:
  • DASD
    Retrieve documents from DASD only.
  • OPTICAL
    Retrieve documents from DASD or Optical only.
  • SHELF
    Retrieve documents from DASD, Optical or shelf.

Throws:
DKException - - DKUsageError: if either datastore_name, user_name, authentication or connect_string is null.
- DKDatastoreError: if connecting to the backend server is not successful.
java.lang.Exception - if an error occurs in the java classes.

disconnect

public void disconnect()
                throws DKException,
                       java.lang.Exception
Disconnects from the backend server.
Specified by:
disconnect in interface dkDatastore
Overrides:
disconnect in class dkAbstractDatastore
Throws:
DKException - - DKDatastoreAccessError: if disconnecting from the backend server is not successful.
java.lang.Exception - if an error occurs in the java classes.

getOption

public java.lang.Object getOption(int option)
                           throws DKException,
                                  java.lang.Exception
Returns the value of the specified datastore option. Options for ImagePlus/390 datastore:
DK_CM_OPT_ACCESS_MODE
This option controls the updateability of the datastore. The default is DK_CM_READWRITE.
DK_CM_OPT_CONTENT
This option controls the amount of information returned in the DKDDO objects. The default is DK_CM_CONTENT_YES.
DK_IP_OPT_INCLUDE_PENDING_DOCS
This option controls whether or not documents which are in pending state (the document contains no content) are included when searching for documents or listing the contents of folders. The default is DK_IP_PENDING_NO.

Specified by:
getOption in interface dkDatastore
Overrides:
getOption in class dkAbstractDatastore
Parameters:
option - an option identifier
Returns:
the value for the given option
Throws:
DKException - \ - DKUsageError: if an option is specified that is not valid for this type of datastore.
java.lang.Exception - if an error occurs in the java classes.

setOption

public void setOption(int option,
                      java.lang.Object value)
               throws DKException,
                      java.lang.Exception
Sets the given "option" with specific "value". Options for ImagePlus/390 datastore:
DK_CM_OPT_ACCESS_MODE
This option controls the updateability of the datastore. The default is DK_CM_READWRITE.
DK_CM_OPT_CONTENT
This option controls the amount of information returned in the DKDDO objects. The default is DK_CM_CONTENT_YES.
DK_IP_OPT_INCLUDE_PENDING_DOCS
This option controls whether or not documents which are in pending state (the document contains no content) are included when searching for documents or listing the contents of folders. The default is DK_IP_PENDING_NO.

Specified by:
setOption in interface dkDatastore
Overrides:
setOption in class dkAbstractDatastore
Parameters:
option - an option identifer
value - the new value for the "option"
Throws:
DKException - - DKUsageError: if an option is specified that is not valid for this type of datastore.
java.lang.Exception - if an error occurs in the java classes.

evaluate

public java.lang.Object evaluate(java.lang.String command,
                                 short commandLangType,
                                 DKNVPair[] params)
                          throws DKException,
                                 java.lang.Exception
Evaluates a query and returns the result as an Object containing dkQueryableCollection.
Specified by:
evaluate in interface dkDatastore
Overrides:
evaluate in class dkAbstractDatastore
Parameters:
command - a query string that represent the query criteria
commandLangType - a query language type, for ImagePlus, it will be DK_PARAMETRIC_QL_TYPE
params - additional query options in name/value pairs list
Returns:
a collection of query results
Throws:
java.lang.Exception - if an error occurs in the java classes.
DKException - - DKUsageError: if "command" argument is null
See Also:
DKNVPair

evaluate

public java.lang.Object evaluate(dkQuery query)
                          throws DKException,
                                 java.lang.Exception
Evaluates a query and returns the result as an Object containing dkQueryableCollection.
Specified by:
evaluate in interface dkDatastore
Overrides:
evaluate in class dkAbstractDatastore
Parameters:
query - a given query object
Returns:
a collection of query results
Throws:
DKException - - DKUsageError: if the "query" input is null or not of Parametric query type.
java.lang.Exception - if an error occurs in the java classes.

evaluate

public java.lang.Object evaluate(DKCQExpr qe)
                          throws DKException,
                                 java.lang.Exception
Evaluates a query and returns the result as an Object containing dkQueryableCollection.
Specified by:
evaluate in interface dkDatastore
Overrides:
evaluate in class dkAbstractDatastore
Parameters:
qe - a common query expression object - an alternate form of a query string
Returns:
a collection of query results
Throws:
DKException -  
java.lang.Exception - if an error occurs in the java classes.

execute

public dkResultSetCursor execute(java.lang.String command,
                                 short commandLangType,
                                 DKNVPair[] params)
                          throws DKException,
                                 java.lang.Exception
Executes a command query against the datastore and returns a result set cursor.
Specified by:
execute in interface dkDatastore
Overrides:
execute in class dkAbstractDatastore
Parameters:
command - a query string that represents the query criteria
commandLangType - a query language type, for ImagePlus, it will be DK_PARAMETRIC_QL_TYPE
params[] - additional query options in a name/value pairs list
Returns:
a dkResultSetCursor object which represents a DKResultSetCursorIP
Throws:
DKException - - DKUsageError: if "command" is null or invalid, or "commandLangType" is not Parametric Query type. - DKDatastoreError: if the datastore is not connected. - DKDatastoreAccessError: if the backend server returns an error during retrieval
java.lang.Exception - if an error occurs in the java classes.
See Also:
DKNVPair

execute

public dkResultSetCursor execute(dkQuery query)
                          throws DKException,
                                 java.lang.Exception
Executes a command query against the datastore and returns a result set cursor.
Specified by:
execute in interface dkDatastore
Overrides:
execute in class dkAbstractDatastore
Parameters:
query - a Parametric dkQuery object
Returns:
a dkResultSetCursor object which represents a DKResultSetCursorIP
Throws:
DKException - - DKUsageError: if "query" object is null or query.qlType() is not DK_PARAMETRIC_QL_TYPE - DKDatastoreError: if the datastore is not connected. - DKDatastoreAccessError: if the backend server returns an error during retrieval
java.lang.Exception - if an error occurs in the java classes.

execute

public dkResultSetCursor execute(DKCQExpr cqe)
                          throws DKException,
                                 java.lang.Exception
Executes a command query against the datastore and returns a result set cursor.
Specified by:
execute in interface dkDatastore
Overrides:
execute in class dkAbstractDatastore
Parameters:
cqe - a common query expression object - an alternate form of a query string
Returns:
a dkResultSetCursor object which represents a DKResultSetCursorIP
Throws:
DKException - - DKDatastoreError: if the datastore is not connected. - DKDatastoreAccessError: if the backend server returns an error during retrieval
java.lang.Exception - if an error occurs in the java classes.

executeWithCallback

public void executeWithCallback(dkQuery query,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Executes a query using a callback function.
Specified by:
executeWithCallback in interface dkDatastore
Overrides:
executeWithCallback in class dkAbstractDatastore
Parameters:
query - a query object
callbackObj - a dkCallback object
Throws:
DKException - - DKUsageError: if "query" object is null or query.qlType() is not DK_PARAMETRIC_QL_TYPE - DKDatastoreError: if the datastore is not connected. - DKDatastoreAccessError: if the backend server returns an error during retrieval
java.lang.Exception - if an error occurs in the java classes.
See Also:
dkCallback

executeWithCallback

public void executeWithCallback(java.lang.String command,
                                short commandLangType,
                                DKNVPair[] params,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Executes a query using a callback function.
Specified by:
executeWithCallback in interface dkDatastore
Overrides:
executeWithCallback in class dkAbstractDatastore
Parameters:
command - a query string
commandLang - a query type
params - additional query option in name/value pair
callbackObj - a dkCallback object
Throws:
DKException - - DKUsageError: if "command" is null or invalid, or "commandLangType" is not Parametric Query type. - DKDatastoreError: if the datastore is not connected. - DKDatastoreAccessError: if the backend server returns an error during retrieval
java.lang.Exception - if an error occurs in the java classes.
See Also:
dkCallback, DKNVPair

executeWithCallback

public void executeWithCallback(DKCQExpr qe,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Execute a query using a callback function.
Specified by:
executeWithCallback in interface dkDatastore
Overrides:
executeWithCallback in class dkAbstractDatastore
Parameters:
qe - a common query expression object - an alternate form of a query string
callbackObj - a dkCallback object
Throws:
DKException - - DKDatastoreError: if the datastore is not connected. - DKDatastoreAccessError: if the backend server returns an error during retrieval
java.lang.Exception - if an error occurs in the java classes.
See Also:
dkCallback

createQuery

public dkQuery createQuery(java.lang.String command,
                           short commandLangType,
                           DKNVPair[] params)
                    throws DKException,
                           java.lang.Exception
Creates a query object using the specified parameters. The query can be used as input to the evaluate or execute methods.
Specified by:
createQuery in interface dkDatastore
Overrides:
createQuery in class dkAbstractDatastore
Parameters:
command - a query string that represents the query criteria
commandLangType - a query type. For ImagePlus, this will always be DK_PARAMETRIC_QL_TYPE
params[] - additional query options in name/value pairs list
Returns:
DKParametricQuery object
Throws:
DKException - - DKUsageError: if "command" is null
java.lang.Exception - if an error occurs in the java classes.
See Also:
evaluate(com.ibm.mm.sdk.common.dkQuery), execute(com.ibm.mm.sdk.common.dkQuery), executeWithCallback(com.ibm.mm.sdk.common.dkQuery, com.ibm.mm.sdk.common.dkCallback), DKNVPair, DKParametricQuery

createQuery

public dkQuery createQuery(DKCQExpr qe)
                    throws DKException,
                           java.lang.Exception
Creates a query object using the specified common query expression. The query can be used as input to the evaluate or execute methods.
Specified by:
createQuery in interface dkDatastore
Overrides:
createQuery in class dkAbstractDatastore
Parameters:
qe - a common query expression object - an alternate form of a query string
Returns:
DKParametricQuery object
Throws:
DKException - - DKUsageError: if "query" object is null or query.qlType() is not DK_PARAMETRIC_QL_TYPE
java.lang.Exception - if an error occurs in the java classes.
See Also:
#evaluate(com.ibm.mm.sdk.common.dkquery), #execute(com.ibm.mm.sdk.common.dkquery), executeWithCallback(com.ibm.mm.sdk.common.dkQuery, com.ibm.mm.sdk.common.dkCallback), DKParametricQuery

addObject

public void addObject(dkDataObject ddo)
               throws DKException,
                      java.lang.Exception
Adds the data object (DDO) to this datastore. For IP/390, the following rules apply:
Specified by:
addObject in interface dkDatastore
Overrides:
addObject in class dkAbstractDatastore
Parameters:
ddo - the DDO to be added to this datastore
Throws:
DKException - - DKDatastoreAccessError: if the backend server returns an error during object creation - DKDataObjectAlreadyExists: if the DDO being added already exists in this datastore
java.lang.Exception - if an error occurs in the java classes.
See Also:
DKDDO

deleteObject

public void deleteObject(dkDataObject ddo)
                  throws DKException,
                         java.lang.Exception
Deletes the data object (DDO) from the persistent store. If the data object is a document, the content of the object will be deleted, as well. If the data object is a folder, the folder must be empty in order to delete the folder. The in-memory copy of the data object is not affected.
For IP/390, the following rules apply:
Specified by:
deleteObject in interface dkDatastore
Overrides:
deleteObject in class dkAbstractDatastore
Parameters:
ddo - The DDO object to be deleted
Throws:
DKException - - DKDatastoreAccessError: if the backend server returns an error during object creation - DKDataObjectNotFound: if the DDO being deleted does not exist in this datastore
java.lang.Exception - if an error occurs in the java classes.
See Also:
DKDDO

retrieveObject

public void retrieveObject(dkDataObject ddo)
                    throws DKException,
                           java.lang.Exception
Retrieves the data object (DDO) from the persistent store into memory.
For IP/390, the following rules apply:
Specified by:
retrieveObject in interface dkDatastore
Overrides:
retrieveObject in class dkAbstractDatastore
Parameters:
ddo - The DDO to be retrieved from this datastore
Throws:
DKException - - DKDatastoreAccessError: if the backend server returns an error during object creation
java.lang.Exception - if an error occurs in the java classes.
See Also:
DKDDO

updateObject

public void updateObject(dkDataObject ddo)
                  throws DKException,
                         java.lang.Exception
Updates the persistent store with the new value of this data object (DDO).
For IP/390, the following rules apply:
Specified by:
updateObject in interface dkDatastore
Overrides:
updateObject in class dkAbstractDatastore
Parameters:
ddo - The DDO to be updated in this datastore
Throws:
DKException -  
java.lang.Exception - if an error occurs in the java classes.
See Also:
DKDDO

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, false otherwise
Throws:
java.lang.Exception - if an error occurs in the java classes.

datastoreName

public java.lang.String datastoreName()
                               throws java.lang.Exception
Returns the name of this datastore object. Represents the datastore's server name.
Specified by:
datastoreName in interface dkDatastore
Overrides:
datastoreName in class dkAbstractDatastore
Returns:
the name of the datastore, the server name
Throws:
java.lang.Exception - if an error occurs in the java classes.

datastoreType

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

connection

public DKHandle connection()
                    throws java.lang.Exception
Returns the connection handle for the datastore.
Specified by:
connection in interface dkDatastore
Overrides:
connection in class dkAbstractDatastore
Returns:
the connection handle
Throws:
java.lang.Exception - if an error occurs in the java classes.

userName

public java.lang.String userName()
                          throws java.lang.Exception
Returns the user name that was used to logon to the datastore.
Specified by:
userName in interface dkDatastore
Overrides:
userName in class dkAbstractDatastore
Returns:
the userid that was used to logon
Throws:
java.lang.Exception - if an error occurs in the java classes.

listDataSources

public dkCollection listDataSources()
                             throws DKException,
                                    java.lang.Exception
Returns a list of valid servers or data sources that one can connect to. The return value is a sequential collection containing objects decribing each server or data source. The object will be specific for each datastore implementation.
Specified by:
listDataSources in interface dkDatastore
Overrides:
listDataSources in class dkAbstractDatastore
Returns:
a collection of server or data source definitions
Note: For IP/390 this will always be an empty list.
Throws:
DKException -  
java.lang.Exception - if an error occurs in the java classes.

listDataSourceNames

public java.lang.String[] listDataSourceNames()
                                       throws DKException,
                                              java.lang.Exception
Returns a list of the names of the data sources that one can connect to.
Specified by:
listDataSourceNames in interface dkDatastore
Overrides:
listDataSourceNames in class dkAbstractDatastore
Returns:
an array of data source names Note: For IP/390 this will always be an empty list.
Throws:
DKException -  
java.lang.Exception - if an error occurs in the java classes.

listServers

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

Returns a list of valid servers or data sources that one can connect to. The return value is a sequential collection containing objects decribing each server or data source. The object will be specific for each datastore implementation.
Specified by:
listServers in interface dkDatastore
Overrides:
listServers in class dkAbstractDatastore
Returns:
a collection of server or data source definitions
Throws:
DKException -  
java.lang.Exception - if an error occurs in the java classes.
See Also:
listDataSources()

listEntities

public dkCollection listEntities()
                          throws DKException,
                                 java.lang.Exception
Returns the list of entities defined in this datastore.
Specified by:
listEntities in interface dkDatastore
Overrides:
listEntities in class dkAbstractDatastore
Returns:
a collection of dkEntityDef object
Throws:
DKException -  
java.lang.Exception - if an error occurs in the java classes.

listEntityNames

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

listEntityAttrs

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

listEntityAttrNames

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

listSchema

public java.lang.Object listSchema()
                            throws DKException,
                                   java.lang.Exception
Deprecated. Replace by listEntities

Returns the list of entities (schemas) defined in this datastore.
Specified by:
listSchema in interface dkDatastore
Overrides:
listSchema in class dkAbstractDatastore
Returns:
This method always returns an empty collection.
Throws:
DKException -  
java.lang.Exception - if an error occurs in the java classes.
See Also:
listEntities()

listSchemaAttributes

public java.lang.Object listSchemaAttributes(java.lang.String schemaEntry)
                                      throws DKException,
                                             java.lang.Exception
Deprecated. Replace by listEntityAttrs

Returns a list of attributes for a given schema name.
Specified by:
listSchemaAttributes in interface dkDatastore
Overrides:
listSchemaAttributes in class dkAbstractDatastore
Parameters:
schemaEntry - the name of the schema
Returns:
This method always returns an empty collection.
Throws:
DKException -  
java.lang.Exception - if an error occurs in the java classes.
See Also:
listEntityAttrs(java.lang.String)

datastoreDef

public dkDatastoreDef datastoreDef()
                            throws DKException,
                                   java.lang.Exception
Returns the datastore definition for this datastore.
Specified by:
datastoreDef in interface dkDatastore
Overrides:
datastoreDef in class dkAbstractDatastore
Returns:
the meta-data (dkDatastoreDef) of this datastore
Throws:
DKException -  
java.lang.Exception - if an error occurs in the java classes.
See Also:
DKDatastoreDefIP

registerMapping

public java.lang.String registerMapping(DKNVPair sourceMap)
                                 throws DKException,
                                        java.lang.Exception
Registers a mapping definition to this datastore. Mapping is done by entities.
Specified by:
registerMapping in interface dkDatastore
Overrides:
registerMapping in class dkAbstractDatastore
Parameters:
sourceMap - source name and mapping, a DKNVPair class with the following possible values:
  • ("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 name of the mapping definition.
See Also:
unRegisterMapping(java.lang.String)

unRegisterMapping

public void unRegisterMapping(java.lang.String mappingName)
                       throws DKException,
                              java.lang.Exception
Unregisters mapping information from this datastore.
Specified by:
unRegisterMapping in interface dkDatastore
Overrides:
unRegisterMapping in class dkAbstractDatastore
Parameters:
mappingName - name of the mapping information
Returns:
an array of register mapping objects' names
See Also:
registerMapping(com.ibm.mm.sdk.common.DKNVPair)

listMappingNames

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

getMapping

public dkSchemaMapping getMapping(java.lang.String mappingName)
                           throws DKException,
                                  java.lang.Exception
Returns the mapping definition for the specified registered mapping.
Specified by:
getMapping in interface dkDatastore
Overrides:
getMapping in class dkAbstractDatastore
Parameters:
mappingName - name of the mapping definition
Returns:
the mapping object
Throws:
DKException -  
java.lang.Exception - if an error occurs in the java classes.
See Also:
registerMapping(com.ibm.mm.sdk.common.DKNVPair)

getExtension

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

addExtension

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

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 - name of extension object to be removed
Throws:
DKException -  
java.lang.Exception - if an error occurs in the java classes.

listExtensionNames

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

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 the ImagePlus/390 back-end server.
Specified by:
createDDO in interface dkDatastore
Overrides:
createDDO in class dkAbstractDatastore
Parameters:
objectType - the object type you want to create
Flags - to indicate various options to specify more detail characteristics of the DDO to create. For example, it may be a directive to create a document DDO, a folder, etc.
Returns:
a new DDO of the given object type with all the properties and attributes set, so that the user only need to set the attribute values.
Throws:
DKException -  
java.lang.Exception - if an error occurs in the java classes.

retrieveFormOverlay

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

unlockCheckedOut

public void unlockCheckedOut(dkDataObject dobj)
                      throws DKException,
                             java.lang.Exception
Unlock the checked-out document or folder item
Specified by:
unlockCheckedOut in interface dkDatastoreIntIP
Parameters:
dobj - data object (document or folder item)

checkOut

public void checkOut(dkDataObject dobj)
              throws DKException,
                     java.lang.Exception
Checkout document or folder item from datastore.
For IP/390, the following rules apply:
Specified by:
checkOut in interface dkDatastoreIntIP
Parameters:
dobj - data object (document or folder item)

checkIn

public void checkIn(dkDataObject dobj)
             throws DKException,
                    java.lang.Exception
Checkin (unlock) document or folder item from datastore.
For IP/390, the following rules apply:
Specified by:
checkIn in interface dkDatastoreIntIP
Parameters:
dobj - data object (document or folder item)

isCheckedOut

public boolean isCheckedOut(dkDataObject dobj)
                     throws DKException,
                            java.lang.Exception
Check whether a document or folder item is checked out from datastore. For IP/390, the following rules apply:
Specified by:
isCheckedOut in interface dkDatastoreIntIP
Parameters:
dobj - data object (document or folder item)
Returns:
a boolean indicating if it is checked out or not

checkedOutUserid

public java.lang.String checkedOutUserid(dkDataObject dobj)
                                  throws DKException,
                                         java.lang.Exception
Returns the userid who currently has the document or folder checked out.
For IP/390, the following rules apply:
Specified by:
checkedOutUserid in interface dkDatastoreIntIP
Parameters:
dobj - data object (document or folder item)
Returns:
a userid or empty string (i.e., not checked out)

EIP Java APIs

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