D
- The document typepublic interface DocumentSource<D>
Implementations are expected to be safe for concurrent access. This includes returned descriptors.
DocumentDescriptor
Modifier and Type | Method and Description |
---|---|
DocumentDescriptor<D> |
getDocument(String documentName)
Gets a document by its name.
|
Collection<DocumentDescriptor<D>> |
getDocuments()
Access to all available documents.
|
String |
getIdentifier()
The identifier for this document source.
|
DocumentDescriptor<D> |
setDocument(String documentName,
String sourceCode,
String tag,
D document)
Allows adding or changing documents.
|
DocumentDescriptor<D> |
setDocumentIfAbsent(String documentName,
String sourceCode,
String tag,
D document)
Allows for atomically adding or changing documents.
|
DocumentDescriptor<D> getDocument(String documentName) throws DocumentException
documentName
- The document's nameDocumentException
- In case of a document retrieval errorDocumentDescriptor<D> setDocument(String documentName, String sourceCode, String tag, D document) throws DocumentException
documentName
- The document's namesourceCode
- The source code for the documenttag
- The tagdocument
- The documentDocumentException
- In case of a document retrieval errorDocumentDescriptor<D> setDocumentIfAbsent(String documentName, String sourceCode, String tag, D document) throws DocumentException
documentName
- The document's namesourceCode
- The source code for the documenttag
- The tagdocument
- The document instanceDocumentException
- In case of a document retrieval errorCollection<DocumentDescriptor<D>> getDocuments()
Note that not all implementations support this operation.
UnsupportedOperationException
- In case this document source doesn't support this operationString getIdentifier()
Copyright © 2009-2015 Three Crickets LLC.