Class PreparedLetterTemplate
java.lang.Object
com.nsdev.lettergenerator.template.PreparedLetterTemplate
Immutable parsed template and configuration, safe for concurrent independent binding.
-
Constructor Summary
ConstructorsConstructorDescriptionPreparedLetterTemplate(String source, Map<String, ?> values, Map<String, byte[]> assets, boolean substitute, LetterTheme theme, Map<String, LetterComponent> components, DocumentSettings settings) Captures source and configuration from a builder, parsing once. -
Method Summary
Modifier and TypeMethodDescriptionReplaces all captured bindings for this call without changing the prepared template.build()validate()validate(LetterPdfGenerator generator) Validates captured bindings and configuration without native layout.
-
Constructor Details
-
PreparedLetterTemplate
public PreparedLetterTemplate(String source, Map<String, ?> values, Map<String, byte[]> assets, boolean substitute, LetterTheme theme, Map<String, LetterComponent> components, DocumentSettings settings) Captures source and configuration from a builder, parsing once.- Parameters:
source- supported markupvalues- typed default bindingsassets- explicitly named encoded imagessubstitute- binding modetheme- optional themecomponents- reusable model componentssettings- optional document settings
-
-
Method Details
-
requirements
- Returns:
- immutable syntactic requirements with source selectors
-
build
- Returns:
- a fresh document using the bindings captured at compile time
-
bind
Replaces all captured bindings for this call without changing the prepared template.- Parameters:
replacements- non-null owned typed data- Returns:
- independent immutable letter document
-
validate
- Returns:
- authoring report using built-in fonts and captured bindings
-
validate
Validates captured bindings and configuration without native layout.- Parameters:
generator- explicit font-aware validator- Returns:
- aggregated authoring report
-