Enterprise Information Portal APIs

com.ibm.mm.beans
Class CMBConnection

java.lang.Object
  |
  +--com.ibm.mm.beans.CMBConnection
All Implemented Interfaces:
CMBBaseConstant, CMBConnectionRequestListener, java.util.EventListener, java.io.Serializable, java.beans.VetoableChangeListener

public class CMBConnection
extends java.lang.Object
implements java.io.Serializable, java.beans.VetoableChangeListener, CMBBaseConstant, CMBConnectionRequestListener

The CMBConnection bean provides EIP federated database as well as a specific Content Server connection management functions. This bean is required in order to use any of the EIP JavaBeans. Most of the EIP JavaBeans have a connection property that should be set to a single instance of this bean for the session.

By default, this bean also provides schema management, data management, and workflow functionality. To disable it/them, set the schema, data, and workflow management enabled options to false. When these options are set enabled, the schema, data, and workflow management beans automatically delegate the Trace and Exception events to this Connection bean. This together provides users with transparent error and trace capability from the child beans.

Summary of properties and events:

   imported properties   server name, server port, user id, password, and
                         new password; will veto if connection is made
                         trace option, defaulting off, will not veto
   exported properties   none
   standalone properties is server local (to the application),
                         schema management enabled, data management enabled
                         both defaulting true
                         workflow data management enabled, default true
   interested in events  CMBConnectionRequestEvent - to service the requests
                         VetoableChangeEvent      - to import property values
   source of events      CMBConnectionReplyEvent  - to reply the request
                         CMBExceptionEvent        - to post exception
                         CMBTraceEvent            - to let logger trace
 

The general EIP JavaBeans design principles for posting exception events versus throwing exceptions are:

  1. Beans post events (both function status events and exception events) only if the functions are invoked via events. For builder tool users, beans can be connected through events. The tool users can also handle exceptions through events.
  2. Methods themselves don't post any event. They throw exceptions on errors. The hand-code programmers can conveniently call the methods using the try and catch convention. If exception received, hand-code programmers handle the the errors at their will.
These principles are followed by all non-visual CM beans.

Since:
6.1
See Also:
Serialized Form

Fields inherited from interface com.ibm.mm.beans.CMBBaseConstant
ANNOTATION_MIME_TYPE, CMB_CLASS_ICM_DOC_MODEL, CMB_CLASS_ICM_DOC_PART, CMB_CLASS_ITEM, CMB_CLASS_RESOURCE_ITEM, CMB_CLASS_UNDEFINED, CMB_CONNTYPE_DYNAMIC, CMB_CONNTYPE_LOCAL, CMB_CONNTYPE_REMOTE, CMB_CONTENT_ATTRONLY, CMB_CONTENT_CHILDREN, CMB_CONTENT_ITEMTREE, CMB_CONTENT_LINKS_INBOUND, CMB_CONTENT_LINKS_OUTBOUND, CMB_CONTENT_YES, CMB_DATATYPE_COLLECTION, CMB_DATATYPE_COLLECTION_DDO, CMB_DATATYPE_COLLECTION_XDO, CMB_DATATYPE_DATAOBJECTBASE, CMB_DATATYPE_DATE, CMB_DATATYPE_DECIMAL, CMB_DATATYPE_DOUBLE, CMB_DATATYPE_FLOAT, CMB_DATATYPE_FSTRING, CMB_DATATYPE_ITEM, CMB_DATATYPE_ITEM_COLLECTION, CMB_DATATYPE_LONG, CMB_DATATYPE_OBJECT, CMB_DATATYPE_OBJECT_COLLECTION, CMB_DATATYPE_SHORT, CMB_DATATYPE_TIME, CMB_DATATYPE_TIMESTAMP, CMB_DATATYPE_UNDEFINED, CMB_DATATYPE_VSTRING, CMB_DSTYPE_CM, CMB_DSTYPE_DB2, CMB_DSTYPE_DES, CMB_DSTYPE_DJ, CMB_DSTYPE_DL, CMB_DSTYPE_DOMDOC, CMB_DSTYPE_FED, CMB_DSTYPE_FN, CMB_DSTYPE_IC, CMB_DSTYPE_ICM, CMB_DSTYPE_IP390, CMB_DSTYPE_JDBC, CMB_DSTYPE_OD, CMB_DSTYPE_VI400, CMB_EIP_LOGOUT, CMB_OBJTYPE_CMBITEM, CMB_OBJTYPE_CMBOBJECT, CMB_OP_AND, CMB_OP_BETWEEN, CMB_OP_CONTAINS_TEXT, CMB_OP_CONTAINS_TEXT_IN_CONTENT, CMB_OP_EQUAL, CMB_OP_GREATER, CMB_OP_GREATER_EQUAL, CMB_OP_IN, CMB_OP_LESS, CMB_OP_LESS_EQUAL, CMB_OP_LIKE, CMB_OP_NOT, CMB_OP_NOT_BETWEEN, CMB_OP_NOT_EQUAL, CMB_OP_NOT_IN, CMB_OP_NOT_LIKE, CMB_OP_OR, CMB_OP_UNDEFINED, CMB_QS_TYPE_COMBINED, CMB_QS_TYPE_DES, CMB_QS_TYPE_FEDERATED, CMB_QS_TYPE_IMAGE, CMB_QS_TYPE_PARAMETRIC, CMB_QS_TYPE_SQL, CMB_QS_TYPE_TEMPLATE, CMB_QS_TYPE_TEXT, CMB_QS_TYPE_UNKNOWN, CMB_QS_TYPE_XPATH, CMB_ST_SKIP_ALWAYS, CMB_ST_SKIP_NEVER, CMB_ST_SKIP_WITH_PROMPT, CMB_STATUS_FAILED, CMB_STATUS_OK, CMB_STATUS_RESULT_END, CMB_STATUS_RESULT_MORE, CMB_STATUS_RESULT_NEW, CMB_TIMESTAMP_UNDEFINED, CMB_TYPE_DOCUMENT, CMB_TYPE_FOLDER, CMB_TYPE_ITEM, CMB_TYPE_UNKNOWN, CMB_USERID_UNDEFINED, CMB_VERSION_CONTROL_ALWAYS_NEW, CMB_VERSION_CONTROL_BY_APP, CMB_VERSION_CONTROL_NEVER, CMB_VERSION_KEYWORD, CMB_VERSION_LATEST, CMB_VERSION_NEW, PROP_CACHE_ENABLED, PROP_CC2MIME_URL, PROP_CONNECTION, PROP_CONNECTION_TYPE, PROP_DATA_MANAGEMENT_ENABLED, PROP_DSTYPE, PROP_LOCAL_SERVER, PROP_NAME, PROP_NEW_PASSWORD, PROP_PASSWORD, PROP_PORT_NUMBER, PROP_QUERY_CALLBACK_THRESHOLD, PROP_QUERY_MAX_RESULTS, PROP_RESULT_PAGESIZE, PROP_RMI_HOSTNAME, PROP_SCHEMA_MANAGEMENT_ENABLED, PROP_SEARCH_ASYNCH, PROP_SEARCH_MULTI_CHARS_WILDCARD, PROP_SEARCH_PARAMETRIC_WILDCARD, PROP_SEARCH_SINGLE_CHAR_WILDCARD, PROP_SEARCH_SKIP_SERVER, PROP_SEARCH_TIMEOUT, PROP_SERVER_NAME, PROP_SV_CONNECTION_TYPE, PROP_SV_PORT_NUMBER, PROP_SV_RMI_HOSTNAME, PROP_TRACE_ENABLED, PROP_USERID
 
