Class AbstractDocumentDataProvider<S extends Source,SH extends PageSegmentHandle>
java.lang.Object
com.levigo.jadice.web.demo.common.server.dataprovider.AbstractDocumentDataProvider<S,SH>
- All Implemented Interfaces:
DocumentDataProvider<S,SH>
- Direct Known Subclasses:
ClassPathWithAnnoDocumentDataProvider,ClassPathWithRenderControlsDocumentDataProvider,CompositeDocumentDataProvider,DDPWithAnnoPermissions
public abstract class AbstractDocumentDataProvider<S extends Source,SH extends PageSegmentHandle>
extends Object
implements DocumentDataProvider<S,SH>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidprotected abstract voidfinal voidReads a part of the document to load.final voidPartially recovers aDocumentidentified by the givenPageSegmentHandle.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.levigo.jadice.web.server.DocumentDataProvider
createSourceHandle
-
Constructor Details
-
AbstractDocumentDataProvider
public AbstractDocumentDataProvider()
-
-
Method Details
-
read
public final void read(com.levigo.jadice.document.read.Reader reader, S source) throws com.levigo.jadice.document.JadiceException, IOException Description copied from interface:DocumentDataProviderReads a part of the document to load. This will be used to initially load the document when a client initiates displaying a document. Please note, that the read method will be called only once during a server-side document read lifecycle. Subsequent reads will trigger the recover method, not a read.- Specified by:
readin interfaceDocumentDataProvider<S extends Source,SH extends PageSegmentHandle> - Parameters:
reader- TheReaderto load the document.source- TheSourceto read the document from, including a unique identifier.- Throws:
com.levigo.jadice.document.JadiceException- Any rendering exceptions reported by the Jadice core.IOException- Other exceptions while reading the document.
-
recover
public final void recover(com.levigo.jadice.document.read.Reader reader, SH sourceHandle) throws com.levigo.jadice.document.JadiceException, RecoverFailedException Description copied from interface:DocumentDataProviderPartially recovers aDocumentidentified by the givenPageSegmentHandle. Sometimes, client applications may requestDocumentinstances that have either been removed from cache, garbage-collected due to long inactivity or in consequence of a server switch. This method will be used for subsequent document reads.- Specified by:
recoverin interfaceDocumentDataProvider<S extends Source,SH extends PageSegmentHandle> - Parameters:
reader- TheReaderto load the Document withsourceHandle- The information specifying which Document to recover- Throws:
com.levigo.jadice.document.JadiceException- Any rendering exceptions reported by the Jadice core.RecoverFailedException- Thrown if the document cannot be recovered.
-
doRecover
protected abstract void doRecover(com.levigo.jadice.document.read.Reader read, SH sourceHandle) throws com.levigo.jadice.document.JadiceException, IOException - Throws:
com.levigo.jadice.document.JadiceExceptionIOException
-
doRead
protected abstract void doRead(com.levigo.jadice.document.read.Reader read, S source) throws com.levigo.jadice.document.JadiceException, IOException - Throws:
com.levigo.jadice.document.JadiceExceptionIOException
-