DEPRECATED
com.bea.p13n.content.document.ref.DefaultDocumentProvider
The reference implementation DocumentProvider.
This document provider utilizes a database to maintain the document metadata attributes, while the documents are kept on the filesystem and the metadata is kept in XML files on the filesystem.
It understands the following initializion properties.
jdbc.dataSource
: Specifies the JNDI name of the datasource
to use to get database connections.
jdbc.url
: Specifies the JDBC URL of the database to
connect to.
jdbc.driver
: Specifies the JDBC driver class to load.
jdbc.isPooled
: If "true" or if jdbc.url starts with
"jdbc:weblogic:pool" or "jdbc:weblogic:jts", then assumes the connection is
pooled and won't cache it. If anything else, assumes the connection is not
pooled and will maintain one connection.
jdbc.supportsLikeEscapeClause
: Specifies whether the
underlying database supports the SQL LIKE ESCAPE clause. If this is not
specified, the connection will be queried.
jdbc.isolationLevel
: Specifies the isolation level this
initialize with. Valid values are "READ_COMMITTED", "SERIALIZABLE" (the
default), "READ_UNCOMMITTED", "REPEATABLE_READ", and "NONE".
jdbc.column.<colName>
: Specifies an additional
column to the DOCUMENT table. The value is the comma-separated list of
property names that map onto that column. This can be specified multiple
times. This should be used in conjunction with the the correct settings to
the BulkLoader
.
If the same property is mapped to more than one column, the result is
indeterminate (it might work, it might not, so you probably shouldn't do
this).
docBase
: Specifies the base directory of where the
documents are stored under. Assumes all paths coming from the database are
relative to this.
iw.schemaBase*
: Specifies the base directories of where the
Interwoven datacapture.cfg files live. The provider will, on load, recurse
through the file structure and load all datacapture.cfg files. This can be
listed multiple times; each property starting with
iw.schemaBase
will be loaded.
schemaXML*(
: Specifies the path to the directory containing
XML files following the doc-schemas DTD which contain the schema
information. This will recurse through the directory, loading all files
ening in ".xml". This will be processed after iw.schemaBase. This can be
listed multiple times; each property starting with schemaXML
will be loaded.
user
and password
can be
specified as well).
Related Topics
Object
com.bea.p13n.content.document.ref.DefaultDocumentProvider
RefDocumentProvider
com.bea.p13n.content.document.spi.DocumentProvider
Field Summary |
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
public static final |
|
public static final |
|
protected |
|
protected int |
|
protected |
|
protected boolean |
|
protected |
|
protected |
|
protected long |
|
public static final |
|
protected |
|
protected |
|
protected |
|
protected |
|
Constructor Summary |
Method Summary |
public void |
|
public static |
|
protected void |
|
public |
|
public |
|
public |
|
protected |
|
public |
|
public static int | |
public static long | |
protected |
|
public | |
public |
|
public |
|
public int |
|
public void |
|
protected void |
|
protected void |
|
protected void |
|
public void |
|
public void |
|
public static | |
protected boolean |
|
Methods from com.bea.p13n.content.document.ref. |
|
Methods from class java.lang. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods from interface com.bea.p13n.content.document.spi. |
|
Field Detail |
protected Map
addlColumnMap
protected List
addlColumnNames
protected Connection
connection
This will be null if we're using a pooled connection.
protected DataSource
dataSource
This will get lazily initialized.
protected String
dataSourceJndiName
This will be null if we're using the driver/url.
public static final String
DOC_MD_TABLE
public static final String
DOC_TABLE
protected File
docBase
protected int isolationLevel
protected Driver
jdbcDriver
protected boolean jdbcIsPooled
protected Properties
jdbcProps
protected String
jdbcURL
protected long maxWaitTime
Use less than 0 for wait forever.
public static final String
metadataSelectSQL
protected String
myMetadataSelectSQL
This will be passed to our SQL Generator
and is
initialized in
RefDocumentProvider.init(Properties)
from the "jdbc.column.<colName>"
properties.
This will always start with "SELECT ID, DOCUMENT_SIZE, VERSION, AUTHOR, CREATION_DATE, LOCKED_BY, MODIFIED_DATE, MODIFIED_BY, DESCRIPTION, COMMENTS, MIME_TYPE".
protected Map
schemas
protected com.bea.p13n.content.document.ref.RefSQLGenerator
sqlGen
This will be initialized in RefDocumentProvider.init(Properties)
from the
"jdbc.column.<colName>" properties.
protected Boolean
supportsLikeEscapeClause
This will be no null for unknown.
Constructor Detail |
public RefDocumentProvider()
Method Detail |
public void close()Close oursevles.
throwsDocumentException
DocumentException
public staticUtility method to turn a SQLException into a DocumentException.DocumentException
convert(SQLException
ex)
protected void fillInMetadataDefs(Fill in the remaining document metadata (i.e. the implicit attributes).Connection
con,List
list)
throwsSQLException
SQLException
publicReturn the list of String document ids that match the specified search parameters.DocumentIterator
findDocumentIds(Search
params)
throwsDocumentException
DefaultDocumentProvider.findDocumentIds(Search)
DocumentException
publicReturn the list of DocumentMetadataDefs which match the given search parameters object.DocumentIterator
findDocumentMetadata(Search
params)
throwsDocumentException
DefaultDocumentProvider.findDocumentMetadata(Search)
DocumentException
publicReturn the list of DocumentDefs that match the specified search parameters.DocumentIterator
findDocuments(Search
params)
throwsDocumentException
DefaultDocumentProvider.findDocuments(Search)
DocumentException
protectedGet a/the connection to the database.Connection
getConnection()
throwsDocumentException
DocumentException
publicGet just the last modified date of a document, without brining back all the metadata.Timestamp
getDocumentModifiedDate(String
id)
throwsDocumentException
DefaultDocumentProvider.getDocumentModifiedDate(String)
DocumentException
public static int getInt(ResultSet
rs, int index)
throwsSQLException
SQLException
public static long getLong(ResultSet
rs, int index)
throwsSQLException
SQLException
protectedGet a metadata def from the given result set (which should follow the select inRefDocumentMetadata
getMetadataDef(ResultSet
rs)
throwsSQLException
RefDocumentProvider.myMetadataSelectSQL
).
SQLException
publicReturn the names schema.DocumentSchemaDef
getSchema(String
name)
public DocumentIterator
getSchemaNames()
Return the list of schema names.
public Map
getSchemas()
Return the map of schema name to schema.
public int getTransactionIsolation()Get the transaction isolation level.
DefaultDocumentProvider.getTransactionIsolation()
public void init(Initialize this from the specified properties.Properties
p)
throwsDocumentException
See the class comments for details on the supported properties.
DocumentException
protected void loadIWSchemas(Load schema information from Interwoven datacapture.cfg files.String
basePath)
throwsDocumentException
If basePath points to a directory, this will recurse into the directory, looking for "datacapture.cfg" files. If basePath is a file that exists and can be read, it will be loaded.
DocumentException
Related Topics
protected void loadSchemas(Load schema information from doc-schema xml files.String
path)
throwsDocumentException
DocumentException
Related Topics
protected void loadSchemas(Add the DocumentSchemaDefs found in the collection into our schema map.Collection
col)
throwsDocumentException
DocumentException
public void reset()Reset oursevles.
throwsDocumentException
DocumentException
public void setTransactionIsolation(int level)Set the transaction isolation level.
throwsDocumentException
DefaultDocumentProvider.setTransactionIsolation(int)
DocumentException
public staticSplit a delimited list into a List.List
split(String
str,String
on)
protected boolean supportsLikeEscapeClause(Connection
con)
Determine whether the specified connection supports the SQL LIKE
ESCAPE clause.
This will first check our RefDocumentProvider.supportsLikeEscapeClause
setting,
then defer to the Connection's DatabaseMetaData.