Class CMBConnection
- java.lang.Object
-
- com.ibm.mm.beans.CMBConnection
-
- All Implemented Interfaces:
- CMBBaseConstant, CMBConnectionRequestListener, java.beans.VetoableChangeListener, java.io.Serializable, java.util.EventListener
public class CMBConnection extends java.lang.Object implements java.io.Serializable, java.beans.VetoableChangeListener, CMBBaseConstant, CMBConnectionRequestListener
The CMBConnection bean provides DB2 Information Integrator for Content federated database as well as a specific Content Server connection management functions. This bean is required in order to use any of the JavaBeans. Most of the JavaBeans have a connection property that should be set to a single instance of this bean for the session.Typical use of CMBConnection is to construct an instance, set properties, then perform a connect. For example:
CMBConnection connection = new CMBConnection(); connection.setDsType("ICM"); connection.setServerName("icmnlsdb"); connection.setUserid("icmuser1"); connection.setPassword("pass"); connection.connect();When the session is completed, the connection is disconnected:connection.disconnect();
Note that when a CMBConnection object is no longer referenced, it may be garbage-collected. When it is garbage-collected, the finalizer is called, and the underlying DKDatastore object is disconnected. Therefore, if your application is using a DKDatastore instance that was obtained from a CMBConnection object, you must be sure to maintain a reference to the CMBConnection object, or your datastore instance may be disconnected. Obtaining other JavaBeans from CMBConnectionCMBConnection has methods to obtain other JavaBeans typically used session-wide:
getSchemaManagement- returns an instance of CMBSchemaManagement.getDataManagement- returns an instance of CMBDataManagement.getUserManagement- returns an instance of CMBUserManagement.getQueryService- returns an instance of CMBQueryService.getWorkflowDataManagement,getWorkflowQueryService- return workflow related beans.getDocRoutingDataManagementICM,getDocRoutingQueryServiceICM- return document routing beans (ICM only).
Connections can be obtained from a connection pooling bean, CMBConnectionPool. This bean has properties similar to CMBConnection. It relies upon shared userids in order to reduce the number of actual connections needed to support multiple users. Connections can be obtained from and freed back to the pool, making them available for other sessions (assuming that the userids are shared). Connecting Services
CMBConnection's
connectmethod, in addition to connecting to the federated database or content server, will also connect workflow and information mining services, if used. These services can be enabled or disabled with thesetConnectToWorkflowand thesetConnectToIKFmethods. Multithreading ConsiderationsA single instance of the CMBConnection bean can only be used on a single thread at any point in time. This restriction extends to all other beans that are associated to a CMBConnection bean (through the connection property of the associated bean). In practice, this restriction means that separate connections need to be created for each thread. Alternatively, multiple threads can obtain and free connections using the CMBConnectionPool bean, in which case each thread should obtain, use, and free a connection. Request/Reply Events
An alternative mechanism to calling methods on this bean is to wire the bean to other JavaBeans using request and reply events. This bean listens to connection request events and replies by firing connection reply events. If an exception is raised during the request, an exception event is fired. Tracing
Enabling tracing on this bean also enables it on any JavaBean obtained from this bean, including schema management, data management, query service, and workflow beans.
When tracing is enabled, trace events are fired. A utility bean,
CMBTraceLogcan listen to trace events and write trace records to a log, stdout, stderr, or window. 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), 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- Since:
- 6.1
- See Also:
CMBConnectionPool,CMBSchemaManagement,CMBDataManagement,CMBUserManagement,CMBQueryService,com.ibm.mm.beans.workflow.CMBWorkflowQueryService,com.ibm.mm.beans.workflow.CMBWorkflowDataManagement,com.ibm.mm.beans.workflow.CMBDocRoutingQueryService,com.ibm.mm.beans.workflow.CMBDocRoutingDataManagement, Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.ibm.mm.beans.CMBBaseConstant
ANNOTATION_MIME_TYPE, CMB_ALL_VERSIONS, 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_IDONLY, CMB_CONTENT_ITEMTREE, CMB_CONTENT_ITEMTREE_NO_LINKS, CMB_CONTENT_LINKS_INBOUND, CMB_CONTENT_LINKS_OUTBOUND, CMB_CONTENT_ONELEVEL, CMB_CONTENT_YES, CMB_DATATYPE_BLOB, CMB_DATATYPE_BYTEARRAY, CMB_DATATYPE_CLOB, 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_FED, CMB_DSTYPE_ICM, CMB_DSTYPE_IP390, CMB_DSTYPE_OD, CMB_DSTYPE_VI400, CMB_EIP_LOGOUT, CMB_FILTER_OPERATOR_ENDSWITH, CMB_FILTER_OPERATOR_EQUALS, CMB_FILTER_OPERATOR_STARTSWITH, CMB_LATEST_VERSION, 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_FEDERATED, CMB_QS_TYPE_PARAMETRIC, CMB_QS_TYPE_SQL, CMB_QS_TYPE_TEMPLATE, 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_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
Constructors Constructor and Description CMBConnection()Constructs a new instance of connection bean
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description voidaddCMBConnectionReplyListener(CMBConnectionReplyListener aListener)Adds a new CMBConnectionReplyListener object to listener list.voidaddCMBExceptionListener(CMBExceptionListener listener)CMBExceptionEvent registration method.voidaddCMBTraceListener(CMBTraceListener listener)CMBTraceEvent registration method.voidcancelConnection()Deprecated.This method is deprecated since it has no implementation for any supported server.voidchangePassword()Changes the password for the connected userid on the server.voidchangePassword(java.lang.String newPasswd)Changes the password for the connected userid on the server.voidcommit()Transaction support.voidconnect()Logon to server with current settingsvoidconnect(java.lang.String server, int portNo, int servicePortNo, java.lang.String userid, java.lang.String passwd, java.lang.String newPasswd)Logon on the server.voidconnect(java.lang.String server, int portNo, java.lang.String userid, java.lang.String passwd, java.lang.String newPasswd)Logon on the server.voidconnectWithCredential(java.lang.String serverName, java.lang.Object credentialobj, java.lang.String connString)Logon on the server, using the single sign-on credentialvoiddisconnect()Logoff from the server.voidfinalize()Overridden to disconnect from the server if not already disconnected.CMBAuthorizationManagementgetAuthorizationManagement()Gets the reference to the CMBAuthorizationManagement beanjava.lang.StringgetCC2MimeURL()Deprecated.Use getConfigString()java.lang.StringgetConfigString()Gets the config string property value.CMBConnectionReplyEventgetConnectionReplyEvent()Returns the last connection reply event fired.shortgetConnectionType()Gets the connection type property value.java.lang.StringgetConnectString()Gets the connection string property value.booleangetConnectToIKF()Deprecated.not supported since cm8.3java.lang.ObjectgetCredential()CMBDataManagementgetDataManagement()Gets the reference to the CMBDataManagement bean.com.ibm.mm.sdk.common.dkDatastoregetDatastore()Gets the datastore used by this bean.CMBDocRoutingDataManagementICMgetDocRoutingDataManagementICM()Gets the reference to the CMBDocRoutingDataManagementICM bean.CMBDocRoutingQueryServiceICMgetDocRoutingQueryServiceICM()Gets the reference to the CMBDocRoutingQueryServiceICM bean.java.lang.StringgetDsType()Gets the dsType propertyCMBExceptionEventgetExceptionEvent()Returns the last exception event fired.CMBItemComparatorgetItemAttributesSortComparator()Gets the value itemAttributesSortComparator property.java.lang.StringgetLanguageCode()Get the languge code.java.util.LocalegetLocale()Deprecated.Please use method getLanguageCode() instead.java.lang.StringgetLSVersion()Get the version of the backend library server.java.lang.String[]getMimeTypeNames()Deprecated.use CMBSchemaManagement getMimeTypeNamesjava.lang.String[]getMimeTypes()Deprecated.use CMBSchemaManagement getMimeTypesjava.lang.StringgetNewPassword()Gets the new password property value.CMBObjectManagementgetObjectManagement()Gets the reference to the CMBObjectManagement bean.java.lang.StringgetPassword()Gets the password property value.intgetPortNumber()Gets the port number of the RMI server.CMBQueryServicegetQueryService()Gets the reference to the CMBQueryService bean.java.lang.StringgetRMIHostname()Gets the hostname of the RMI server.CMBSchemaManagementgetSchemaManagement()Gets the reference to the CMBSchemaManagement beanjava.lang.StringgetServerName()Gets the value of the server name property.shortgetServiceConnectionType()Gets the service connection type property value.intgetServicePortNumber()Gets the port number of the service RMI server.java.lang.StringgetServiceRMIHostname()Gets the hostname of the service RMI server.intgetSessionId()Useful only when this connection is created from a connection pool.CMBTraceEventgetTraceEvent()Returns the last trace event fired.java.lang.StringgetUserid()Gets the userid property value.CMBUserManagementgetUserManagement()Deprecated.This method can be used only for the Federated connector, which is deprecatedbooleanisConnected()Checks to see if we are currently connected.booleanisConnectedIKF()Deprecated.not supported since cm8.3booleanisConnectedWorkFlow()Checks to see if we are currently connected to workflow service.booleanisDataManagementEnabled()Deprecated.Always returns true. Using getDataManagement will always return the same instance of CMBDataManagement, although that instance will not be created until it is first needed.booleanisDisplayNamesEnabled()Deprecated.since 8.3, no replacement. This deprecated functionality will not be removed, existing applications which utilizes it will still function. User should avoid setting displayNamesEnabled property value to true when developing new applications.booleanisIKFServiceAvailable()Deprecated.not supported since cm8.3booleanisItemAttributesSortEnabled()Gets the itemAttributesSortEnabled property.booleanisSchemaManagementEnabled()Deprecated.Always returns true. A call to getSchemaManagement will always return the same instance of CMBSchemaManagement, although that instance will not be created until it is first needed.booleanisSSO()check if Server is Single Sign On.booleanisSupported(java.lang.String methodName)Checks to see if this connection supports the given method.booleanisTraceEnabled()Checks to see if trace is enabledbooleanisVersioningEnabled()Checks to see if this datastore has versioning capabilities, available through the beans.booleanisWFServiceAvailable()Checks to see if the application has Workflow installed.java.lang.String[]listDataSources()Return an array of names of all available servers.voidonCMBConnectionRequest(CMBConnectionRequestEvent evt)Implementation of the CMBConnectionRequestListener interface.voidremoveCMBConnectionReplyListener(CMBConnectionReplyListener aListener)ConnectionReplyEvent unregistration method.voidremoveCMBExceptionListener(CMBExceptionListener listener)CMBExceptionEvent unregistration method.voidremoveCMBTraceListener(CMBTraceListener listener)CMBTraceEvent unregistration method.voidrequestConnection(java.lang.String serverName, java.lang.String uid, java.lang.String passwd, java.lang.String newPasswd, java.lang.String connectString)Deprecated.FedConnection is not supported from CM85voidrollback()Transaction support.voidsetCC2MimeURL(java.lang.String urlString)Deprecated.Use setConfigString("CC2MIMEURL=(urlstring)") insteadvoidsetConfigString(java.lang.String configString)Sets the config string property value.voidsetConnectionType(short connType)Sets connection type property.voidsetConnectionType(short connType, java.lang.String urlString)Sets the connection type property.voidsetConnectionType(short connType, java.lang.String clientURLString, java.lang.String csURLString)Sets the connection type property.voidsetConnectionType(short connType, java.net.URL clientURLObj)Sets the connection type property.voidsetConnectionType(short connType, java.net.URL clientURLObj, java.net.URL csURLObj)Deprecated.voidsetConnectString(java.lang.String connectString)Sets the connection string property.voidsetConnectToIKF(boolean newvalue)Deprecated.not supported since cm8.3voidsetCredential(java.lang.Object object)Set the credential object to be used to connect to the datastorevoidsetDataManagementEnabled(boolean newvalue)Deprecated.New value will be ignored. Using getDataManagement will always return the same instance of CMBDataManagement, although that instance will not be created until it is first needed.voidsetDateFormat(java.lang.String pattern)Sets the SimpleDateFormat on CMBConnection using the given pattern in the default locale.voidsetDisplayNamesEnabled(boolean newValue)Deprecated.since 8.3, no replacement. This deprecated functionality will not be removed, existing applications which utilizes it will still function. User should avoid setting displayNamesEnabled property value to true when developing new applications. Because display names are not unique and may contain special characters, using it to identify entities and attributes could cause problems.voidsetDsType(java.lang.String dsType)Sets the dsType property.voidsetItemAttributesSortComparator(CMBItemComparator comparator)Sets the itemAttributesSortComparator property.voidsetItemAttributesSortEnabled(boolean enabled)Sets the itemAttributesSortEnabled property.voidsetLanguageCode(java.lang.String languageCode)Set the language code.voidsetLocale(java.util.Locale locale)Deprecated.Please use method setLanguageCode() instead.voidsetNewPassword(java.lang.String newPasswd)Sets new password property.voidsetPassword(java.lang.String passwd)Sets the password property.voidsetPortNumber(int portNo)Sets the port number of the RMI server providing connection to the server.voidsetRMIHostname(java.lang.String hostname)Sets the hostname of the RMI server.voidsetSchemaManagementEnabled(boolean newvalue)Deprecated.Ignored. A call to getSchemaManagement will always return the same instance of CMBSchemaManagement, although that instance will not be created until it is first needed.voidsetServerName(java.lang.String serverName)Sets the server name property.voidsetServiceConnectionType(short connType)Sets the service connection type property.voidsetServiceConnectionType(short connType, java.lang.String urlString)Sets the service connection type property.voidsetServiceConnectionType(short connType, java.lang.String clientURLString, java.lang.String csURLString)Sets the service connection type property.voidsetServiceConnectionType(short connType, java.net.URL clientURLObj)Sets the service connection type property.voidsetServiceConnectionType(short connType, java.net.URL clientURLObj, java.net.URL csURLObj)Deprecated.voidsetServicePortNumber(int portNo)Sets the service port number of the RMI server providing Workflow services.voidsetServiceRMIHostname(java.lang.String hostname)Sets the hostname of the service RMI server.voidsetTraceEnabled(boolean enabled)Enables or disables tracing on the bean.voidsetUserid(java.lang.String userid)Sets the userid property.voidstartTransaction()Transaction support.java.lang.StringtoString()Overridden to return a meaningful string representation of the beanvoidvalidateAndReconnect()validate the connection, if it not valid, attempt to reconnect.voidvetoableChange(java.beans.PropertyChangeEvent evt)Check if property allows to be changed.
-
-
-
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. By default, tracing is disabled.- Parameters:
enabled- enables tracing if true, disables if false.
-
getServiceConnectionType
public short getServiceConnectionType()
Gets the service connection type property value.- 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 connection string property value.
-
setConnectString
public void setConnectString(java.lang.String connectString)
Sets the connection string property. The connect string is used to provide server-specfic connection information. This is information beyond userid and password needed to establish a connection to the server. The syntax of this string is server specific.A RuntimeException will be raised if this method is called after a connection has been established.
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 config string property value.- Since:
- 8.1
-
setConfigString
public void setConfigString(java.lang.String configString)
Sets the config string property value. The config string is used during the construction of dkDatastore instances by the CMBConnection bean. It is passed on the contructor to dkDatastore subclasses. The options understood are server specific.A RuntimeException will be raised if this method is called after a connection has been established.
- 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 connection type property value.- 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.InstantiationExceptionSets connection type property. This property defines the type of connection to the server should be used. There are three types of connections:- CMB_CONNTYPE_LOCAL
- This indicates that a connection should be made directly to the content server from this process. Some connections require platform-specific JNI code, so local connection is not available for all server types on all platforms.
- CMB_CONNTYPE_REMOTE
- This indicates that an RMI server should be used as an intermediary between this process and the content server. The RMIHostname and portNumber properties define the RMI server and port number for the RMI server. An RMI server is useful for connection to servers that do not have a local connector on the platform. It is also useful for simplifying setup for client applications. For best performance, a local connection should be made if possible.
- CMB_CONNTYPE_DYNAMIC
- This indicates that another file, the cmbcs.ini file, should be referred to for determining if a local or remote connection should be established.
When using the federated connector, the connectionType property only determines where the Federated database connection is performed. The cmbcs.ini file is always used to determine the type of native connections to perform for federated actions. Note that this will be the cmbcs.ini file on the RMI server in the case of remote connection to the federated database.
- 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 invalidjava.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationException
-
setServiceConnectionType
public void setServiceConnectionType(short connType) throws java.beans.PropertyVetoException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationExceptionSets the service connection type property. This property defines the type of connection to the workflow and information mining services that should be used. There are three types of connections:- CMB_CONNTYPE_LOCAL
- This indicates that a connection should be made directly to the workflow and information mining services from this process. Direct connections to services may not be available on all platforms.
- CMB_CONNTYPE_REMOTE
- This indicates that an RMI server should be used as an intermediary between this process and the workflow and information mining services. The serviceRMIHostname and servicePortNumber properties define the RMI server and port number for the RMI server. An RMI server is useful for connection to services on platforms that cannot perform a local connection. For best performance, a local connection should be made if possible.
- CMB_CONNTYPE_DYNAMIC
- This indicates that another file, the cmbsvcs.ini file, should be referred to for determining if a local or remote connection to services should be established.
- 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 invalidjava.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationException
-
setServiceConnectionType
public void setServiceConnectionType(short connType, java.net.URL clientURLObj) throws java.beans.PropertyVetoException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationExceptionSets the service connection type property. SeesetServiceConnectionType(connType)for a general description. This version also allows a URL to specify the location of the cmbsvclient.ini file. The arguments are interpreted:- If connType = CMB_CONNTYPE_LOCAL, the clientURLObj is ignored.
- If connType = CMB_CONNTYPE_REMOTE, clientURLObj will be used to tell the system where to locate the cmbsvclient.ini.
- If connType = CMB_CONNTYPE_DYNAMIC, clientURLObj will also be used to tell the system where to locate the cmbsvclient.ini, and will assume cmbcs.ini is in the working directory.
- 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 invalidjava.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationException
-
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.MalformedURLExceptionSets the service connection type property. SeesetServiceConnectionType(connType)for a general description. This version also allows a string to specify the URL of the locations of the cmbsvclient.ini file. The arguments are interpreted:- If connType = CMB_CONNTYPE_LOCAL, the clientURLString is ignored.
- If connType = CMB_CONNTYPE_REMOTE, clientURLString will be used to tell the system where to locate the cmbsvclient.ini.
- If connType = CMB_CONNTYPE_DYNAMIC, clientURLString will also be used to tell the system where to locate the cmbsvclient.ini, and will assume cmbsvcs.ini is in the working directory.
- 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 invalidjava.net.MalformedURLException- if the URL string is not valid.java.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationException
-
setConnectionType
public void setConnectionType(short connType, java.net.URL clientURLObj) throws java.beans.PropertyVetoException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationExceptionSets the connection type property. SeesetConnectionType(connType)for a general description. This version also allows an URL to specify the locations of the cmbclient.ini file. The arguments are interpreted:- If connType = CMB_CONNTYPE_LOCAL, the clientURLObj is ignored.
- If connType = CMB_CONNTYPE_REMOTE, clientURLObj will be used to tell the system where to locate the cmbclient.ini.
- If connType = CMB_CONNTYPE_DYNAMIC, clientURLObj will also be used to tell the system where to locate the cmbclient.ini, and will assume cmbcs.ini is in the working directory.
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 invalidjava.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationException
-
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.MalformedURLExceptionSets the connection type property. SeesetConnectionType(connType)for a general description. This version also allows a string to specify an URL of the location of the cmbclient.ini file. The arguments are interpreted:- If connType = CMB_CONNTYPE_LOCAL, the clientURLString is ignored.
- If connType = CMB_CONNTYPE_REMOTE, clientURLString will be used to tell the system where to locate the cmbclient.ini.
- If connType = CMB_CONNTYPE_DYNAMIC, clientURLString will also be used to tell the system where to locate the cmbclient.ini, and will assume cmbcs.ini is in the working directory.
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 invalidjava.net.MalformedURLException- if the URL string is not valid.java.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationException
-
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.InstantiationExceptionDeprecated.Sets the connection type property. SeesetConnectionType(connType)for a general description. This version also allows URL's to specify the locations of the cmbclient.ini and cmbcs.ini files. The arguments are interpreted:- If connType = CMB_CONNTYPE_LOCAL, the clientURLObj is ignored.
- If connType = CMB_CONNTYPE_REMOTE, clientURLObj will be used to tell the system where to locate the cmbclient.ini and csURLObj will be ignored.
- If connType = CMB_CONNTYPE_DYNAMIC, clientURLObj will also be used to tell the system where to locate the cmbclient.ini, and csURLObj will be used to tell the system where to locate the cmbcs.ini.
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 invalidjava.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationException
-
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.InstantiationExceptionDeprecated.Sets the service connection type property. SeesetServiceConnectionType(connType)for a general description. This version also allows URLs to specify the locations of the cmbsvclient.ini and cmbsvcs.ini files. The arguments are interpreted:- If connType = CMB_CONNTYPE_LOCAL, the clientURLObj is ignored.
- If connType = CMB_CONNTYPE_REMOTE, clientURLObj will be used to tell the system where to locate the cmbsvclient.ini and csURLObj will be ignored.
- If connType = CMB_CONNTYPE_DYNAMIC, clientURLObj will also be used to tell the system where to locate the cmbsvclient.ini, and csURLObj will be used to tell the system where to locate the cmbsvcs.ini.
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 invalidjava.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationException
-
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.MalformedURLExceptionSets the connection type property. SeesetConnectionType(connType)for a general description. This version also allows strings to specify URLs of the locations of the cmbclient.ini and cmbcs.ini files. The arguments are interpreted:- If connType = CMB_CONNTYPE_LOCAL, the clientURLString and csURLString are ignored.
- If connType = CMB_CONNTYPE_REMOTE, clientURLString will be used to tell the system where to locate the cmbclient.ini and csURLString will be ignored.
- If connType = CMB_CONNTYPE_DYNAMIC, clientURLString will also be used to tell the system where to locate the cmbclient.ini, and csURLString will be used to tell the system where to locate the cmbcs.ini.
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 invalidjava.net.MalformedURLException- if the URL string is not valid.java.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationException
-
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.MalformedURLExceptionSets the service connection type property. SeesetServiceConnectionType(connType)for a general description. This version also allows strings to specify URLs of the locations of the cmbsvclient.ini and cmbsvcs.ini files. The arguments are interpreted:- If connType = CMB_CONNTYPE_LOCAL, the clientURLString and csURLString are ignored.
- If connType = CMB_CONNTYPE_REMOTE, clientURLString will be used to tell the system where to locate the cmbsvclient.ini and csURLString will be ignored.
- If connType = CMB_CONNTYPE_DYNAMIC, clientURLString will also be used to tell the system where to locate the cmbsvclient.ini, and csURLString will be used to tell the system where to locate the cmbsvcs.ini.
- 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 invalidjava.net.MalformedURLException- if the URL string is not valid.java.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationException
-
setCC2MimeURL
public void setCC2MimeURL(java.lang.String urlString) throws java.net.MalformedURLExceptionDeprecated. Use setConfigString("CC2MIMEURL=(urlstring)") insteadSets the cc2MimeURL property. This property defines where to find the cmbcc2mime.ini properties file.- 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()Gets the cc2MimeURL property value. This property defines where to find the cmbcc2mime.ini properties file.- Returns:
- the cmbcc2mime.ini URL location.
-
setItemAttributesSortEnabled
public void setItemAttributesSortEnabled(boolean enabled)
Sets the itemAttributesSortEnabled property. This property defines whether to sort the attributes of items by default. If no comparator is specified in the itemAttributesSortComparator property, the values will be sorted alphabetically. Otherwise, the specified comparator will be used to perform the sort. The default value for this property is false.- Parameters:
enabled- - a boolean value indicating whether to enable or disable the default sort.- Since:
- 8.1
-
isItemAttributesSortEnabled
public boolean isItemAttributesSortEnabled()
Gets the itemAttributesSortEnabled property. This property defines whether to sort the attributes of items by default.- Returns:
- A boolean value, indicating whether the default sort is enabled (true) or disabled (false).
- Since:
- 8.1
-
setItemAttributesSortComparator
public void setItemAttributesSortComparator(CMBItemComparator comparator)
Sets the itemAttributesSortComparator property. When the setItemAttributesSortEnabled property is set to true, this property allows you to override the default sorting behavior, by specifying a custom comparator which extends the default CMBItemComparator. If no comparator is specifed, the default CMBItemComparator is used, which will sort the attributes alphabetically.- Parameters:
comparator- -An instance or subclass of the CMBItemComparator, which will be the comparator used when sorting item attributes.- Since:
- 8.1
-
getItemAttributesSortComparator
public CMBItemComparator getItemAttributesSortComparator()
Gets the value itemAttributesSortComparator property. This is the customized comparator to use for sorting attributes when the setItemAttributesSortEnabled property is set to true. The default value is null.- Returns:
- CMBItemComparator - the comparator that has been specified. If none has been specified, null will be returned
- Since:
- 8.1
-
getServerName
public java.lang.String getServerName()
Gets the value of the server name property. This is the name of the content server or database being connected.- Returns:
- server name
-
setServerName
public void setServerName(java.lang.String serverName) throws java.beans.PropertyVetoExceptionSets the server name property. This is the name of the content server or database, depending on the type of server being connected. (To specify the type of server, usesetDsType.)- 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 property value.- Returns:
- userid
-
setUserid
public void setUserid(java.lang.String userid) throws java.beans.PropertyVetoExceptionSets the userid property.- Parameters:
userid- new userid- Throws:
java.beans.PropertyVetoException- if property value is not valid
-
setLocale
public void setLocale(java.util.Locale locale)
Deprecated. Please use method setLanguageCode() instead.Set the locale for the connection instance.- Parameters:
locale- the locale to use for the connection
-
getLocale
public java.util.Locale getLocale()
Deprecated. Please use method getLanguageCode() instead.Get the locale property value.- Returns:
- locale
-
setLanguageCode
public void setLanguageCode(java.lang.String languageCode)
Set the language code.- Parameters:
languageCode-
-
getLanguageCode
public java.lang.String getLanguageCode()
Get the languge code.- Returns:
- language code
-
getPassword
public java.lang.String getPassword()
Gets the password property value.- Returns:
- password
-
setPassword
public void setPassword(java.lang.String passwd) throws java.beans.PropertyVetoExceptionSets the password property.- Parameters:
passwd- password- Throws:
java.beans.PropertyVetoException- if property value is not valid
-
getNewPassword
public java.lang.String getNewPassword()
Gets the new password property value.- Returns:
- new password to be used for change password
-
setNewPassword
public void setNewPassword(java.lang.String newPasswd) throws java.beans.PropertyVetoExceptionSets new password property. This does not actually change the password on the server. UsechangePasswordmethod to change the password on the server.- Parameters:
newPasswd- new password- Throws:
java.beans.PropertyVetoException- if property value is not valid
-
getRMIHostname
public java.lang.String getRMIHostname()
Gets the hostname of the RMI server. This is only used when the connectionType property is CMB_CONNTYPE_REMOTE.- Returns:
- RMI hostname
-
setRMIHostname
public void setRMIHostname(java.lang.String hostname) throws java.beans.PropertyVetoExceptionSets the hostname of the RMI server. This is only used when the connectionType property is CMB_CONNTYPE_REMOTE.- Parameters:
hostname- RMI hostname- Throws:
java.beans.PropertyVetoException- if property value is not valid
-
getServiceRMIHostname
public java.lang.String getServiceRMIHostname()
Gets the hostname of the service RMI server.- Returns:
- RMI hostname of the service
-
setServiceRMIHostname
public void setServiceRMIHostname(java.lang.String hostname) throws java.beans.PropertyVetoExceptionSets the hostname of the service RMI server. This is only used when the serviceConnectionType is CMB_CONNTYPE_REMOTE.- 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 RMI server. This is only used when the serviceConnectionType property is CMB_CONNTYPE_REMOTE.- Returns:
- port number
-
getPortNumber
public int getPortNumber()
Gets the port number of the RMI server. This is only used when the connectionType property is CMB_CONNTYPE_REMOTE.- Returns:
- port number
-
setPortNumber
public void setPortNumber(int portNo) throws java.beans.PropertyVetoExceptionSets the port number of the RMI server providing connection to the server. This is only used when the connectionType property is CMB_CONNTYPE_REMOTE.Note:Some servers require a port number for direct connection to the server. That port number is not specified with this property. In order to specify the port number for a direct connection to a server, the connection string is typically used. For example, the syntax for OnDemand:
connection.setConnectionString("ODPORT=1234");- Parameters:
portNo- new port number- Throws:
java.beans.PropertyVetoException- if property value is not valid
-
setServicePortNumber
public void setServicePortNumber(int portNo) throws java.beans.PropertyVetoExceptionSets the service port number of the RMI server providing Workflow services. This property is only valid when serviceConnectionType property is CMB_CONNTYPE_REMOTE.- 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 the same 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 the same instance of CMBSchemaManagement, although that instance will not be created until it is first needed.Sets the schemaManagementEnabled 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 the same 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 the same 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 capabilities, available through the beans. Currently, this is only for Content Manager Version 8 servers.Note: For CMv8, versioning is specified by the administrator for each item type.
CMBEntity.getVersionControlreturns the versioning control for an item type.- Returns:
- true if the datastore supports versioning, false otherwise.
- Since:
- 8.1
- See Also:
CMBEntity.getVersionControl()
-
setConnectToIKF
public void setConnectToIKF(boolean newvalue)
Deprecated. not supported since cm8.3Sets the connectToIKF property value. If this property is set to false, then the methodCMBConnection.connectwill not attempt to connect to the information mining service.- Parameters:
newvalue- the value fo the property
-
getConnectToIKF
public boolean getConnectToIKF()
Deprecated. not supported since cm8.3Returns the connectToIKF property value. If false, then theCMBConnection.connectmethod will not attempt to connect to the information mining service.
-
getDsType
public java.lang.String getDsType()
Gets the dsType property
-
setDsType
public void setDsType(java.lang.String dsType) throws java.beans.PropertyVetoException, java.lang.IllegalArgumentExceptionSets the dsType property. dsType is an abreviation for datastore type and defines the type of server connected to. This is a string, and corresponds to the suffixes on dkDatastore subclasses in the Java API. Some dsTypes constants:- CMB_DSTYPE_FED - Federated (default)
- CMB_DSTYPE_ICM - Content Manager V8
- CMB_DSTYPE_OD - OnDemand (all versions)
- CMB_DSTYPE_IP - IP/390
- CMB_DSTYPE_V4 - VI/400
- 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.ExceptionReturn an array of names of all available servers. The list returned will be servers of the server type specified by the dsType property.- Throws:
java.lang.Exception
-
connect
public void connect() throws CMBConnectFailedException, CMBExceptionLogon 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.
-
validateAndReconnect
public void validateAndReconnect() throws CMBExceptionvalidate the connection, if it not valid, attempt to reconnect. Note that this method is only applicable to Content Manager V8 datastores. For all other datastore types, no validation or reconnection will be performed, and no error will be thrown.- Throws:
CMBNoConnectionException- if the validation failsCMBException- if error occurred in the server while reconnection. Call CMBException.getErrorData() to get the original exception object.
-
getLSVersion
public java.lang.String getLSVersion() throws CMBExceptionGet the version of the backend library server. Only DS Type supported is ICM.- Returns:
- Throws:
java.lang.ExceptionCMBException- Since:
- 8.3
-
isSupported
public boolean isSupported(java.lang.String methodName)
Checks to see if this connection supports the given method. returns true if the method is supported, false otherwise- Since:
- 8.1 *
-
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.ExceptionChecks to see if the application has Workflow installed.- Returns:
- true if workflow is installed, false otherwise
- Throws:
com.ibm.mm.sdk.common.DKExceptionjava.lang.Exception
-
isIKFServiceAvailable
public boolean isIKFServiceAvailable() throws com.ibm.mm.sdk.common.DKException, java.lang.ExceptionDeprecated. not supported since cm8.3Checks to see if the application has information mining installed.- Returns:
- true if information mining is installed, false otherwise
- Throws:
com.ibm.mm.sdk.common.DKExceptionjava.lang.Exception
-
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.PropertyVetoExceptionLogon on the server. This is a convenience method and is equivalent to:setServerName(server); setPortNumber(portNo); setUserid(userid); setPassword(passwd); setNewPassword(newPasswd); connect();
- Parameters:
server- name of the serverportNo- port numberuserid- userid to use to logonpasswd- fedarated userid passwordnewPasswd- 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.PropertyVetoExceptionLogon on the server. This is a convenience method and is equivalent to:setServerName(server); setPortNumber(portNo); setServicePortNumber(servicePortNo); setUserid(userid); setPassword(passwd); setNewPassword(newPasswd); connect();
- Parameters:
server- name of the serverportNo- port number of the datastore serverservicePortNo- port number of the service serveruserid- userid to use to logonpasswd- fedarated userid passwordnewPasswd- 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 CMBExceptionTransaction support. This method starts an explicit transaction. Changes made after this method will not be committed on the server untilcommitis called.- Throws:
CMBException
-
commit
public void commit() throws CMBExceptionTransaction support. If a transaction is explicitely started, usingstartTransactionthis method commits the changes made in transaction on the server.- Throws:
CMBException
-
rollback
public void rollback() throws CMBExceptionTransaction support. If a transaction is explicitely started, usingstartTransactionthis method reverses all changes made during the transaction on the server.- Throws:
CMBException
-
getMimeTypeNames
public java.lang.String[] getMimeTypeNames() throws CMBExceptionDeprecated. use CMBSchemaManagement getMimeTypeNamesget readable name of Mime Types. CM8 only- Throws:
CMBException
-
getMimeTypes
public java.lang.String[] getMimeTypes() throws CMBExceptionDeprecated. use CMBSchemaManagement getMimeTypesGet the allowed MIME content typs for documents on the server. This method is only available for CMv7 and CMv8 servers.- Throws:
CMBException
-
connectWithCredential
public void connectWithCredential(java.lang.String serverName, java.lang.Object credentialobj, java.lang.String connString) throws CMBConnectFailedException, CMBExceptionLogon on the server, using the single sign-on credential- Parameters:
server- name of the servercred- the credential/authentication object for single sign-onconnString- 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:
- DB2 Information Integrator for Content 7.2
-
disconnect
public void disconnect() throws CMBNoConnectionException, CMBExceptionLogoff from the server. Also, destroys any resources that are being held on the client for the connection to the server. If workflow or information mining services are connected, these will be disconnected as well.- 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, CMBExceptionDeprecated. FedConnection is not supported from CM85Requests a connection on a specified back-end server. This method is only available when connected to Federated. Use null, an empty string, or the current password for the newPasswd parameter if there is no need to change the password.- Parameters:
serverName- - name of the back-end serveruid- - userid for logon to this back-end serverpasswd- - password to logon to this back-end servernewPasswd- - new password changing password to the back-end serverconnectString- - back-end specific connection string- Throws:
CMBConnectFailedException- if invalid userid/password or server not availableCMBException- 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.Note: This method only checks if the
CMBConnection.connectmethod was called and successfully established a connection. It does not check to make sure the connection is still valid from the server's perspective. To check the validity of the connection to the server,an operation, such as a search, should be performed that will use the server.- 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
-
isConnectedIKF
public boolean isConnectedIKF()
Deprecated. not supported since cm8.3Checks to see if we are currently connected to information mining.- Returns:
- true if currently connected, false if not connected
- Since:
- 8.1
-
changePassword
public void changePassword() throws CMBException, CMBChangePasswordFailedExceptionChanges the password for the connected userid on the server. The new password is specified usingsetNewPassword.- 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, CMBChangePasswordFailedExceptionChanges the password for the connected userid on the server.- Parameters:
newPasswd- new password to be changed- Throws:
CMBException- if error occurs in the serverCMBChangePasswordFailedException- 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.
-
getAuthorizationManagement
public CMBAuthorizationManagement getAuthorizationManagement() throws CMBMethodNotSupportedException, CMBException
Gets the reference to the CMBAuthorizationManagement bean- Returns:
- reference to authorization management object. A new instance of the bean will be created if needed.
- Throws:
CMBMethodNotSupportedExceptionCMBException
-
getObjectManagement
public CMBObjectManagement getObjectManagement()
Gets the reference to the CMBObjectManagement bean. Only a single instance of the bean is created. If this method is called repeatedly, the same instance is returned.- Returns:
- an instance of the object management class
-
getDataManagement
public CMBDataManagement getDataManagement()
Gets the reference to the CMBDataManagement bean. Only a single instance of the bean is created. If this method is called repeatedly, the same instance is returned.- Returns:
- and instance of the data management bean
-
getQueryService
public CMBQueryService getQueryService()
Gets the reference to the CMBQueryService bean. Only a single instance of the bean is created. If this method is called repeatedly, the same instance is returned.- Returns:
- query service object.
-
getDocRoutingDataManagementICM
public CMBDocRoutingDataManagementICM getDocRoutingDataManagementICM()
Gets the reference to the CMBDocRoutingDataManagementICM bean. Only a single instance of this bean is created. If this method is called repeatedly, the same instance is returned.- 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. Only a single instance of this bean is created. If this method is called repeatedly, the same instance is returned.- Returns:
- ICM document routing query service object. Null object will be returned if CMBDocRoutingQueryServiceICM bean has not been set.
-
getUserManagement
public CMBUserManagement getUserManagement()
Deprecated. This method can be used only for the Federated connector, which is deprecatedGets the reference to the CMBUserManagement bean. Only a single instance of this bean is created. If this method is called repeatedly, the same instance is returned.- Returns:
- user management bean object
-
getDatastore
public com.ibm.mm.sdk.common.dkDatastore getDatastore()
Gets the datastore used by this bean.- Returns:
- an instance of dkDatastore.
-
setDateFormat
public void setDateFormat(java.lang.String pattern)
Sets the SimpleDateFormat on CMBConnection using the given pattern in the default locale. All attribute values whose type is Date will be formatted using the defined pattern. The java beans are also expecting users to use the defined pattern to format the Date strings when setting or adding attribute values. The default format is "yyyy-MM-dd"- Parameters:
pattern- a format string whose complete syntax is defined in the javadoc of the java.text.SimpleDateFormat class. The following are some examples Format Pattern Result -------------- ------- "yyyy.MM.dd G 'at' hh:mm:ss z" ->> 1996.07.10 AD at 15:08:56 PDT "EEE, MMM d, ''yy" ->> Wed, July 10, '96 "yyyyy.MMMMM.dd GGG hh:mm aaa" ->> 1996.July.10 AD 12:08 PM
-
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)
Implementation of the CMBConnectionRequestListener interface. Enables this bean to listen to connect request events. When actions are invoked on this bean in this way, connection reply events are fired, to provide the results. If an error occurs, exception events are fired.- Specified by:
onCMBConnectionRequestin interfaceCMBConnectionRequestListener- Parameters:
evt- requestion event
-
vetoableChange
public void vetoableChange(java.beans.PropertyChangeEvent evt) throws java.beans.PropertyVetoExceptionCheck if property allows to be changed.- Specified by:
vetoableChangein interfacejava.beans.VetoableChangeListener- Parameters:
evt- a property changed event- Throws:
java.beans.PropertyVetoException- if property value is invalid
-
getConnectionReplyEvent
public CMBConnectionReplyEvent getConnectionReplyEvent()
Returns the last connection reply event fired.- Returns:
- a CMBConnectionReplyEvent
-
getTraceEvent
public CMBTraceEvent getTraceEvent()
Returns the last trace event fired.- Returns:
- a CMBTraceEvent
-
getExceptionEvent
public CMBExceptionEvent getExceptionEvent()
Returns the last exception event fired.- Returns:
- a CMBExceptionEvent
-
isDisplayNamesEnabled
public boolean isDisplayNamesEnabled()
Deprecated. since 8.3, no replacement. This deprecated functionality will not be removed, existing applications which utilizes it will still function. User should avoid setting displayNamesEnabled property value to true when developing new applications.Determines the displayNamesEnabled property value. For CM V8, when this property is true, entity and attribute names used by CMBSchemaManagement, CMBEntity, CMBAttribute, and CMBItem are display names. The default, false, is to use non-display names.- Returns:
- the value of the displayNamesEnabled property
- Since:
- 8.2
-
setDisplayNamesEnabled
public void setDisplayNamesEnabled(boolean newValue)
Deprecated. since 8.3, no replacement. This deprecated functionality will not be removed, existing applications which utilizes it will still function. User should avoid setting displayNamesEnabled property value to true when developing new applications. Because display names are not unique and may contain special characters, using it to identify entities and attributes could cause problems.Sets the displayNamesEnabled property. This property determines whether display names will be used for entities and attributes for CM V8. The default, false, is to use non-display names.- Parameters:
newValue- new value for the displayNamesEnabled property. If true, display names are used for the names of attributes and entities.- Since:
- 8.2
-
finalize
public void finalize()
Overridden to disconnect from the server if not already disconnected.- Overrides:
finalizein classjava.lang.Object
-
toString
public java.lang.String toString()
Overridden to return a meaningful string representation of the bean- Overrides:
toStringin classjava.lang.Object
-
getCredential
public java.lang.Object getCredential()
- Returns:
- The credential object used to connect to the datastore
-
setCredential
public void setCredential(java.lang.Object object)
Set the credential object to be used to connect to the datastore- Parameters:
object- The credential object
-
-