Skip navigation links

Oracle Business Rules Java API Reference
10g (10.1.3.1.0)

B28966-01


oracle.rules.sdk.store
Class AbstractRepositoryConnection

java.lang.Object
  extended byoracle.rules.sdk.store.AbstractRepositoryConnection

All Implemented Interfaces:
RepositoryConnection

public abstract class AbstractRepositoryConnection
extends java.lang.Object
implements RepositoryConnection

Provides a partial implementation of the RepositoryConnection interface. All implementations of the RepositoryConnection interface should extend this class.


Field Summary

 

Fields inherited from interface oracle.rules.sdk.store.RepositoryConnection
CREATION_METADATA, LAST_MODIFIED_METADATA, REVISION_CONTROL_OPTION, REVISION_METADATA, TAG_METADATA, TAGS_OPTION

 

Constructor Summary
AbstractRepositoryConnection()
           

 

Method Summary
 boolean cachesModifications()
          Returns true if the underlying implementation caches repository modifications.
abstract  void createDocument(DocumentID id, org.w3c.dom.Document document)
          Creates a new document in the repository, identified by the specified Document with the specified initial content.
 DocumentID createDocumentID()
          Creates an empty DocumentID for use with this RepositoryConnection.
 DocumentID createDocumentID(DocumentID id)
          Creates a DocumentID for use with this RepositoryConnection from the specified DocumentID.
 DocumentID createDocumentID(java.lang.String dictionaryName, java.lang.String documentType, java.lang.String documentName, java.lang.String marker, java.lang.String revision, java.lang.String tag)
          Creates a DocumentID for use with this RepositoryConnection from the individual components.
abstract  void deleteDocument(DocumentID id)
          Deletes the document identified by the specified DocumentID from the repository.
 void flush()
          Flushes repository modifications to the underlying repository.
abstract  org.w3c.dom.Document getDocument(DocumentID id)
          Gets the document identified by the specified DocumentID.
abstract  java.util.Map getDocumentMetadata(DocumentID id)
          Gets the metadata for the document identified by the specified DocumentID.
 java.util.ResourceBundle getResourceBundle()
          Gets the ResourceBundle for messages for this package.
 void init(java.security.Principal principal, java.util.Locale locale, SensitiveDataCallback callback, java.util.Properties properties)
          Common initialization for a repository connection.
 boolean isOptionSupported(java.lang.String option)
          Tests if the specified option is supported.
abstract  DocumentID[] listDocuments(DocumentID id)
          Returns a list of DocumentID's that match the specified DocumentID.
abstract  void markDocuments(java.lang.String marker, DocumentID[] ids)
          Associates the marker with the documents identified by the array of DocumentIDs.
abstract  void release()
          Releases this repository connection.
abstract  void updateDocument(DocumentID id, org.w3c.dom.Document document)
          Updates a document identified by the specified DocumentID with the specified content.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

AbstractRepositoryConnection

public AbstractRepositoryConnection()

Method Detail

init

public void init(java.security.Principal principal,
                 java.util.Locale locale,
                 SensitiveDataCallback callback,
                 java.util.Properties properties)
          throws StoreException
Common initialization for a repository connection. This method should be invoked from the init method of the class that extends this class.
Specified by:
init in interface RepositoryConnection
Parameters:
principal - the identity to be used for authorization purposes.
locale - the Locale to be used. May be null.
callback - the callback object for retrieving sensitive data
properties - initialization parameters required by a specific implementation of this interface.
Throws:
StoreException - if an error was encountered initializing this session.

release

public abstract void release()
                      throws StoreException
Releases this repository connection. After a connection is released, invoking any other methods on this interface should throw an exception. Any resources utilized by this connection that can be released should be. If there is any state associated with the repository connection that must be persistent between connection, it is the responsibility of the implementation to save that state.
Specified by:
release in interface RepositoryConnection
Throws:
StoreException - if an error was encountered releasing this session.

createDocument

public abstract void createDocument(DocumentID id,
                                    org.w3c.dom.Document document)
                             throws DocumentExistsException,
                                    DocumentIDException,
                                    DocumentException,
                                    StoreException
Creates a new document in the repository, identified by the specified Document with the specified initial content. The DocumentID must not specify a tag nor a revision.
Specified by:
createDocument in interface RepositoryConnection
Parameters:
id - a DocumentID that identifies the document to be created. The ID should be validated prior to invoking this method.
document - the initial content of the document.
Throws:
DocumentException - if an error is encountered processing the document
DocumentExistsException - if a document corresponding to DocumentID already exists.
DocumentIDException - if the DocumentID is not valid
StoreException - if an error was encountered creating the document or if a document associated with the specified DocumentID already exists.

deleteDocument

public abstract void deleteDocument(DocumentID id)
                             throws DocumentNotFoundException,
                                    DocumentIDException,
                                    StoreException
Deletes the document identified by the specified DocumentID from the repository. The DocumentID must not specify a tag nor a revision.
Specified by:
deleteDocument in interface RepositoryConnection
Parameters:
id - a DocumentID that identifies the document to be deleted. The ID should be validated prior to invoking this method.
Throws:
DocumentNotFoundException - if a document corresponding to the specified DocumentID does not exist.
DocumentIDException - if the DocumentID is not valid
StoreException - if an error was encountered deleting the document.

getDocument

public abstract org.w3c.dom.Document getDocument(DocumentID id)
                                          throws DocumentNotFoundException,
                                                 DocumentIDException,
                                                 StoreException