Constructor Summary
CMBConnection()
          Constructs a new instance of connection bean
 
Method Summary
 void addCMBConnectionReplyListener(CMBConnectionReplyListener aListener)
          Adds a new CMBConnectionReplyListener object to listener list
 void addCMBExceptionListener(CMBExceptionListener listener)
          CMBExceptionEvent registration method.
 void addCMBTraceListener(CMBTraceListener listener)
          CMBTraceEvent registration method.
 void cancelConnection()
          Deprecated. This method is deprecated since it has no implementation for any supported server.
 void changePassword()
          Changes password
 void changePassword(java.lang.String newPasswd)
          Change the password
 void commit()
          transaction support
 void connect()
          Logon to server with current settings
 void connect(java.lang.String server, int portNo, int servicePortNo, java.lang.String userid, java.lang.String passwd, java.lang.String newPasswd)
          Logon on the server
 void connect(java.lang.String server, int portNo, java.lang.String userid, java.lang.String passwd, java.lang.String newPasswd)
          Logon on the server
 void connectWithCredential(java.lang.String serverName, CMBAuthenticationData cred, java.lang.String connString)
          Logon on the server, using the single sign-on credential
 void disconnect()
          Disconnect(): Logging off
 void finalize()
          Disconnect if not already disconnected.
 java.lang.String getCC2MimeURL()
          Deprecated. Use getConfigString()
 java.lang.String getConfigString()
          Gets the current configuration string to be used in the datastore constructor.
 CMBConnectionReplyEvent getConnectionReplyEvent()
          To support VisualCafe 3.0 "Add Interaction..."
 short getConnectionType()
          Gets the current connection type
 java.lang.String getConnectString()
          Gets the current connection string
 boolean getConnectToIKF()
          Returns the connectToIKF property value.
 boolean getConnectToWorkFlow()
          Returns the connectToWorkFlow property value.
