Enum Class ScaffoldTier

java.lang.Object
java.lang.Enum<ScaffoldTier>
network.ike.plugin.scaffold.ScaffoldTier
All Implemented Interfaces:
Serializable, Comparable<ScaffoldTier>, Constable

public enum ScaffoldTier extends Enum<ScaffoldTier>
Ownership tier that determines how a scaffolded file is managed.

Each file in a scaffold manifest declares exactly one tier. The tier drives every decision made by ike:scaffold-draft|publish|revert: whether to compare checksums, whether to preserve user edits, whether to operate at the whole-file or sub-element level.

See the dev-ike-scaffold-architecture design note for the full policy description.

  • Enum Constant Details

    • TOOL_OWNED

      public static final ScaffoldTier TOOL_OWNED
      Always overwritten on publish. Checksum recorded in the lockfile for drift telemetry only — divergence does not block publish. Intended for files the user should never hand-edit: mvnw, mvnw.cmd, .mvn/wrapper/maven-wrapper.properties.
    • TRACKED

      public static final ScaffoldTier TRACKED
      Checksum-guarded whole-file management. On publish, if the file on disk hashes to the lockfile's applied-sha, it gets refreshed to the new template; if it diverges, publish skips it and surfaces a 3-way diff in the draft output. Suitable for files the user occasionally customizes but that have a canonical shape: .mvn/maven.config, .mvn/jvm.config, .mvn/extensions.xml.
    • TRACKED_BLOCK

      public static final ScaffoldTier TRACKED_BLOCK
      Same policy as TRACKED, but managed content is bounded by # BEGIN ike-managed / # END ike-managed markers within a file whose unmarked regions belong to the project. Use for files like .gitignore where the project has its own ignores alongside an IKE-managed block.
    • MODEL_MANAGED

      public static final ScaffoldTier MODEL_MANAGED
      Per-element management through a domain-model API. Specific elements are added or removed; unrelated content is never touched. Per-element provenance — including the original standards-version — is stored in the lockfile's managed-elements list. Used for ~/.m2/settings.xml (Maven Settings 4 model), pom.xml (OpenRewrite LST via PomModelAdapter), and git config.
  • Method Details

    • values

      public static ScaffoldTier[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ScaffoldTier valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • manifestValue

      public String manifestValue()
      The kebab-case spelling used in lockfiles and manifests.
      Returns:
      the manifest/lockfile spelling of this tier
    • fromManifestValue

      public static ScaffoldTier fromManifestValue(String value)
      Parse a tier from its manifest/lockfile spelling.
      Parameters:
      value - the manifest spelling (e.g. "tool-owned"); matching is case-insensitive
      Returns:
      the matching tier
      Throws:
      IllegalArgumentException - if no tier has this spelling