Gets the document identified by the specified DocumentID.
Specified by:
getDocument in interface RepositoryConnection
Parameters:
id - a DocumentID that identifies the document. The ID should be validated prior to invoking this method.
Returns:
a Document instance for the retrieved document
Throws:
DocumentNotFoundException - if a document corresponding to the specified DocumentID does not exist.
DocumentIDException - if the DocumentID is not valid
StoreException - if an error occurs retrieving the document.

updateDocument

public abstract void updateDocument(DocumentID id,
                                    org.w3c.dom.Document document)
                             throws DocumentNotFoundException,
                                    DocumentIDException,
                                    DocumentException,
                                    StoreException
Updates a document identified by the specified DocumentID with the specified content. The DocumentID must not specify a tag nor a revision. The new document content overwrites the previous content.
Specified by:
updateDocument in interface RepositoryConnection
Parameters:
id - a DocumentID that identifies the document. The ID should be validated prior to invoking this method.
document - the new content of the document.
Throws:
DocumentException - if an error is encountered processing the document
DocumentNotFoundException - if a document corresponding to the specified DocumentID does not exist.
DocumentIDException - if the DocumentID is not valid
StoreException - if document update fails

getDocumentMetadata

public abstract java.util.Map getDocumentMetadata(DocumentID id)
                                           throws DocumentNotFoundException,
                                                  DocumentIDException,
                                                  StoreException
Gets the metadata for the document identified by the specified DocumentID.
Specified by:
getDocumentMetadata in interface RepositoryConnection
Parameters:
id - a DocumentID that identifies the document. The ID should be validated prior to invoking this method.
Returns:
a Map containing the available metadata for the document
Throws:
DocumentNotFoundException - if a document corresponding to the specified DocumentID does not exist.
DocumentIDException - if the DocumentID is not valid
StoreException - if metadata retrieval fails for the document

listDocuments

public abstract DocumentID[] listDocuments(DocumentID id)
                                    throws DocumentIDException,
                                           StoreException
Returns a list of DocumentID's that match the specified DocumentID. The specified id may contain wildcards.
Specified by:
listDocuments in interface RepositoryConnection
Parameters:
id - a DocumentID that may contain wildcards. The ID should be validated prior to invoking this method.
Returns:
a List of DocumentID's. The list is empty if no documents match.
Throws:
DocumentIDException - if the DocumentID is not valid
StoreException - if an error is encountered.

cachesModifications

public boolean cachesModifications()
Returns true if the underlying implementation caches repository modifications. flush must be invoked to flush the modifications to the repository.
Specified by:
cachesModifications in interface RepositoryConnection
Returns:
true if repository modifications are cached.

flush

public void flush()
           throws StoreException
Flushes repository modifications to the underlying repository. If cachesModifications returns false, the behavior of this method is undefined.
Specified by:
flush in interface RepositoryConnection
Throws:
StoreException - if an error was encountered flushing the modifications.

isOptionSupported

public boolean isOptionSupported(java.lang.String option)
Tests if the specified option is supported.
Specified by:
isOptionSupported in interface RepositoryConnection
Parameters:
option - the name of the option.
Returns:
true if the specified option is supported.

createDocumentID

public DocumentID createDocumentID()
Creates an empty DocumentID for use with this RepositoryConnection. Once created and populated, it must be validated for use by invoking the validation method appropriate for the intended use.
Specified by:
createDocumentID in interface RepositoryConnection

createDocumentID

public DocumentID createDocumentID(java.lang.String dictionaryName,
                                   java.lang.String documentType,
                                   java.lang.String documentName,
                                   java.lang.String marker,
                                   java.lang.String revision,
                                   java.lang.String tag)
Creates a DocumentID for use with this RepositoryConnection from the individual components. Once created, it must be validated for use by invoking the validation method appropriate for the intended use.
Specified by:
createDocumentID in interface RepositoryConnection
Parameters:
dictionaryName - the name of the dictionary
documentType - the type of document
documentName - the name of the document
marker - an optional marker associated with the document
revision - a document revision string. It may be null.
tag - a tag string. It may be null.

createDocumentID

public DocumentID createDocumentID(DocumentID id)
Creates a DocumentID for use with this RepositoryConnection from the specified DocumentID. Once created, it must be validated for use by invoking the validation method appropriate for the intended use.
Specified by:
createDocumentID in interface RepositoryConnection
Parameters:
id - the DocumentID the new ID is populated from.

markDocuments

public abstract void markDocuments(java.lang.String marker,
                                   DocumentID[] ids)
                            throws StoreException,
                                   DocumentNotFoundException,
                                   DocumentIDException
Associates the marker with the documents identified by the array of DocumentIDs.
Specified by:
markDocuments in interface RepositoryConnection
Parameters:
marker - the marker.
ids - an array of DocumentIDs which identify the documents to be associated with the marker. Each DocumentID should be validated prior to invoking this method.
Throws:
StoreException - if an error was encountered marking the documents.
DocumentNotFoundException - if no document exists for any DocumentID in the array.
DocumentIDException - if any of the DocumentIDs in the array are invalid

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Gets the ResourceBundle for messages for this package.
Returns:
the ResourceBundle

Skip navigation links

Oracle Business Rules Java API Reference
10g (10.1.3.1.0)

B28966-01


Copyright © 2006, Oracle. All rights reserved.