protected  java.lang.String getCorrectURLString(java.lang.String urlString)
           
 CMBDataManagement getDataManagement()
          Gets the reference to the CMBDataManagement bean
 com.ibm.mm.sdk.common.dkDatastore getDatastore()
          Gets the datastore used by this bean.
 CMBDocRoutingDataManagementICM getDocRoutingDataManagementICM()
          Gets the reference to the CMBDocRoutingDataManagementICM bean
 CMBDocRoutingQueryServiceICM getDocRoutingQueryServiceICM()
          Gets the reference to the CMBDocRoutingQueryServiceICM bean
 java.lang.String getDsType()
          Gets the dsType property
 CMBExceptionEvent getExceptionEvent()
          To support VisualCafe 3.0 "Add Interaction..."
 com.ibm.mm.sdk.common.DKIKFService getIKFService()
          Get the information mining service.
 java.lang.String[] getMimeTypes()
          get allowed mime types server ICM and DL
 java.lang.String getNewPassword()
          Gets the new password
 CMBObjectManagement getObjectManagement()
          Gets the reference to the CMBObjectManagement bean
 java.lang.String getPassword()
          Gets the password
 int getPortNumber()
          Gets the port number of the server
 CMBQueryService getQueryService()
          Gets the reference to the CMBQueryService bean
 java.lang.String getRMIHostname()
          Gets the RMI hostname of the server
 CMBSchemaManagement getSchemaManagement()
          Gets the reference to the CMBSchemaManagement bean
 java.lang.String getServerName()
          Gets the name of the Content server
 short getServiceConnectionType()
          Gets the current service connection type
 int getServicePortNumber()
          Gets the port number of the service
 java.lang.String getServiceRMIHostname()
          Gets the RMI hostname of the service
 int getSessionId()
          Useful only when this connection is created from a connection pool.
 CMBTraceEvent getTraceEvent()
          To support VisualCafe 3.0 "Add Interaction..."
 java.lang.String getUserid()
          Gets the userid
 CMBUserManagement getUserManagement()
          Gets the reference to the CMBUserManagement bean
 CMBWorkFlowDataManagement getWorkFlowDataManagement()
          Gets the reference to the CMBWorkFlowDataManagement bean
 CMBWorkFlowQueryService getWorkFlowQueryService()
          Gets the reference to the CMBWorkFlowQueryService bean
 com.ibm.mm.sdk.common.dkWorkFlowServiceFed getWorkFlowServiceFed()
          Gets the reference to mqswf service
 boolean isConnected()
          Checks to see if we are currently connected.
 boolean isConnectedWorkFlow()
          Checks to see if we are currently connected to workflow service.
 boolean isDataManagementEnabled()
          Deprecated. Always returns true. Using getDataManagement will always return an instance of CMBDataManagement, although that instance will not be created until it is first needed.
 boolean isIKFServiceAvailable()
          Checks to see if the application has information mining installed.
 boolean isSchemaManagementEnabled()
          Deprecated. Always returns true. A call to getSchemaManagement will always return an instance of CMBSchemaManagement, although that instance will not be created until it is first needed.
 boolean isSSO()
          check if Server is Single Sign On.
 boolean isTraceEnabled()
          Checks to see if trace is enabled
 boolean isVersioningEnabled()
          Checks to see if this datastore has versioning function.
 boolean isWFServiceAvailable()
          Checks to see if the application has Workflow installed.
 boolean isWorkflowDataManagementEnabled()
          Checks to see if this bean has CMBWorkFlowDataManagement function.
 boolean isWorkflowQueryServiceEnabled()
          Checks to see if this bean has WorkFlowQueryService function
 java.lang.String[] listDataSources()
          Return an array of names of all available servers.
 void onCMBConnectionRequest(CMBConnectionRequestEvent evt)
          This method is from CMBConnectionRequestListener interface.
 void removeCMBConnectionReplyListener(CMBConnectionReplyListener aListener)
          ConnectionReplyEvent unregistration method.
 void removeCMBExceptionListener(CMBExceptionListener listener)
          CMBExceptionEvent unregistration method.
 void removeCMBTraceListener(CMBTraceListener listener)
          CMBTraceEvent unregistration method.
 void requestConnection(java.lang.String serverName, java.lang.String uid, java.lang.String passwd, java.lang.String newPasswd, java.lang.String connectString)
          Requests a connection on a specified back-end server
 void rollback()
          transaction support
 void setCC2MimeURL(java.lang.String urlString)
          Deprecated. Use setConfigString("CC2MIMEURL=(urlstring)") instead
 void setConfigString(java.lang.String configString)
          Sets the current config string to be used in the datastore constructor.
 void setConnectionType(short connType)
          Sets connection type to local or remote
 void setConnectionType(short connType, java.lang.String urlString)
          Sets connection type to local or remote
 void setConnectionType(short connType, java.lang.String clientURLString, java.lang.String csURLString)
          Sets connection type to local or remote
 void setConnectionType(short connType, java.net.URL clientURLObj)
          Sets connection type to local, remote, or dynamic.
 void setConnectionType(short connType, java.net.URL clientURLObj, java.net.URL csURLObj)
          Sets connection type to local, remote, or dynamic.
 void setConnectString(java.lang.String connectString)
          Sets the current connection string.
 void setConnectToIKF(boolean newvalue)
          Sets the connectToIKF property value.
 void setConnectToWorkFlow(boolean newvalue)
          Sets the connectToWorkFlow property value.
 void setDataManagementEnabled(boolean newvalue)
          Deprecated. New value will be ignored. Using getDataManagement will always return an instance of CMBDataManagement, although that instance will not be created until it is first needed.
 void setDsType(java.lang.String dsType)
          Sets the dsType property
 void setNewPassword(java.lang.String newPasswd)
          Sets new password
 void setPassword(java.lang.String passwd)
          Sets the password
 void setPortNumber(int portNo)
          Sets the port number of the RMI server
 void setRMIHostname(java.lang.String hostname)
          Sets the RMI hostname of the server
 void setSchemaManagementEnabled(boolean newvalue)
          Deprecated. Ignored. A call to getSchemaManagement will always return an instance of CMBSchemaManagement, although that instance will not be created until it is first needed.
 void setServerName(java.lang.String serverName)
          Sets the name of the Content server
 void setServiceConnectionType(short connType)
          Sets connection type to local or remote
 void setServiceConnectionType(short connType, java.lang.String urlString)
          Sets connection type to local or remote
 void setServiceConnectionType(short connType, java.lang.String clientURLString, java.lang.String csURLString)
          Sets connection type to local or remote
 void setServiceConnectionType(short connType, java.net.URL clientURLObj)
          Sets connection type to local, remote, or dynamic.
 void setServiceConnectionType(short connType, java.net.URL clientURLObj, java.net.URL csURLObj)
          Sets connection type to local, remote, or dynamic.
 void setServicePortNumber(int portNo)
          Sets the service port number of the service
 void setServiceRMIHostname(java.lang.String hostname)
          Sets the RMI hostname of the service
 void setTraceEnabled(boolean enabled)
          Enables or disables tracing on the bean
 void setUserid(java.lang.String userid)
          Sets the userid
 void setWorkflowDataManagementEnabled(boolean newvalue)
          Sets the WorkflowDataManagementEnabled property.
 void startTransaction()
          transaction support
 java.lang.String toString()
          Return a meaningful string representation of the bean
 void vetoableChange(java.beans.PropertyChangeEvent evt)
          Check if property allows to be changed.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CMBConnection

public CMBConnection()
Constructs a new instance of connection bean
Method Detail

isTraceEnabled

public boolean isTraceEnabled()
Checks to see if trace is enabled
Returns:
true if trace is enabled, false otherwise

setTraceEnabled

public void setTraceEnabled(boolean enabled)
Enables or disables tracing on the bean
Parameters:
enabled - enables tracing if true, disables if false.

getServiceConnectionType

public short getServiceConnectionType()
Gets the current service connection type
Returns:
one of the following values defined in CMBBaseConstant:
  • CMB_CONNTYPE_LOCAL
  • CMB_CONNTYPE_REMOTE
  • CMB_CONNTYPE_DYNAMIC
