-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCLI.java
More file actions
55 lines (45 loc) · 1.97 KB
/
Copy pathCLI.java
File metadata and controls
55 lines (45 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.github.sblack4;
import picocli.CommandLine;
import picocli.CommandLine.*;
import java.util.Arrays;
import java.util.stream.Collectors;
@Command(name="CLI",
sortOptions = false,
header = "@|fg(0;0;0),bg(5;0;0),bold " +
" _ _ _ _ __ _ \n" +
" | || |___| | |___ / _|_ _ ___ _ __ _ | |__ ___ ____ _ \n" +
" | __ / -_) | / _ \\ | _| '_/ _ \\ ' \\ | || / _` \\ V / _` |\n" +
" |_||_\\___|_|_\\___/ |_| |_| \\___/_|_|_| \\__/\\__,_|\\_/\\__,_||@\n" +
"@|fg(5;0;0),bg(0;0;0) \n Create, Scale, List, and Delete your ATP - examples in... JAVA!|@",
subcommands = { createAutonomousDatabase.class,
listAutonomousDatabases.class,
updateAutonomousDatabase.class,
deleteAutonomousDatabase.class,
ATPConnectionTest.class,
startAutonomousDatabase.class,
getAutonomousDatabases.class,
stopAutonomousDatabase.class}
)
public class CLI implements Runnable {
@Option(names = { "-h", "--help" }, usageHelp = true, description = "Displays this help message and quits.")
private boolean helpRequested = false;
public void run() {
}
public static void main(String[] args) {
if (args.length < 1) {
System.out.println("Incorrect Usage, please give command \n");
CommandLine.usage(new CLI(), System.err);
System.exit(1);
}
// make all the args lowercase
// String [] lowerArgs = new String[args.length];
// lowerArgs = Arrays.stream(args)
// .filter(arg -> !arg.isEmpty())
// .map(arg -> arg.toLowerCase())
// .collect(Collectors.toList()).toArray(lowerArgs);
// for (String arg : lowerArgs) {
// System.out.println(arg);
// }
CommandLine.run(new CLI(), args);
}
}