Add a group to a couple sample classes

This commit is contained in:
Eric Bottard
2017-09-25 14:46:10 +02:00
parent e4e6471f27
commit 531dc35abe
2 changed files with 5 additions and 5 deletions

View File

@@ -37,22 +37,22 @@ public class DynamicCommands {
return connected ? Availability.available() : Availability.unavailable("you are not connected");
}
@ShellMethod("Authenticate with the system")
@ShellMethod(value = "Authenticate with the system", group = "Dynamic Commands")
public void authenticate(String credentials) {
authenticated = "sesame".equals(credentials);
}
@ShellMethod("Connect to the system")
@ShellMethod(value = "Connect to the system", group = "Dynamic Commands")
public void connect() {
connected = true;
}
@ShellMethod("Disconnect from the system")
@ShellMethod(value = "Disconnect from the system", group = "Dynamic Commands")
public void disconnect() {
connected = false;
}
@ShellMethod("Blow Everything up")
@ShellMethod(value = "Blow Everything up", group = "Dynamic Commands")
@ShellMethodAvailability("dangerousAvailability")
public String blowUp() {
return "Boom!";

View File

@@ -31,7 +31,7 @@ public class TableCommands {
"voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat " +
"non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
@ShellMethod("Showcase Table rendering")
@ShellMethod(value = "Showcase Table rendering", group = "Tables")
public Table table() {
String[][] data = new String[3][3];
TableModel model = new ArrayTableModel(data);