See Also:
CMBBaseConstant

getConnectString

public java.lang.String getConnectString()
Gets the current connection string

setConnectString

public void setConnectString(java.lang.String connectString)
Sets the current connection string. Has no effect if already connected

Note: For connecting directly to a server that requires a specific port, set the port number as part of the connection string; for example, to connect to an OnDemand for OS/390 server:

      connBean.setConnectString("ODPORT=3909");
   
Parameters:
connectString - The connection string

getConfigString

public java.lang.String getConfigString()
Gets the current configuration string to be used in the datastore constructor.
Since:
8.1

setConfigString

public void setConfigString(java.lang.String configString)
Sets the current config string to be used in the datastore constructor. It has no effect if already connected
Parameters:
configString - The configuration string
Since:
8.1

getSessionId

public int getSessionId()
Useful only when this connection is created from a connection pool. The session id can be used to retrieve the same connection later, if the connection is available. Query cursors and other connection related objects can be reused rather than recreated if the session is reused.
Since:
8.1

getConnectionType

public short getConnectionType()
Gets the current connection type
Returns:
one of the following values defined in CMBBaseConstant:
  • CMB_CONNTYPE_LOCAL
  • CMB_CONNTYPE_REMOTE
  • CMB_CONNTYPE_DYNAMIC
See Also:
CMBBaseConstant

setConnectionType

public void setConnectionType(short connType)
                       throws java.beans.PropertyVetoException,
                              java.lang.ClassNotFoundException,
                              java.lang.IllegalAccessException,
                              java.lang.InstantiationException
Sets connection type to local or remote

When performing federated actions, CMBConnection always uses cmbcs.ini to determine what package to use, no matter what the setting of connType is.

Parameters:
connType - one of the following values:
  • CMB_CONNTYPE_LOCAL
  • CMB_CONNTYPE_REMOTE
  • CMB_CONNTYPE_DYNAMIC
Throws:
java.beans.PropertyVetoException - if the connection has already been made.
java.lang.IllegalArgumentException - if connection type is invalid

setServiceConnectionType

public void setServiceConnectionType(short connType)
                              throws java.beans.PropertyVetoException,
                                     java.lang.ClassNotFoundException,
                                     java.lang.IllegalAccessException,
                                     java.lang.InstantiationException
Sets connection type to local or remote
Parameters:
connType - one of the following values:
  • CMB_CONNTYPE_LOCAL
  • CMB_CONNTYPE_REMOTE
  • CMB_CONNTYPE_DYNAMIC
Throws:
java.beans.PropertyVetoException - if the connection has already been made.
java.lang.IllegalArgumentException - if connection type is invalid

setServiceConnectionType

public void setServiceConnectionType(short connType,
                                     java.net.URL clientURLObj)
                              throws java.beans.PropertyVetoException,
                                     java.lang.ClassNotFoundException,
                                     java.lang.IllegalAccessException,
                                     java.lang.InstantiationException
Sets connection type to local, remote, or dynamic.

Parameters:
connType - one of the following values:
  • CMB_CONNTYPE_LOCAL
  • CMB_CONNTYPE_REMOTE
  • CMB_CONNTYPE_DYNAMIC
clientURLObj - URL object reference for the cmbsvclient.ini file.
Throws:
java.beans.PropertyVetoException - if the connection has already been made.
java.lang.IllegalArgumentException - if connection type is invalid

setServiceConnectionType

public void setServiceConnectionType(short connType,
                                     java.lang.String urlString)
                              throws java.beans.PropertyVetoException,
                                     java.lang.ClassNotFoundException,
                                     java.lang.IllegalAccessException,
                                     java.lang.InstantiationException,
                                     java.net.MalformedURLException
Sets connection type to local or remote

Parameters:
connType - one of the following values:
  • CMB_CONNTYPE_LOCAL
  • CMB_CONNTYPE_REMOTE
  • CMB_CONNTYPE_DYNAMIC
clientURLString - URL string for the cmbsvclient.ini file.
Throws:
java.beans.PropertyVetoException - if the connection has already been made.
java.lang.IllegalArgumentException - if connection type is invalid
java.net.MalformedURLException - if the URL string is not valid.

setConnectionType

public void setConnectionType(short connType,
                              java.net.URL clientURLObj)
                       throws java.beans.PropertyVetoException,
                              java.lang.ClassNotFoundException,
                              java.lang.IllegalAccessException,
                              java.lang.InstantiationException
Sets connection type to local, remote, or dynamic.

When performing federated actions, CMBConnection always uses cmbcs.ini to determine what package to use, no matter what the setting of connType is.

Parameters:
connType - one of the following values:
  • CMB_CONNTYPE_LOCAL
  • CMB_CONNTYPE_REMOTE
  • CMB_CONNTYPE_DYNAMIC
clientURLObj - URL object reference for the cmbclient.ini file.
Throws:
java.beans.PropertyVetoException - if the connection has already been made.
java.lang.IllegalArgumentException - if connection type is invalid

setConnectionType

public void setConnectionType(short connType,
                              java.lang.String urlString)
                       throws java.beans.PropertyVetoException,
                              java.lang.ClassNotFoundException,
                              java.lang.IllegalAccessException,
                              java.lang.InstantiationException,
                              java.net.MalformedURLException
Sets connection type to local or remote

When performing federated actions, CMBConnection always uses cmbcs.ini to determine what package to use, no matter what the setting of connType is.

Parameters:
connType - one of the following values:
  • CMB_CONNTYPE_LOCAL
  • CMB_CONNTYPE_REMOTE
  • CMB_CONNTYPE_DYNAMIC
clientURLString - URL string for the cmbclient.ini file.
Throws:
java.beans.PropertyVetoException - if the connection has already been made.
java.lang.IllegalArgumentException - if connection type is invalid
java.net.MalformedURLException - if the URL string is not valid.

