BEA Systems, Inc.

com.beasys.commerce.axiom.document.ref
Class DefaultDocumentProvider

java.lang.Object
  |
  +--com.beasys.commerce.axiom.document.ref.DefaultDocumentProvider
Direct Known Subclasses:
RefDocumentProvider

public abstract class DefaultDocumentProvider
extends java.lang.Object
implements DocumentProvider

An abstract base implementation of a DocumentProvider.

This can be used by implementors as a starting point for writing a Doc Mgmt SPI implementation.

Since:
2.0

Fields inherited from interface com.beasys.commerce.axiom.document.spi.DocumentProvider
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Constructor Summary
DefaultDocumentProvider()
           
 
Method Summary
 DocumentIterator findDocumentIds(Search params)
          Return the set of document ids which match the given search parameters.
 DocumentDef getDocument(java.lang.String id)
          Return the Document with the given id.
 DocumentMetadataDef getDocumentMetadata(java.lang.String id)
          Return the DocumentMetadata with the given id.
 java.sql.Timestamp getDocumentModifiedDate(java.lang.String id)
          Return the last modified date of the Document with the given id.
 int getTransactionIsolation()
          Get the document provider's current transaction isolation level.
 void setTransactionIsolation(int level)
          Set the document provider's transaction isolation level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDocumentProvider

public DefaultDocumentProvider()
Method Detail

getTransactionIsolation

public int getTransactionIsolation()
                            throws DocumentException
Get the document provider's current transaction isolation level.
Specified by:
getTransactionIsolation in interface DocumentProvider
Returns:
TRANSACTION_NONE

setTransactionIsolation

public void setTransactionIsolation(int level)
                             throws DocumentException
Set the document provider's transaction isolation level.

This method does nothing.

Specified by:
setTransactionIsolation in interface DocumentProvider

findDocumentIds

public DocumentIterator findDocumentIds(Search params)
                                 throws DocumentException
Return the set of document ids which match the given search parameters.

This will call DocumentProvider.findDocumentMetadata(com.beasys.commerce.foundation.expression.Search) and extract the ids from the metadata.

Specified by:
findDocumentIds in interface DocumentProvider
Tags copied from interface: DocumentProvider
Parameters:
params - the search parameters.
Returns:
the iterator of String document ids that match.
Throws:
DocumentException - thrown on an error.

getDocumentMetadata

public DocumentMetadataDef getDocumentMetadata(java.lang.String id)
                                        throws DocumentException
Return the DocumentMetadata with the given id.

This uses DocumentProvider.findDocumentMetadata(com.beasys.commerce.foundation.expression.Search) to do it.

Specified by:
getDocumentMetadata in interface DocumentProvider
Tags copied from interface: DocumentProvider
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.

getDocument

public DocumentDef getDocument(java.lang.String id)
                        throws DocumentException
Return the Document with the given id.

This uses DocumentProvider.findDocuments(com.beasys.commerce.foundation.expression.Search) to do it.

Specified by:
getDocument in interface DocumentProvider
Tags copied from interface: DocumentProvider
Parameters:
id - the document id.
Returns:
the DocumentDef with the given id, or null on unknown document id.
Throws:
DocumentException - thrown on an error.

getDocumentModifiedDate

public java.sql.Timestamp getDocumentModifiedDate(java.lang.String id)
                                           throws DocumentException
Return the last modified date of the Document with the given id.

This uses getDocumentMetadata(java.lang.String) to do it.

Specified by:
getDocumentModifiedDate in interface DocumentProvider
Tags copied from interface: DocumentProvider
Parameters:
id - the document id.
Returns:
the timestamp when the doc was last modified, or null if unknown or doesn't exist.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved