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

## com.bea.p13n.content.document.spi
Interface DocumentProvider

All Known Implementing Classes:
  DefaultDocumentProvider

public interface DocumentProvider

A object which can provide documents and document information.

In the case of statefull connections to DMS, this should represent a single connection to the DMS (pooling will be handled by the infrastructure).

DocumentProvider can support transaction isolation levels very similar to java.sql.Connections. If the DocumentProvider doesn't support transaction isolation levels, it should always report TRANSACTION_NONE (i.e. it shouldn't thrown an exception).

Field Summary
`static int` | `TRANSACTION_NONE` Deprecated. Isolation level for no transaction support.
`static int` | `TRANSACTION_READ_COMMITTED` Deprecated. Isolation level for dirty reads are prevented; non-repeatable reads and phantom reads can occur.
`static int` | `TRANSACTION_READ_UNCOMMITTED` Deprecated. Isolation level for dirty reads, non-repeatable reads and phantom reads can occur.
`static int` | `TRANSACTION_REPEATABLE_READ` Deprecated. Isolation level for dirty reads and non-repeatable reads are prevented; phantom reads can occur.
`static int` | `TRANSACTION_SERIALIZABLE` Deprecated. Isolation level for dirty reads, non-repeatable reads and phantom reads are prevented.

Method Summary
`void` | `close()` Deprecated. Close the provider down.
`DocumentIterator` | `findDocumentIds(Search params)` Deprecated. Return the set of String document ids of documents which match the given search parameters.
`DocumentIterator` | `findDocumentMetadata(Search params)` Deprecated. Return the set of DocumentMetadataDefs which match the given search parameters object.
`DocumentIterator` | `findDocuments(Search params)` Deprecated. Return the set of DocumentDefs which match the given search parameters object.
`DocumentDef` | `getDocument(String id)` Deprecated. Return the DocumentDef with the given String document id.
`DocumentMetadataDef` | `getDocumentMetadata(String id)` Deprecated. Return the DocumentMetadataDef with the given String document id.
`Timestamp` | `getDocumentModifiedDate(String id)` Deprecated. Get the last modified timestamp for the given document id.
`DocumentSchemaDef` | `getSchema(String schemaName)` Deprecated. Return the named document schema def (null if does not exist).
`DocumentIterator` | `getSchemaNames()` Deprecated. Return the list of schema names supported in this DMS.
`Map` | `getSchemas()` Deprecated. Return the map (name to DocumentSchemaDef) of all the schemas supported in the system.
`int` | `getTransactionIsolation()` Deprecated. Get the document provider's current transaction isolation level.
`void` | `init(Properties properties)` Deprecated. Initialize the DocumentProvider based upon the specified configuration properties.
`void` | `reset()` Deprecated. Reset the connection internally to a fresh state.
`void` | `setTransactionIsolation(int level)` Deprecated. Set the document provider's transaction isolation level.

Field Detail

### TRANSACTION_NONE

    public static final int TRANSACTION_NONE

  Deprecated.
  Isolation level for no transaction support.

  See Also:
    `Connection.TRANSACTION_NONE`, Constant Field Values

### TRANSACTION_READ_COMMITTED

    public static final int TRANSACTION_READ_COMMITTED

  Deprecated.
  Isolation level for dirty reads are prevented; non-repeatable reads and phantom reads can occur.

  See Also:
    `Connection.TRANSACTION_READ_COMMITTED`, Constant Field Values

### TRANSACTION_READ_UNCOMMITTED

    public static final int TRANSACTION_READ_UNCOMMITTED

  Deprecated.
  Isolation level for dirty reads, non-repeatable reads and phantom reads can occur.

  See Also:
    `Connection.TRANSACTION_READ_UNCOMMITTED`, Constant Field Values

### TRANSACTION_REPEATABLE_READ

    public static final int TRANSACTION_REPEATABLE_READ

  Deprecated.
  Isolation level for dirty reads and non-repeatable reads are prevented; phantom reads can occur.

  See Also:
    `Connection.TRANSACTION_REPEATABLE_READ`, Constant Field Values

### TRANSACTION_SERIALIZABLE

    public static final int TRANSACTION_SERIALIZABLE

  Deprecated.
  Isolation level for dirty reads, non-repeatable reads and phantom reads are prevented.

  See Also:
    `Connection.TRANSACTION_SERIALIZABLE`, Constant Field Values

Method Detail

