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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidexport(T entity, boolean overwrite, @NonNull Path document, @NotNull DomainAudit audit) Creates a new output document.default booleanshouldExport(@NonNull Path document, boolean overwrite)
-
Field Details
-
ORGANIZATION_NAME_KEY
- See Also:
-
ORGANIZATION_ID_KEY
- See Also:
-
ORGANIZATION_LANGUAGE_KEY
- See Also:
-
ORGANIZATION_DATE_FORMAT_KEY
- See Also:
-
COPYRIGHT_KEY
- See Also:
-
THEME_PATH_KEY
- See Also:
-
LOGO_PATH_KEY
- See Also:
-
-
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 documentaudit- domain audit sink to log the operation events
-
shouldExport
-