public class Driver
extends java.lang.Object
implements java.sql.Driver
SearchScope
); it is not a direct connection to
a Content Engine database.
Getting an instance of this class registers the driver. The EngineRuntimeException JDBC_DRIVER_STATIC_ERROR
is thrown if the driver registration fails.
Establish a JDBC connection using the connect
method. The following values are required,
either as part of the connection string or the Properties
collection parameter:
USER_PROPERTY_KEY
and PASSWORD_PROPERTY_KEY
fields. The JDBC user is expected to be a security principal defined within an accessible LDAP directory service.
Authentication is performed within the driver using the Java™ Authentication and Authorization Service (JAAS) API, with the
specified user credentials passed to generate the JAAS Subject.URI_PROPERTY_KEY
field. The URI is specified as part of the url
parameter passed to the
connect
method. For example:
jdbc:filenetp8:http://ceserver:7001/wsi/FNCEWS40MTOM/
OBJECTSTORES_PROPERTY_KEY
field The object stores
are specified as part of the url
parameter passed to the connect
method. Multiple object
store names are separated by "|" (vertical line character). For example:
objectstores=FileNet1|FileNet2|FileNet3
Either the object store's symbolic name or display name can be used, although the name cannot include the "|" delimiter (this is possible only for display names).
The following values are optional when establishing the JDBC connection:
MERGEMODE_PROPERTY_KEY
field. This value is used when multiple
object stores are specified for the connection, and determines whether the scope is the union or intersection of the
object stores. Allowed values are "union" and "intersection", case-insensitive (defaults
to "union").JAASCONFIGNAME_PROPERTY_KEY
field. Any one of the following conditions
can supply the JAAS context: an established JAAS login context is used, the default JAAS context
name ("FileNetP8", case-sensitive) is used, or the value of JAASCONFIGNAME_PROPERTY_KEY
is
used.
To indicate the established JAAS login context is to be used, specify "!" (exclamation character) as this value. In this case, the user and password field values are ignored. All other field values are used as specified.
If no value is specified, the default provided by
UserContext.createSubject
is used.
LOCALE_PROPERTY_KEY
field. If unspecified, the default Java™
Runtime Environment (JRE) locale is used.MergeMode
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
JAASCONFIGNAME_PROPERTY_KEY
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
static java.lang.String |
LOCALE_PROPERTY_KEY
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
static java.lang.String |
MERGEMODE_PROPERTY_KEY
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
static java.lang.String |
OBJECTSTORES_PROPERTY_KEY
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
static java.lang.String |
PASSWORD_PROPERTY_KEY
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
static java.lang.String |
URI_PROPERTY_KEY
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
static java.lang.String |
USER_PROPERTY_KEY
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
Constructor and Description |
---|
Driver()
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsURL(java.lang.String url)
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
java.sql.Connection |
connect(java.lang.String url,
java.util.Properties info)
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
boolean |
equals(java.lang.Object obj)
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
int |
getMajorVersion()
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
int |
getMinorVersion()
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties info)
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
int |
hashCode()
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
boolean |
jdbcCompliant()
Deprecated.
As of P8 5.2.1, and will be removed in a later release.
|
public static final java.lang.String URI_PROPERTY_KEY
Properties
instance passed
to the driver. This is a required field.public static final java.lang.String OBJECTSTORES_PROPERTY_KEY
Properties
instance
passed to the driver. This is a required field.public static final java.lang.String MERGEMODE_PROPERTY_KEY
Properties
instance
passed to the driver. This value is used when multiple object stores are specified for the connection, and
determines whether the scope is the union or intersection of the object stores. If unspecified, this defaults to
"union".public static final java.lang.String PASSWORD_PROPERTY_KEY
Properties
instance
passed to the driver. This is a required field unless the existing JAAS login context is to be used (the
value of JAASCONFIGNAME_PROPERTY_KEY is "!").public static final java.lang.String USER_PROPERTY_KEY
Properties
instance
passed to the driver. This is a required field unless the existing JAAS login context is to be used (the
value of JAASCONFIGNAME_PROPERTY_KEY is "!").public static final java.lang.String LOCALE_PROPERTY_KEY
Properties
instance
passed to the driver. If unspecified, the default JRE locale is used.public static final java.lang.String JAASCONFIGNAME_PROPERTY_KEY
public Driver()
public boolean acceptsURL(java.lang.String url) throws java.sql.SQLException
acceptsURL
in interface java.sql.Driver
url
- A String
containing the URL of the database to connect to. The following is an example of the
URL format required (line break for readability):
jdbc:filenetp8:http://ceserver:7001/wsi/FNCEWS40MTOM/?objectstores=FileNet1|FileNet2 &mergemode=intersection&jaasconfigname=Jazz
boolean
value of true if the driver can be expected to establish a connection to the URL;
false otherwise.java.sql.SQLException
public java.sql.Connection connect(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
Null
is returned if an
invalid driver is used for the specified URL. When multiple drivers are loaded, a null return value can occur as
the DriverManager
passes connection requests to each of the drivers in sequence.connect
in interface java.sql.Driver
url
- A String
containing the URL of the database to connect to. The following is an example of the
URL format required (line break for readability):
jdbc:filenetp8:http://ceserver:7001/wsi/FNCEWS40MTOM/?objectstores=FileNet1|FileNet2 &mergemode=intersection&jaasconfigname=Jazz
info
- A Properties
collection of the field and value pairs as connection arguments. For example:
java.util.Properties props = new java.util.Properties(); props.put(Driver.USER_PROPERTY_KEY,"myName"); props.put(Driver.PASSWORD_PROPERTY_KEY,"myPassword")
Connection
object representing the connection to the database identified by the specified URL,
or null if the driver is invalid.EngineRuntimeException
- Thrown when the connection cannot be established.java.sql.SQLException
Driver.connect(java.lang.String, java.util.Properties)
public int getMajorVersion()
getMajorVersion
in interface java.sql.Driver
public int getMinorVersion()
getMinorVersion
in interface java.sql.Driver
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
Note: Additional information may become necessary, based on the prompted values returned. In this case, you need to iterate through additional calls to getPropertyInfo.
getPropertyInfo
in interface java.sql.Driver
url
- A String
containing the URL of the database to connect to. The following is an example of the URL
format required (line break for readability):
jdbc:filenetp8:http://ceserver:7001/wsi/FNCEWS40MTOM/?objectstores=FileNet1|FileNet2 &mergemode=intersection&jaasconfigname=Jazz
info
- A Properties
collection of field and value pairs to send. For example:
java.util.Properties props = new java.util.Properties(); props.put(Driver.USER_PROPERTY_KEY,"myName"); props.put(Driver.PASSWORD_PROPERTY_KEY,"myPassword")
DriverPropertyInfo
objects describing possible properties. This array may be empty if no
properties are required.java.sql.SQLException
Driver.getPropertyInfo(java.lang.String, java.util.Properties)
public boolean jdbcCompliant()
jdbcCompliant
in interface java.sql.Driver
boolean
value of false is always returned.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- An Object to compare to this instance.public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
© Copyright IBM Corporation 2006, 2015. All rights reserved.