Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.content.document.ref
Class RefCleanupHelper

    java.lang.Object
      com.bea.p13n.content.document.ref.RefCleanupHelper

Deprecated. Use `RefCleanupHelper` instead.

public class RefCleanupHelper
extends Object

A helper class which can cleanup a reference implementation database.

See Also:
  `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

### addEmptyDocSql

    public static final String addEmptyDocSql

  Deprecated.
  The sql to insert a document into the document table with default values.

### DEF_MIME_TYPE

    public static final String DEF_MIME_TYPE

  Deprecated.
  A default mime type the cleaner uses when adding to the document table.

  See Also:
    Constant Field Values

### DOC_MD_TABLE

    public static final String DOC_MD_TABLE

  Deprecated.
  The document_metadata table name.

  See Also:
    `RefDocumentProvider.DOC_MD_TABLE`

### DOC_TABLE

    public static final String DOC_TABLE

  Deprecated.
  The document table name.

  See Also:
    `RefDocumentProvider.DOC_TABLE`

### getDocsSql

    public static final String getDocsSql

  Deprecated.
  The sql to pull the ids and mime types from the document table.

### missingDocSql

    public static final 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.

### updateDocSql

    public static final String updateDocSql

  Deprecated.
  The sql to update a row in the document table.

Constructor Detail

### RefCleanupHelper

    public RefCleanupHelper()

  Deprecated.

Method Detail

### cleanup

    public static void cleanup(Connection con,
                               String docBase,
                               boolean deleteMissing)
                        throws SQLException

  Deprecated.
  Clean up a reference implementation document and document_metadata table based only upon what's in the database.

  This will not investigate the contents of the docBase except to gather file information about a file already in the database.

  Parameters:
    `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.
  Throws:
    `SQLException` - thrown on a database error.
  See Also:
    `fixMissingDocs(java.sql.Connection)`, `cleanupDocs(java.sql.Connection, java.lang.String, boolean)`

### cleanupDocs

    public static void cleanupDocs(Connection con,
                                   String docBase,
                                   boolean deleteMissing)
                            throws SQLException

  Deprecated.
  Cleans up the document table.

  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.

  Parameters:
    `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.
  Throws:
    `SQLException`

### deleteDoc

    public static void deleteDoc(Connection con,
                                 String path)
                          throws SQLException

  Deprecated.
  Throws:
    `SQLException`

### fixMissingDocs

    public static void fixMissingDocs(Connection con)
                               throws SQLException

  Deprecated.
  Cleanup the document table based upon what's in the document_metadata table.

  This will add entries in the document table that don't exist from those in the document_metadata table.

  Throws:
    `SQLException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved