1 package fr.ifremer.quadrige3.core.action;
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 public class HelpAction {
32
33 private static String LS = System.lineSeparator();
34
35
36
37
38
39
40 public void show() {
41 StringBuilder sb = new StringBuilder();
42
43 sb.append("Usage: <commands> <options>").append(LS)
44 .append("with <commands>:").append(LS)
45 .append(" -h --help Display help").append(LS)
46 .append(" --schema-update Run database schema update").append(LS)
47 .append(" --schema-status --output <file> Generate a database status report (pending schema changes)").append(LS)
48 .append(" --schema-diff --output <file> Generate a database schema diff report (compare database to quadrige3 data model)").append(LS)
49 .append(" --schema-changelog --output <file> Generate a diff into a changelog XML file (compare database to quadrige3 data model)").append(LS)
50 .append(" --new-db --output <directory> Generate a empty Quadrige3 database (and execute --schema-update)").append(LS)
51 .append(" --import-ref Import referential data, from the central database").append(LS)
52 .append(" --import-data Import raw data, from the central database").append(LS)
53 .append(LS)
54 .append("with <options>:").append(LS)
55 .append(" -u --user <user> Database user").append(LS)
56 .append(" -p --password <pwd> Database password").append(LS)
57 .append(" -db --database <db_url> Database JDBC URL ()").append(LS)
58 .append(" -f Force the output directory overwrite, if exists").append(LS)
59 .append(LS)
60 .append("other <options> for commands --import-XXX").append(LS)
61 .append(" -iu --import-user <user> Imported database user").append(LS)
62 .append(" -ip --import-password <pwd> Imported database password").append(LS)
63 .append(" -idb --import-database <db_url> Imported database JDBC URL").append(LS)
64 .append(" -ny --nb-years <nb_years> Number of years to import (for --import-data)").append(LS)
65 ;
66
67 System.out.println(sb.toString());
68 }
69 }