com.pnfsoftware.jeb.core.output.IUnitFormatter |
Known Indirect Subclasses |
A unit formatter is used to retrieve presentations of a unit. A unit
is responsible
for providing 0 or more document presentations, which can then be displayed by clients.
Presentations held by the formatter are of two types: transient and persisted.
Persisted presentations are serialized upon saving; care should be exercised to make sure that
persisted documents do not contain references to transient documents.
Adding and removing presentations is allowed. It is the responsibility of the client code to
notify of such changes by issuing UnitChange
events.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
addPresentation(IUnitDocumentPresentation presentation, boolean persisted)
Add a presentation.
| ||||||||||
abstract void |
discardTransientPresentations()
Discard all presentations not marked as
persisted . | ||||||||||
abstract List<IUnitDocumentPresentation> |
getDocumentPresentations()
This method has been deprecated; Use
getPresentations() . | ||||||||||
abstract IUnitDocumentPresentation |
getPresentation(int index)
Retrieve a presentation.
| ||||||||||
abstract int |
getPresentationCount()
Get the number of document presentations contained in this formatter.
| ||||||||||
abstract List<IUnitDocumentPresentation> |
getPresentations()
Retrieve a list of all (persisted and transient) document presentations.
| ||||||||||
abstract void |
insertPresentation(int index, IUnitDocumentPresentation presentation, boolean persisted)
Insert a presentation at the given index.
| ||||||||||
abstract boolean |
isPersisted(int index)
Determine whether or not a presentation is to be persisted upon serialization.
| ||||||||||
abstract void |
removePresentation(int index)
Remove a presentation.
|
Add a presentation. The presentation will be appended to the list of existing presentations. If the presentation already exists in this formatter, this method will silently fail.
presentation | the presentation |
---|---|
persisted | true to persist the presentation, false otherwise; if true, the presentation
must be serializable
|
Discard all presentations not marked as persisted
.
This method has been deprecated; Use getPresentations()
.
Retrieve a presentation.
index | presentation index |
---|
Get the number of document presentations contained in this formatter.
Retrieve a list of all (persisted and transient) document presentations. This list is a copy; any attempt to modify it will raise an exception.
Insert a presentation at the given index. If the presentation already exists in this formatter, this method will silently fail.
index | insertion index |
---|---|
presentation | the presentation |
persisted | true to persist the presentation, false otherwise; if true, the presentation
must be serializable
|
Determine whether or not a presentation is to be persisted upon serialization.
index | presentation index |
---|
Remove a presentation.
index | presentation index |
---|