|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.p13n.content.document.ref.RefCleanupHelper
RefCleanupHelper
instead.
A helper class which can cleanup a reference implementation database.
cleanup(java.sql.Connection, java.lang.String, boolean)
Field Summary | |
static String |
addEmptyDocSql
Deprecated. The sql to insert a document into the document table with default values. |
static String |
DEF_MIME_TYPE
Deprecated. A default mime type the cleaner uses when adding to the document table. |
static String |
DOC_MD_TABLE
Deprecated. The document_metadata table name. |
static String |
DOC_TABLE
Deprecated. The document table name. |
static String |
getDocsSql
Deprecated. The sql to pull the ids and mime types from the document table. |
static String |
missingDocSql
Deprecated. The sql to pull document ids of document that don't exist in the document table, but have entries in the document_metadata table. |
static String |
updateDocSql
Deprecated. The sql to update a row in the document table. |
Constructor Summary | |
RefCleanupHelper()
Deprecated. |
Method Summary | |
static void |
cleanup(Connection con,
String docBase,
boolean deleteMissing)
Deprecated. Clean up a reference implementation document and document_metadata table based only upon what's in the database. |
static void |
cleanupDocs(Connection con,
String docBase,
boolean deleteMissing)
Deprecated. Cleans up the document table. |
static void |
deleteDoc(Connection con,
String path)
Deprecated. |
static void |
fixMissingDocs(Connection con)
Deprecated. Cleanup the document table based upon what's in the document_metadata table. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String addEmptyDocSql
public static final String DEF_MIME_TYPE
public static final String DOC_MD_TABLE
RefDocumentProvider.DOC_MD_TABLE
public static final String DOC_TABLE
RefDocumentProvider.DOC_TABLE
public static final String getDocsSql
public static final String missingDocSql
public static final String updateDocSql
Constructor Detail |
public RefCleanupHelper()
Method Detail |
public static void cleanup(Connection con, String docBase, boolean deleteMissing) throws SQLException
This will not investigate the contents of the docBase except to gather file information about a file already in the database.
con
- the database connection.docBase
- the document base.deleteMissing
- true to delete documents which are missing from
the docBase, false to set their size to 0.
SQLException
- thrown on a database error.fixMissingDocs(java.sql.Connection)
,
cleanupDocs(java.sql.Connection, java.lang.String, boolean)
public static void cleanupDocs(Connection con, String docBase, boolean deleteMissing) throws SQLException
This will update the document_size based upon the files under docBase and update the modified_date to now. Additionally, this will attempt to fix up invalid or empty mimeTypes.
con
- the database connection.docBase
- the document base.deleteMissing
- true to delete documents which are missing from
the docBase, false to set their size to 0.
SQLException
public static void deleteDoc(Connection con, String path) throws SQLException
SQLException
public static void fixMissingDocs(Connection con) throws SQLException
This will add entries in the document table that don't exist from those in the document_metadata table.
SQLException
|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |