Class ToolOwnedTierHandler
java.lang.Object
network.ike.plugin.scaffold.ToolOwnedTierHandler
- All Implemented Interfaces:
TierHandler
Tier handler for
ScaffoldTier.TOOL_OWNED.
Policy: publish always overwrites. The file is intended to be reproduced verbatim from the template; any user edits are discarded. Divergence is surfaced in draft output as telemetry but never blocks publish.
Produces:
TierAction.UpToDatewhen the on-disk bytes already match the template;TierAction.WritewithINSTALLwhen the file is absent;TierAction.WritewithUPDATEotherwise.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionplan(ManifestEntry entry, Path resolvedDest, byte[] currentContent, byte[] templateContent, byte[] createContent, LockfileEntry priorEntry) Plan a single entry.tier()Which tier this handler is responsible for.
-
Constructor Details
-
ToolOwnedTierHandler
public ToolOwnedTierHandler()Construct a stateless tool-owned tier handler. Instances are safe to share across planning calls; all per-invocation state lives on method parameters.
-
-
Method Details
-
tier
Description copied from interface:TierHandlerWhich tier this handler is responsible for.- Specified by:
tierin interfaceTierHandler- Returns:
- the tier; never
null
-
plan
public TierAction plan(ManifestEntry entry, Path resolvedDest, byte[] currentContent, byte[] templateContent, byte[] createContent, LockfileEntry priorEntry) Description copied from interface:TierHandlerPlan a single entry.- Specified by:
planin interfaceTierHandler- Parameters:
entry- the manifest entry being plannedresolvedDest- absolute destination path (placeholders already expanded)currentContent- bytes currently on disk atresolvedDest, ornullif no file existstemplateContent- bytes loaded from the scaffold zip atentry.source(); nevernullfor file-based tierscreateContent- bytes loaded from the scaffold zip at the entry'screate-sourceextra, ornullwhen the entry declares none. Only consulted whencurrentContentisnull— tiers that support create-case seeding (currentlyScaffoldTier.TRACKED_BLOCK) seed this content into the newly created file ahead of their managed region; other tiers ignore itpriorEntry- lockfile entry from the last publish, ornullif this entry has never been applied- Returns:
- a
TierActiondescribing what publish should do
-