Class TrackedTierHandler

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

public final class TrackedTierHandler extends Object implements TierHandler
Tier handler for ScaffoldTier.TRACKED.

Policy: checksum-guarded whole-file management. Publish refreshes the file only when the on-disk content matches the lockfile's applied-sha from the last publish. If the user has edited the file, publish skips it and draft output surfaces a textual diff so the user can merge manually.

Produces:

  • Constructor Details

    • TrackedTierHandler

      public TrackedTierHandler()
      Construct a stateless tracked 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