### close

    public void close()
               throws DocumentException

  Deprecated.
  Close the provider down.

  This will be called before the provider is dereferenced; it should close any resources opened by init() or internally. The provider instance should not be used after this method has been invoked.

  Throws:
    `DocumentException` - thrown on an error.

### findDocumentIds

    public DocumentIterator findDocumentIds(Search params)
                                     throws DocumentException

  Deprecated.
  Return the set of String document ids of documents which match the given search parameters.

  Parameters:
    `params` - the search parameters.
  Returns:
    the iterator of String document ids that match.
  Throws:
    `DocumentException` - thrown on an error.

### findDocumentMetadata

    public DocumentIterator findDocumentMetadata(Search params)
                                          throws DocumentException

  Deprecated.
  Return the set of DocumentMetadataDefs which match the given search parameters object.

  The implementor of DocumentProvider will need to map the parameters into the native search mechanism.

  Parameters:
    `params` - the search parameters.
  Returns:
    the iterator of DocumentMetadataDefs that match the search.
  Throws:
    `DocumentException` - thrown on an error.

### findDocuments

    public DocumentIterator findDocuments(Search params)
                                   throws DocumentException

  Deprecated.
  Return the set of DocumentDefs which match the given search parameters object.

  The implementor of DocumentProvider will need to map the parameters into the native search mechanism.

  Parameters:
    `params` - the search parameters.
  Returns:
    the iterator of DocumentDefs that match the search.
  Throws:
    `DocumentException` - thrown on an error.

### getDocument

    public DocumentDef getDocument(String id)
                            throws DocumentException

  Deprecated.
  Return the DocumentDef with the given String document id.

  Parameters:
    `id` - the document id.
  Returns:
    the DocumentDef with the given id, or null on unknown document id.
  Throws:
    `DocumentException` - thrown on an error.

### getDocumentMetadata

    public DocumentMetadataDef getDocumentMetadata(String id)
                                            throws DocumentException

  Deprecated.
  Return the DocumentMetadataDef with the given String document id.

  Parameters:
    `id` - the document id.
  Returns:
    the DocumentMetadataDef of the document with the given id, or null on unknown document id.
  Throws:
    `DocumentException` - thrown on an error.

### getDocumentModifiedDate

    public Timestamp getDocumentModifiedDate(String id)
                                      throws DocumentException

  Deprecated.
  Get the last modified timestamp for the given document id.

  Parameters:
    `id` - the document id.
  Returns:
    the timestamp when the doc was last modified, or null if unknown or doesn't exist.
  Throws:
    `DocumentException`

### getSchema

    public DocumentSchemaDef getSchema(String schemaName)
                                throws DocumentException

  Deprecated.
  Return the named document schema def (null if does not exist).

  Parameters:
    `schemaName` - the name of the schema to find.
  Returns:
    the DocumentSchemaDef or null if not found.
  Throws:
    `DocumentException` - thrown on an error

### getSchemaNames

    public DocumentIterator getSchemaNames()
                                    throws DocumentException

  Deprecated.
  Return the list of schema names supported in this DMS.

  Returns:
    the iterator the String schema names.
  Throws:
    `DocumentException` - thrown on an error.

### getSchemas

    public Map getSchemas()
                   throws DocumentException

  Deprecated.
  Return the map (name to DocumentSchemaDef) of all the schemas supported in the system.

  This operation could be time expensive.

  Returns:
    the map of String schema name of DocumentSchemaDef.
  Throws:
    `DocumentException` - thrown on an errorj

### getTransactionIsolation

    public int getTransactionIsolation()
                                throws DocumentException

  Deprecated.
  Get the document provider's current transaction isolation level.

  Throws:
    `DocumentException`

### init

    public void init(Properties properties)
              throws DocumentException

  Deprecated.
  Initialize the DocumentProvider based upon the specified configuration properties.

  This will be called after the DocumentProvider has been instantiated.

  Parameters:
    `properties` - the configuration properties
  Throws:
    `DocumentException` - thrown on an error.

### reset

    public void reset()
               throws DocumentException

  Deprecated.
  Reset the connection internally to a fresh state.

  This might include rolling back a transaction and clearing out any internal state.

  Throws:
    `DocumentException` - thrown on an error.

### setTransactionIsolation

    public void setTransactionIsolation(int level)
                                 throws DocumentException

  Deprecated.
  Set the document provider's transaction isolation level.

  Throws:
    `DocumentException`

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

Copyright © 2005 BEA Systems, Inc. All Rights Reserved