Interface DocumentGenerator<T>

Type Parameters:
T - type of the entity used to create the document

public interface DocumentGenerator<T>
The generator is responsible for creating a document from an entity and a set of properties. The properties are used to configure the generation process. The configuration can also be defined in the constructor of the generator.

The generator instance can be discarded after the generation of the document.

  • Field Details

  • Method Details

    • export

      void export(@NotNull T entity, boolean overwrite, @NonNull @NonNull Path document, @NotNull @NotNull DomainAudit audit)
      Creates a new output document.
      Parameters:
      entity - entity used to create a new invoice document
      audit - domain audit sink to log the operation events
    • shouldExport

      default boolean shouldExport(@NonNull @NonNull Path document, boolean overwrite)