setConnectionType

public void setConnectionType(short connType,
                              java.net.URL clientURLObj,
                              java.net.URL csURLObj)
                       throws java.beans.PropertyVetoException,
                              java.lang.ClassNotFoundException,
                              java.lang.IllegalAccessException,
                              java.lang.InstantiationException
Sets connection type to local, remote, or dynamic.

When performing federated actions, CMBConnection always uses cmbcs.ini to determine what package to use, no matter what the setting of connType is.

Parameters:
connType - one of the following values:
  • CMB_CONNTYPE_LOCAL
  • CMB_CONNTYPE_REMOTE
  • CMB_CONNTYPE_DYNAMIC
clientURLObj - URL object reference for the cmbclient.ini file.
csURLObj - URL object reference for the cmbcs.ini file.
Throws:
java.beans.PropertyVetoException - if the connection has already been made.
java.lang.IllegalArgumentException - if connection type is invalid

setServiceConnectionType

public void setServiceConnectionType(short connType,
                                     java.net.URL clientURLObj,
                                     java.net.URL csURLObj)
                              throws java.beans.PropertyVetoException,
                                     java.lang.ClassNotFoundException,
                                     java.lang.IllegalAccessException,
                                     java.lang.InstantiationException
Sets connection type to local, remote, or dynamic.

When performing federated actions, CMBConnection always uses cmbcs.ini to determine what package to use, no matter what the setting of connType is.

Parameters:
connType - one of the following values:
  • CMB_CONNTYPE_LOCAL
  • CMB_CONNTYPE_REMOTE
  • CMB_CONNTYPE_DYNAMIC
clientURLObj - URL object reference for the cmbsvclient.ini file.
csURLObj - URL object reference for the cmbsvcs.ini file.
Throws:
java.beans.PropertyVetoException - if the connection has already been made.
java.lang.IllegalArgumentException - if connection type is invalid

setConnectionType

public void setConnectionType(short connType,
                              java.lang.String clientURLString,
                              java.lang.String csURLString)
                       throws java.beans.PropertyVetoException,
                              java.lang.ClassNotFoundException,
                              java.lang.IllegalAccessException,
                              java.lang.InstantiationException,
                              java.net.MalformedURLException
Sets connection type to local or remote

When performing federated actions, CMBConnection always uses cmbcs.ini to determine what package to use, no matter what the setting of connType is.

Parameters:
connType - one of the following values:
  • CMB_CONNTYPE_LOCAL
  • CMB_CONNTYPE_REMOTE
  • CMB_CONNTYPE_DYNAMIC
clientURLString - URL string for the cmbclient.ini file.
csURLString - ULR string for the cmbcs.ini file.
Throws:
java.beans.PropertyVetoException - if the connection has already been made.
java.lang.IllegalArgumentException - if connection type is invalid
java.net.MalformedURLException - if the URL string is not valid.

setServiceConnectionType

public void setServiceConnectionType(short connType,
                                     java.lang.String clientURLString,
                                     java.lang.String csURLString)
                              throws java.beans.PropertyVetoException,
                                     java.lang.ClassNotFoundException,
                                     java.lang.IllegalAccessException,
                                     java.lang.InstantiationException,
                                     java.net.MalformedURLException
Sets connection type to local or remote

Parameters:
connType - one of the following values:
  • CMB_CONNTYPE_LOCAL
  • CMB_CONNTYPE_REMOTE
  • CMB_CONNTYPE_DYNAMIC
clientURLString - URL string for the cmbsvclient.ini file.
csURLString - ULR string for the cmbsvcs.ini file.
Throws:
java.beans.PropertyVetoException - if the connection has already been made.
java.lang.IllegalArgumentException - if connection type is invalid
java.net.MalformedURLException - if the URL string is not valid.

setCC2MimeURL

public void setCC2MimeURL(java.lang.String urlString)
                   throws java.net.MalformedURLException
Deprecated. Use setConfigString("CC2MIMEURL=(urlstring)") instead

Sets the cmbcc2mime.ini URL location.
Parameters:
urlString - cmbcc2mime.ini URL location.
Throws:
java.net.MalformedURLException - if the URL string is invalid.

getCC2MimeURL

public java.lang.String getCC2MimeURL()
Deprecated. Use getConfigString()

Property getter: Gets the cmbcc2mime.ini URL location.
Returns:
the cmbcc2mime.ini URL location.

getServerName

public java.lang.String getServerName()
Gets the name of the Content server
Returns:
server name

setServerName

public void setServerName(java.lang.String serverName)
                   throws java.beans.PropertyVetoException
Sets the name of the Content server
Parameters:
serverName - name of the server
Throws:
java.beans.PropertyVetoException - if property value is not valid

getUserid

public java.lang.String getUserid()
Gets the userid
Returns:
userid

setUserid

public void setUserid(java.lang.String userid)
               throws java.beans.PropertyVetoException
Sets the userid
Parameters:
userid - new userid
Throws:
java.beans.PropertyVetoException - if property value is not valid

getPassword

public java.lang.String getPassword()
Gets the password
Returns:
password

setPassword

public void setPassword(java.lang.String passwd)
                 throws java.beans.PropertyVetoException
Sets the password
Parameters:
passwd - password
Throws:
java.beans.PropertyVetoException - if property value is not valid

getNewPassword

public java.lang.String getNewPassword()
Gets the new password
Returns:
new password to be used for change password

setNewPassword

public void setNewPassword(java.lang.String newPasswd)
                    throws java.beans.PropertyVetoException
Sets new password
Parameters:
newPasswd - new password
Throws:
java.beans.PropertyVetoException - if property value is not valid

getRMIHostname

public java.lang.String getRMIHostname()
Gets the RMI hostname of the server
Returns:
RMI hostname

setRMIHostname

