Interface TierAction
- All Known Implementing Classes:
TierAction.Skip, TierAction.UpToDate, TierAction.UserManaged, TierAction.Write
public sealed interface TierAction
permits TierAction.Write, TierAction.Skip, TierAction.UpToDate, TierAction.UserManaged
A plan-time decision about what to do with a single scaffold
entry. Produced by a
TierHandler from a (manifest entry,
current disk state, template bytes, lockfile entry) tuple and
consumed by the scaffold applier.
The sealed hierarchy gives the applier exhaustive pattern matching and keeps the planner pure — no tier handler touches disk during planning.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordPublish must not touchTierAction.Skip.resolvedDest()because the user has diverged from the last-applied version.static final recordNothing to write — target already matches the current template.static final recordPublish must not touchTierAction.UserManaged.resolvedDest()because at least one managed element already exists with a value the user has chosen, and policy is to defer to the user's value rather than overwrite it.static final recordPublish should writenewContenttoTierAction.Write.resolvedDest(). -
Method Summary
-
Method Details
-
entry
ManifestEntry entry()The manifest entry this action relates to.- Returns:
- the originating manifest entry
-
resolvedDest
Path resolvedDest()The absolute destination path on disk, with any~/or{project.root}/placeholders already expanded.- Returns:
- the fully-resolved destination path
-
reason
String reason()Human-readable summary rendered inscaffold-draftoutput. One line per entry; may include counts or diff hints.- Returns:
- the draft-output summary line for this action
-