Package com.pnfsoftware.jeb.core.output
Class UnitFormatterUtil
java.lang.Object
com.pnfsoftware.jeb.core.output.UnitFormatterUtil
Utility methods for unit formatters.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAllPresentations(IUnitFormatter formatter, Collection<IUnitDocumentPresentation> presentations, boolean persisted) Append a collection of presentations to the provided formatter.static IUnitDocumentPresentationgetPresentationByDocument(IUnitFormatter formatter, IGenericDocument doc) Retrieve a presentation by document.static IUnitDocumentPresentationgetPresentationByIdentifier(IUnitFormatter formatter, long id) Retrieve a presentation by document identifier.static IUnitDocumentPresentationgetPresentationByName(IUnitFormatter formatter, String documentLabel) Retrieve a presentation by document label.
-
Method Details
-
addAllPresentations
public static void addAllPresentations(IUnitFormatter formatter, Collection<IUnitDocumentPresentation> presentations, boolean persisted) Append a collection of presentations to the provided formatter.- Parameters:
formatter- target formatterpresentations- presentations to appendpersisted-trueto add them as persisted presentations
-
getPresentationByIdentifier
public static IUnitDocumentPresentation getPresentationByIdentifier(IUnitFormatter formatter, long id) Retrieve a presentation by document identifier.- Parameters:
formatter- source formatterid- presentation identifier- Returns:
- the matching presentation, or
nullif none exists
-
getPresentationByName
public static IUnitDocumentPresentation getPresentationByName(IUnitFormatter formatter, String documentLabel) Retrieve a presentation by document label.- Parameters:
formatter- source formatterdocumentLabel- presentation label to match- Returns:
- the matching presentation, or
nullif none exists
-
getPresentationByDocument
public static IUnitDocumentPresentation getPresentationByDocument(IUnitFormatter formatter, IGenericDocument doc) Retrieve a presentation by document.- Parameters:
formatter- source formatterdoc- backing document instance to match by identity- Returns:
- the matching presentation, or
nullif none exists
-