public void setRMIHostname(java.lang.String hostname)
                    throws java.beans.PropertyVetoException
Sets the RMI hostname of the server
Parameters:
hostname - RMI hostname
Throws:
java.beans.PropertyVetoException - if property value is not valid

getServiceRMIHostname

public java.lang.String getServiceRMIHostname()
Gets the RMI hostname of the service
Returns:
RMI hostname of the service

setServiceRMIHostname

public void setServiceRMIHostname(java.lang.String hostname)
                           throws java.beans.PropertyVetoException
Sets the RMI hostname of the service
Parameters:
hostname - RMI hostname of the service
Throws:
java.beans.PropertyVetoException - if property value is not valid

getServicePortNumber

public int getServicePortNumber()
Gets the port number of the service
Returns:
port number

getPortNumber

public int getPortNumber()
Gets the port number of the server
Returns:
port number

setPortNumber

public void setPortNumber(int portNo)
                   throws java.beans.PropertyVetoException
Sets the port number of the RMI server

Note: For a direct connection to a server, specify the port number as part of the connection string. Use the setConnectString() method to set the connection string.

Parameters:
portNo - new port number
Throws:
java.beans.PropertyVetoException - if property value is not valid

setServicePortNumber

public void setServicePortNumber(int portNo)
                          throws java.beans.PropertyVetoException
Sets the service port number of the service
Parameters:
portNo - new service port number
Throws:
java.beans.PropertyVetoException - if property value is not valid

isSchemaManagementEnabled

public boolean isSchemaManagementEnabled()
Deprecated. Always returns true. A call to getSchemaManagement will always return an instance of CMBSchemaManagement, although that instance will not be created until it is first needed.

Checks to see if this bean has schema management function
Returns:
true if it has CMBSchemaManagement bean, false otherwise

setSchemaManagementEnabled

public void setSchemaManagementEnabled(boolean newvalue)
Deprecated. Ignored. A call to getSchemaManagement will always return an instance of CMBSchemaManagement, although that instance will not be created until it is first needed.

Sets the schemaOn property
Parameters:
schemaOn - if true then this bean has CMBSchemaManagement bean, if false, it will not

isDataManagementEnabled

public boolean isDataManagementEnabled()
Deprecated. Always returns true. Using getDataManagement will always return an instance of CMBDataManagement, although that instance will not be created until it is first needed.

Checks to see if this bean has data management function
Returns:
true if it has CMBDataManagement bean, false otherwise

setDataManagementEnabled

public void setDataManagementEnabled(boolean newvalue)
Deprecated. New value will be ignored. Using getDataManagement will always return an instance of CMBDataManagement, although that instance will not be created until it is first needed.

Sets the dataManagement property
Parameters:
dataOn - if true then this bean has CMBDataManagement bean, if false, it will not

isVersioningEnabled

public boolean isVersioningEnabled()
Checks to see if this datastore has versioning function. Note that versioning is turned on/off at the CMBEntity level. This flag indicates whether it is possible to have versioning turned on at all. It does not indicate whether any entities actually have versioning turned on. Currently only CMV8 servers implement versioning.
Returns:
true if the datastore supports versioning, false otherwise.
Since:
8.1
See Also:
- the entity function which describes the versioning control mode selected for the entity.

setConnectToWorkFlow

public void setConnectToWorkFlow(boolean newvalue)
Sets the connectToWorkFlow property value. If the property is set to false then the method CMBConnection.connect will not attempt to connect to the workflow server.
Parameters:
newvalue - if false the connect method will not attempt a connection to the workflow server. The default value is true.

getConnectToWorkFlow

public boolean getConnectToWorkFlow()
Returns the connectToWorkFlow property value. If the return value is false then the CMBConnection.connect method will not attempt to connect to the workflow server. The value can be set by the method CMBConnection.setConnectToWorkFlow.
See Also:
CMBConnection.setConnectToWorkFlow(boolean), CMBConnection.connect()

setConnectToIKF

public void setConnectToIKF(boolean newvalue)
Sets the connectToIKF property value. If this property is set to false, then the method CMBConnection.connect will not attempt to connect to the information mining service.
Parameters:
newvalue - the value fo the property

getConnectToIKF

public boolean getConnectToIKF()
Returns the connectToIKF property value. If false, then the CMBConnection.connect method will not attempt to connect to the information mining service.

isWorkflowQueryServiceEnabled

public boolean isWorkflowQueryServiceEnabled()
Checks to see if this bean has WorkFlowQueryService function
Returns:
true if it has WorkFlowQueryService service, false otherwise

setWorkflowDataManagementEnabled

public void setWorkflowDataManagementEnabled(boolean newvalue)
Sets the WorkflowDataManagementEnabled property. If newValue is set to true then the CMBWorkFlowDataManagement bean is added as an CMBTraceListener and CMBExceptionListener and the property workFlowDataManagementEnabled is set to true. If newValue is set to false then the CMBWorkFlowDataManagement bean is removed as an CMBTraceListener and CMBExceptionListener and the property workFlowDataManagementEnabled is set to false.
Parameters:
newValue - if true then this bean has an instance of the CMBWorkFlowDataManagement bean, if false, it will not.

isWorkflowDataManagementEnabled

public boolean isWorkflowDataManagementEnabled()
Checks to see if this bean has CMBWorkFlowDataManagement function.
Returns:
true if it has CMBWorkFlowDataManagement bean function, false otherwise

getDsType

public java.lang.String getDsType()
Gets the dsType property

setDsType

public void setDsType(java.lang.String dsType)
               throws java.beans.PropertyVetoException,
                      java.lang.IllegalArgumentException
Sets the dsType property
Throws:
java.beans.PropertyVetoException - if connection is already established.
java.lang.IllegalArgumentException - if dsType is not valid

listDataSources

public java.lang.String[] listDataSources()
                                   throws java.lang.Exception
Return an array of names of all available servers. The list returned will be servers of the type specified by the dsType property.

