Enum Class WorkspaceScope
- All Implemented Interfaces:
Serializable, Comparable<WorkspaceScope>, Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRuns meaningfully on a single repository (working set of one) as well as inside a workspace — e.g.Requires aworkspace.yaml; not meaningful in a lone repository. -
Method Summary
Modifier and TypeMethodDescriptionlabel()Short human label for help text and cheatsheets, e.g.booleanrunsBare()static WorkspaceScopeReturns the enum constant of this class with the specified name.static WorkspaceScope[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
Requires aworkspace.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-branchhas no manifest-declared branch to enforce).
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
label
Short human label for help text and cheatsheets, e.g."single repo or workspace".- Returns:
- the display label
-
runsBare
public boolean runsBare()- Returns:
truewhen the goal also runs on a single bare repository (a working set of one)
-