|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.filenet.api.jdbc.Driver
public class Driver
Registers a Java™ Database Connectivity (JDBC) driver and establishes a connection with a Content Engine database, providing metadata
information on object stores and executing queries against those object stores. Instances of this class can
connect to a Content Engine database server using either the Enterprise Java™Beans (EJB) Listener or the Web Services Listener,
depending on the transport configured. The database referenced is a logical view, reflecting
the Content Engine data model as a merged scope (see 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/FNCEWS40DIME/
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 specifed 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
Field Summary | |
---|---|
static java.lang.String |
JAASCONFIGNAME_PROPERTY_KEY
The key for the JAAS configuration name used in the Properties instance passed to the driver. |
static java.lang.String |
LOCALE_PROPERTY_KEY
The key for the locale value specified in the database URL, or used in the Properties instance
passed to the driver. |
static java.lang.String |
MERGEMODE_PROPERTY_KEY
The key for the merge mode value specified in the database URL, or used in the Properties instance
passed to the driver. |
static java.lang.String |
OBJECTSTORES_PROPERTY_KEY
The key for the object stores value specified in the database URL, or used in the Properties instance
passed to the driver. |
static java.lang.String |
PASSWORD_PROPERTY_KEY
The key for the password value specified in the database URL, or used in the Properties instance
passed to the driver. |
static java.lang.String |
URI_PROPERTY_KEY
The key for the URI value specified in the database URL, or used in the Properties instance passed
to the driver. |
static java.lang.String |
USER_PROPERTY_KEY
The key for the username value specified in the database URL, or used in the Properties instance
passed to the driver. |
Constructor Summary | |
---|---|
Driver()
Registers the JDBC driver. |
Method Summary | |
---|---|
boolean |
acceptsURL(java.lang.String url)
Indicates whether the driver should be able to open a connection to the specified URL. |
java.sql.Connection |
connect(java.lang.String url,
java.util.Properties info)
Attempts to establish a JDBC connection to the database identified by the specified URL. |
boolean |
equals(java.lang.Object obj)
Indicates whether the object specified references this instance. |
int |
getMajorVersion()
Gets the major version number for the driver. |
int |
getMinorVersion()
Get the minor version number for the driver. |
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties info)
Enables a generic UI tool to discover the properties needed to include in prompts for information sufficient to connect to a database. |
boolean |
jdbcCompliant()
Indicates whether the driver is JDBC-compliant. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 specifed 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
Constructor Detail |
---|
public Driver()
Method Detail |
---|
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/FNCEWS40DIME/?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/FNCEWS40DIME/?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/FNCEWS40DIME/?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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |