Class ToolOwnedTierHandler

java.lang.Object
network.ike.plugin.scaffold.ToolOwnedTierHandler
All Implemented Interfaces:
TierHandler

public final class ToolOwnedTierHandler extends Object implements 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:

  • 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

      public ScaffoldTier tier()
      Description copied from interface: TierHandler
      Which tier this handler is responsible for.
      Specified by:
      tier in interface TierHandler
      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: TierHandler
      Plan a single entry.
      Specified by:
      plan in interface TierHandler
      Parameters:
      entry - the manifest entry being planned
      resolvedDest - absolute destination path (placeholders already expanded)
      currentContent - bytes currently on disk at resolvedDest, or null if no file exists
      templateContent - bytes loaded from the scaffold zip at entry.source(); never null for file-based tiers
      createContent - bytes loaded from the scaffold zip at the entry's create-source extra, or null when the entry declares none. Only consulted when currentContent is null — tiers that support create-case seeding (currently ScaffoldTier.TRACKED_BLOCK) seed this content into the newly created file ahead of their managed region; other tiers ignore it
      priorEntry - lockfile entry from the last publish, or null if this entry has never been applied
      Returns:
      a TierAction describing what publish should do