Package com.levigo.jadice.document
Class BasicDocument
- java.lang.Object
-
- com.levigo.jadice.document.AbstractDocument
-
- com.levigo.jadice.document.BasicDocument
-
- All Implemented Interfaces:
Document,Item,MetadataProvider,MutableMetadataProvider,PermissionsProvider<Document>,PropertiesProvider
public class BasicDocument extends AbstractDocument
Default implementation of the
Documentinterface.BasicDocuments neither allow insertion of duplicatePageelements nor attempting to insertnullas aPage.Initial
Document.StateofBasicDocuments isDocument.BasicState.READY. This implementation is not thread-safe
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.levigo.jadice.document.Document
Document.BasicState, Document.State
-
-
Field Summary
Fields Modifier and Type Field Description protected static LoggerLOGGER-
Fields inherited from class com.levigo.jadice.document.AbstractDocument
interceptorSupport, listenerSupport
-
Fields inherited from interface com.levigo.jadice.document.Document
BASE_RESOLUTION, PROPERTY_KEY_DISPLAY_NAME, PROPERTY_KEY_DOCUMENT_ID, PROPERTY_KEY_FILE_NAME, PROPERTY_NAME, PROPERTY_PREFIX_PAGE, PROPERTY_PREFIX_USER_PROPERTY, PROPERTY_STATE
-
-
Constructor Summary
Constructors Constructor Description BasicDocument()Construct a new document.BasicDocument(String name)Construct a new document with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventList<Page>getPages()Returns a list of pages in the document.-
Methods inherited from class com.levigo.jadice.document.AbstractDocument
addDocumentInterceptor, addDocumentListener, addPage, cleanUpResources, close, dispose, exceptionIfDisposed, getMetadata, getMutableMetadataRoot, getName, getPage, getPage, getPageCount, getPageIndex, getPermissions, getProperties, getState, isDisposed, removeDocumentInterceptor, removeDocumentListener, setName, setState, toString
-
-
-
-
Field Detail
-
LOGGER
protected static final Logger LOGGER
-
-
Constructor Detail
-
BasicDocument
public BasicDocument()
Construct a new document.
-
BasicDocument
public BasicDocument(String name)
Construct a new document with the given name.- Parameters:
name- the name of the document
-
-
Method Detail
-
getPages
public EventList<Page> getPages()
Description copied from interface:DocumentReturns a list of pages in the document. Please note that, unless stated otherwise by implementors, this list is not thread-safe. Care must therefore be taken to manipulate the page list with appropriate locking as detailed in the documentation ofEventList. As a convenience, a non-thread-safe page list may be wrapped usingGlazedLists.threadSafeList(EventList)to obtain a thread-safe one.- Specified by:
getPagesin interfaceDocument- Specified by:
getPagesin classAbstractDocument- Returns:
- the list of pages or the empty list, if the document has been disposed of
-
-