connect

public void connect()
             throws CMBConnectFailedException,
                    CMBException
Logon to server with current settings
Throws:
CMBConnectFailedException - if
  • CMB_CONNECT_INVALID_USERID_PASSWD: invalid userid/password
  • CMB_CONNECT_SERVER_UNAVAILABLE: server not available or error occur in server while logging on
CMBException - if error occurred in the server while logging on. Call CMBException.getErrorData() to get the original exception object.

isSSO

public final boolean isSSO()
check if Server is Single Sign On. for ICM, the setting is read from cmbicmsrvrs.properties and saved in DKServerDefICM for others, we will check the connection string Single Sign On means there is DBAUTH=CLIENT in the connection string
Since:
8.1

isWFServiceAvailable

public boolean isWFServiceAvailable()
                             throws com.ibm.mm.sdk.common.DKException,
                                    java.lang.Exception
Checks to see if the application has Workflow installed.
Returns:
true if workflow is installed, false otherwise

isIKFServiceAvailable

public boolean isIKFServiceAvailable()
                              throws com.ibm.mm.sdk.common.DKException,
                                     java.lang.Exception
Checks to see if the application has information mining installed.
Returns:
true if information mining is installed, false otherwise

getIKFService

public com.ibm.mm.sdk.common.DKIKFService getIKFService()
Get the information mining service.
Returns:
an instance of DKIKFService, or null if the information mining service was not connected.

connect

public void connect(java.lang.String server,
                    int portNo,
                    java.lang.String userid,
                    java.lang.String passwd,
                    java.lang.String newPasswd)
             throws CMBConnectFailedException,
                    CMBException,
                    java.beans.PropertyVetoException
Logon on the server
Parameters:
server - name of the server
portNo - port number
userid - userid to use to logon
passwd - fedarated userid password
newPasswd - new password to use for change password
Throws:
CMBConnectFailedException - if
  • CMB_CONNECT_INVALID_USERID_PASSWD: invalid userid/password
  • CMB_CONNECT_SERVER_UNAVAILABLE: server not available or error occur in server while logging on
CMBException - if other error occurs during connecting to content server. Call CMBException.getErrorData() to get the original exception object.
java.beans.PropertyVetoException - if connection is already established or input parameters are not valid.

connect

public void connect(java.lang.String server,
                    int portNo,
                    int servicePortNo,
                    java.lang.String userid,
                    java.lang.String passwd,
                    java.lang.String newPasswd)
             throws CMBConnectFailedException,
                    CMBException,
                    java.beans.PropertyVetoException
Logon on the server
Parameters:
server - name of the server
portNo - port number of the datastore server
servicePortNo - port number of the service server
userid - userid to use to logon
passwd - fedarated userid password
newPasswd - new password to use for change password
Throws:
CMBConnectFailedException - if
  • CMB_CONNECT_INVALID_USERID_PASSWD: invalid userid/password
  • CMB_CONNECT_SERVER_UNAVAILABLE: server not available or error occur in server while logging on
CMBException - if other error occurs during connecting to content server. Call CMBException.getErrorData() to get the original exception object.
java.beans.PropertyVetoException - if connection is already established or input parameters are not valid.

startTransaction

public void startTransaction()
                      throws CMBException
transaction support

commit

public void commit()
            throws CMBException
transaction support

rollback

public void rollback()
              throws CMBException
transaction support

getMimeTypes

public java.lang.String[] getMimeTypes()
                                throws CMBException
get allowed mime types server ICM and DL

connectWithCredential

public void connectWithCredential(java.lang.String serverName,
                                  CMBAuthenticationData cred,
                                  java.lang.String connString)
                           throws CMBConnectFailedException,
                                  CMBException
Logon on the server, using the single sign-on credential
Parameters:
server - name of the server
cred - the credential/authentication object for single sign-on
connString - server-specific data needed on connection
Throws:
CMBConnectFailedException -
  • CMB_CONNECT_INVALID_USERID_PASSWD: invalid userid/password
  • CMB_CONNECT_SERVER_UNAVAILABLE: server not available or error occur in server while logging on
CMBException - if other error occurs during connecting to content server. Call CMBException.getErrorData() to get the original exception object.
java.beans.PropertyVetoException - if connection is already established or input parameters are not valid.
Since:
EIP 7.2

disconnect

public void disconnect()
                throws CMBNoConnectionException,
                       CMBException
Disconnect(): Logging off
Throws:
CMBNoConnectionException - if there is no connection to current content server.
CMBException - will be thrown for the following errorCode form CMBException.getErrorCode():
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred from the Content Server. Call CMBException.getErrorData() to get the original exception object.

requestConnection

public void requestConnection(java.lang.String serverName,
                              java.lang.String uid,
                              java.lang.String passwd,
                              java.lang.String newPasswd,
                              java.lang.String connectString)
                       throws CMBConnectFailedException,
                              CMBException
Requests a connection on a specified back-end server
Parameters:
serverName - - name of the back-end server
uid - - userid for logon to this back-end server
passwd - - password to logon to this back-end server
newPasswd - - new password changing password to the back-end server
connectString - - back-end specific connection string
Throws:
CMBConnectFailedException - if invalid userid/password or server not available
CMBException - if other error occurs

cancelConnection

public void cancelConnection()
Deprecated. This method is deprecated since it has no implementation for any supported server.

Cancels the current connection request.
Throws:
CMBNoConnectionException - if there is no connection to current content server.
CMBException - will be thrown for the following errorCode form CMBException.getErrorCode():
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred from the Content Server. Call CMBException.getErrorData() to get the original exception object.

isConnected

public boolean isConnected()
Checks to see if we are currently connected.
Returns:
true if currently connected, false if not connected

isConnectedWorkFlow

public boolean isConnectedWorkFlow()
Checks to see if we are currently connected to workflow service.
Returns:
true if currently connected, false if not connected

