Enum Class WorkspaceScope

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

public enum WorkspaceScope extends Enum<WorkspaceScope>
Whether a ws:* goal runs on a single repository (a "working set of one", no workspace.yaml) or requires a workspace (IKE-Network/ike-issues#702).

Carried as compile-time metadata on each WsGoal so ws:help and the generated cheatsheets can state each goal's applicability accurately instead of leaving it to hand-maintained prose. The actual runtime behavior is decided in AbstractWorkspaceMojo (resolveWorkingSet() / resolveManifest()); this enum is the declared, inspectable counterpart of that behavior.

New goals default to WORKSPACE_ONLY (see WsGoal's three-argument constructor): under-claiming bare support is safer than a goal wrongly advertising a single-repo mode it does not implement.

  • Enum Constant Details

    • BARE_AND_WORKSPACE

      public static final WorkspaceScope BARE_AND_WORKSPACE
      Runs meaningfully on a single repository (working set of one) as well as inside a workspace — e.g. ws:commit, ws:push, ws:pull, ws:scaffold, ws:release, ws:feature-*.
    • WORKSPACE_ONLY

      public static final WorkspaceScope WORKSPACE_ONLY
      Requires a workspace.yaml; not meaningful in a lone repository. Either errors without a manifest (e.g. ws:align, ws:graph, ws:overview) or is a deliberate no-op there (e.g. ws:check-branch has no manifest-declared branch to enforce).
  • Method Details

    • values

      public static WorkspaceScope[] 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 WorkspaceScope 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
    • label

      public String label()
      Short human label for help text and cheatsheets, e.g. "single repo or workspace".
      Returns:
      the display label
    • runsBare

      public boolean runsBare()
      Returns:
      true when the goal also runs on a single bare repository (a working set of one)