Class StampRegistry
java.lang.Object
network.ike.docs.plugin.diff.StampRegistry
The packet's stamp set (ike-issues#656): one STAMP per (range commit,
status) pair, plus the uncommitted pair for working-tree marks. Emits
reusable AsciiDoc footnotes — every emission carries the full text,
so document order never matters; Asciidoctor reuses the first
definition per id — and accumulates the used stamps for the packet's
Stamp Register table.
Status is stated redundantly in the endnote for STAMP consistency: Active for insertions and replacements (a replacement is a new Active version; its predecessor is covered by the successor's stamp), Inactive for unpaired deletions. The remaining coordinates map to the git era as: Time = author date, Author = commit author, Module = the topic's domain, Path = the branch.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne stamp as used somewhere in the packet.static enumMarked-region status, stated redundantly in each endnote. -
Constructor Summary
ConstructorsConstructorDescriptionStampRegistry(List<GitSource.CommitMeta> rangeCommits, String branch, String worktreeAuthor, String renderDate, String rangeLabel) Create the registry for one packet. -
Method Summary
Modifier and TypeMethodDescriptionfootnote(String attribution, StampRegistry.Status status, String module) The reusable footnote macro for one attribution + status.booleanmultipleStampsPossible(boolean hasUncommitted) Whether the packet can carry more than one distinct stamp; when not, in-flow refs are suppressed and the cover states the single stamp once.singleStampLine(String module) Render the single stamp's coordinate line for the cover when in-flow refs are suppressed.The stamps actually used in this packet, in first-use order.
-
Constructor Details
-
StampRegistry
public StampRegistry(List<GitSource.CommitMeta> rangeCommits, String branch, String worktreeAuthor, String renderDate, String rangeLabel) Create the registry for one packet.- Parameters:
rangeCommits- the compared range's commitsbranch- the branch (STAMP path coordinate)worktreeAuthor- author for uncommitted stampsrenderDate- date used for uncommitted stamps' timerangeLabel- label for coarse attribution of unpaired deletions in committed ranges, e.g."9a958f7..HEAD"
-
-
Method Details
-
multipleStampsPossible
public boolean multipleStampsPossible(boolean hasUncommitted) Whether the packet can carry more than one distinct stamp; when not, in-flow refs are suppressed and the cover states the single stamp once.- Parameters:
hasUncommitted- whether any compared content is uncommitted- Returns:
- whether multiple stamps are possible
-
singleStampLine
-
footnote
The reusable footnote macro for one attribution + status. Every call emits the full text; Asciidoctor keys reuse on the id.- Parameters:
attribution- an abbreviated commit id orGitSource.UNCOMMITTEDstatus- the region's statusmodule- the topic's domain- Returns:
- the
footnote:id[text]macro
-
usedStamps
The stamps actually used in this packet, in first-use order.- Returns:
- the used stamps
-