changePassword

public void changePassword()
                    throws CMBException,
                           CMBChangePasswordFailedException
Changes password
Throws:
CMBException - if error occurs in the server.
CMBChangePasswordFailedException - if unable to change password on the server Call CMBException.getErrorData() to get the original exception object.

changePassword

public void changePassword(java.lang.String newPasswd)
                    throws java.beans.PropertyVetoException,
                           CMBException,
                           CMBChangePasswordFailedException
Change the password
Parameters:
newPasswd - new password to be changed
Throws:
CMBException - if error occurs in the server
CMBChangePasswordFailedException - if unable to change password on the server Call CMBException.getErrorData() to get the original exception object.
java.beans.PropertyVetoException - if property value is not valid

getSchemaManagement

public CMBSchemaManagement getSchemaManagement()
Gets the reference to the CMBSchemaManagement bean
Returns:
reference to schema management object. A new instance of the bean will be created if needed.

getObjectManagement

public CMBObjectManagement getObjectManagement()
Gets the reference to the CMBObjectManagement bean
Returns:
object management

getDataManagement

public CMBDataManagement getDataManagement()
Gets the reference to the CMBDataManagement bean
Returns:
data management object. A new instance of the bean will be created if needed.

getWorkFlowServiceFed

public com.ibm.mm.sdk.common.dkWorkFlowServiceFed getWorkFlowServiceFed()
Gets the reference to mqswf service
Returns:
com.ibm.mm.sdk.common.dkWorkFlowServiceFed object. Null object will be returned if workFlowServiceFed is not set.

getQueryService

public CMBQueryService getQueryService()
Gets the reference to the CMBQueryService bean
Returns:
query service object. A new instance of the bean will be created if needed.

getDocRoutingDataManagementICM

public CMBDocRoutingDataManagementICM getDocRoutingDataManagementICM()
Gets the reference to the CMBDocRoutingDataManagementICM bean
Returns:
ICM document routing data management object. Null object will be returned if CMBDocRoutingDataManagementICM bean has not been set.

getDocRoutingQueryServiceICM

public CMBDocRoutingQueryServiceICM getDocRoutingQueryServiceICM()
Gets the reference to the CMBDocRoutingQueryServiceICM bean
Returns:
ICM document routing query service object. Null object will be returned if CMBDocRoutingQueryServiceICM bean has not been set.

getWorkFlowDataManagement

public CMBWorkFlowDataManagement getWorkFlowDataManagement()
Gets the reference to the CMBWorkFlowDataManagement bean
Returns:
workflow data management object. Null object will be returned if CMBWorkFlowDataManagement bean has not been set.

getWorkFlowQueryService

public CMBWorkFlowQueryService getWorkFlowQueryService()
Gets the reference to the CMBWorkFlowQueryService bean
Returns:
query service object

getUserManagement

public CMBUserManagement getUserManagement()
Gets the reference to the CMBUserManagement bean
Returns:
user management bean object. A new instance of the bean will be created if needed.

addCMBConnectionReplyListener

public void addCMBConnectionReplyListener(CMBConnectionReplyListener aListener)
Adds a new CMBConnectionReplyListener object to listener list
Parameters:
aListener - a ConnectionReplyListener object to be added

removeCMBConnectionReplyListener

public void removeCMBConnectionReplyListener(CMBConnectionReplyListener aListener)
ConnectionReplyEvent unregistration method.
Parameters:
aListener - a listener to be unregistered

addCMBExceptionListener

public void addCMBExceptionListener(CMBExceptionListener listener)
CMBExceptionEvent registration method. It ignores a registration request if the listener is already registered.
Parameters:
listener - listener to be registered

removeCMBExceptionListener

public void removeCMBExceptionListener(CMBExceptionListener listener)
CMBExceptionEvent unregistration method.
Parameters:
listener - listener to be unregistered

addCMBTraceListener

public void addCMBTraceListener(CMBTraceListener listener)
CMBTraceEvent registration method. It ignores a registration request if the listener is already registered.
Parameters:
listener - listener to be registered

removeCMBTraceListener

public void removeCMBTraceListener(CMBTraceListener listener)
CMBTraceEvent unregistration method.
Parameters:
listener - listener to be unregistered

onCMBConnectionRequest

public void onCMBConnectionRequest(CMBConnectionRequestEvent evt)
This method is from CMBConnectionRequestListener interface.
Specified by:
onCMBConnectionRequest in interface CMBConnectionRequestListener
Parameters:
evt - requestion event

vetoableChange

public void vetoableChange(java.beans.PropertyChangeEvent evt)
                    throws java.beans.PropertyVetoException
Check if property allows to be changed.
Specified by:
vetoableChange in interface java.beans.VetoableChangeListener
Parameters:
evt - a property changed event
Throws:
java.beans.PropertyVetoException - if property value is invalid

finalize

public void finalize()
Disconnect if not already disconnected.
Overrides:
finalize in class java.lang.Object

getDatastore

public com.ibm.mm.sdk.common.dkDatastore getDatastore()
Gets the datastore used by this bean.
Returns:
an instance of dkDatastore.

getConnectionReplyEvent

public CMBConnectionReplyEvent getConnectionReplyEvent()
To support VisualCafe 3.0 "Add Interaction..."
Returns:
a CMBConnectionReplyEvent

getTraceEvent

public CMBTraceEvent getTraceEvent()
To support VisualCafe 3.0 "Add Interaction..."
Returns:
a CMBTraceEvent

getExceptionEvent

public CMBExceptionEvent getExceptionEvent()
To support VisualCafe 3.0 "Add Interaction..."
Returns:
a CMBExceptionEvent

toString

public java.lang.String toString()
Return a meaningful string representation of the bean
Overrides:
toString in class java.lang.Object

getCorrectURLString

protected java.lang.String getCorrectURLString(java.lang.String urlString)

EIP JavaBeans

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