|
ModeShape Distribution 3.2.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.federation.spi.Connector
org.modeshape.jcr.federation.spi.ReadOnlyConnector
public abstract class ReadOnlyConnector
A specialized abstract Connector
class that is readable and can never update content. The connector always
throws DocumentStoreException
s whenever it is asked to store
,
update
, or remove
documents. Thus, do not subclass if
your custom connector can sometimes modify content.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.modeshape.jcr.federation.spi.Connector |
---|
Connector.ExtraProperties |
Constructor Summary | |
---|---|
ReadOnlyConnector()
|
Method Summary | |
---|---|
boolean |
isReadonly()
Indicates if the connector instance has been configured in read-only mode. |
String |
newDocumentId(String parentId,
Name newDocumentName,
Name newDocumentPrimaryType)
Generates an identifier which will be assigned when a new document (aka. child) is created under an existing document (aka.parent). |
boolean |
removeDocument(String id)
Removes the document with the given id. |
void |
storeDocument(Document document)
Stores the given document. |
void |
updateDocument(DocumentChanges documentChanges)
Updates a document using the provided changes. |
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 |
Constructor Detail |
---|
public ReadOnlyConnector()
Method Detail |
---|
public final boolean removeDocument(String id)
Connector
removeDocument
in class Connector
id
- a non-null
string.
public final void storeDocument(Document document)
Connector
storeDocument
in class Connector
document
- a non-null
Document
instance.public final void updateDocument(DocumentChanges documentChanges)
Connector
updateDocument
in class Connector
documentChanges
- a non-null
DocumentChanges
object which contains
granular information about all the changes.public String newDocumentId(String parentId, Name newDocumentName, Name newDocumentPrimaryType)
Connector
newDocumentId
in class Connector
parentId
- a non-null
String
which represents the identifier of the parent under which the new
document will be created.newDocumentName
- a non-null
Name
which represents the name that will be given
to the child documentnewDocumentPrimaryType
- a non-null
Name
which represents the child document's
primary type.
non-null
String
which will be assigned as the new identifier, or null
which means
that no "special" id format is required. In this last case, the repository will auto-generate a random id.public boolean isReadonly()
Connector
isReadonly
in class Connector
true
if the connector has been configured in read-only mode, false otherwise.
|
ModeShape Distribution 3.2.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |