org.modeshape.jcr.federation.spi
Class ReadOnlyConnector
java.lang.Object
org.modeshape.jcr.federation.spi.Connector
org.modeshape.jcr.federation.spi.ReadOnlyConnector
- Direct Known Subclasses:
- GitConnector
public abstract class ReadOnlyConnector
- extends Connector
A specialized abstract Connector class that is readable and can never update content. The connector always
throws DocumentStoreExceptions whenever it is asked to store,
update, or remove documents. Thus, do not subclass if
your custom connector can sometimes modify content.
| Methods inherited from class org.modeshape.jcr.federation.spi.Connector |
checkFieldNotNull, extraPropertiesFor, extraPropertiesStore, factories, getBinaryValue, getCacheTtlSeconds, getChildReference, getContext, getDocumentById, getDocumentId, getLogger, getMimeTypeDetector, getRepositoryName, getSourceName, getTransactionManager, hasDocument, initialize, isQueryable, nameFrom, nameFrom, nameFrom, newChildReference, newDocument, newPageDocument, propertyFactory, readDocument, setExtraPropertiesStore, shutdown, translator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadOnlyConnector
public ReadOnlyConnector()
removeDocument
public final boolean removeDocument(String id)
- Description copied from class:
Connector
- Removes the document with the given id.
- Specified by:
removeDocument in class Connector
- Parameters:
id - a non-null string.
- Returns:
- true if the document was removed, or false if there was no document with the given id
storeDocument
public final void storeDocument(Document document)
- Description copied from class:
Connector
- Stores the given document.
- Specified by:
storeDocument in class Connector
- Parameters:
document - a non-null Document instance.
updateDocument
public final void updateDocument(DocumentChanges documentChanges)
- Description copied from class:
Connector
- Updates a document using the provided changes.
- Specified by:
updateDocument in class Connector
- Parameters:
documentChanges - a non-null DocumentChanges object which contains
granular information about all the changes.
Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.