Class UnitRepresentationAdapter

java.lang.Object
com.pnfsoftware.jeb.core.output.AbstractUnitRepresentation
com.pnfsoftware.jeb.core.output.UnitRepresentationAdapter
All Implemented Interfaces:
IUnitDocumentPresentation

@Ser public class UnitRepresentationAdapter extends AbstractUnitRepresentation
A simple unit representation, always returning the document set at construction time. Unlike AbstractTransientUnitRepresentation, this class cannot act as a document factory.
  • Constructor Details

    • UnitRepresentationAdapter

      public UnitRepresentationAdapter(long id, String label, boolean defaultRepresentation, IGenericDocument doc)
      Create the representation adapter.
      Parameters:
      id -
      label -
      defaultRepresentation -
      doc -
  • Method Details

    • getDocument

      public IGenericDocument getDocument()
      Description copied from interface: IUnitDocumentPresentation
      Get a document. It is implementation-dependent whether the document is a freshly created or a singleton provided by the presentation.
      Returns:
      the document
    • dispose

      public void dispose()
      Description copied from interface: IUnitDocumentPresentation
      Dispose this presentation. All created documents held in the presentation shall be destroyed. This method is a fail-safe, calling it is not good practice. Good practice is to let the code that created a document dispose of it.