-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WFCORE-7124] Remove use of server-side Stability type from the CLI
- Loading branch information
1 parent
55e18a0
commit 349b32d
Showing
5 changed files
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
cli/src/main/java/org/jboss/as/cli/embedded/Stability.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright The WildFly Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.jboss.as.cli.embedded; | ||
|
||
/** | ||
* Counterpart to the server-side {@code org.jboss.as.version.Stability}. | ||
* We cannot depend on the server-side type in the strictly client-side CLI. | ||
* <p/> | ||
* <strong>This must only be used for tab completion suggestions. The CLI does not | ||
* control the valid stability levels for a server, so if this class is out of sync | ||
* with what a server allows, the only acceptable effect is incorrect suggestions.</strong> | ||
* The alternative to this restriction is to not suggest values at all and remove this type. | ||
*/ | ||
enum Stability { | ||
|
||
DEFAULT("default"), | ||
COMMUNITY("community"), | ||
PREVIEW("preview"), | ||
EXPERIMENTAL("experimental"), | ||
; | ||
private final String value; | ||
|
||
Stability(String value) { | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return this.value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters