View Javadoc
1   package fr.ifremer.quadrige2.core.action;
2   
3   /*-
4    * #%L
5    * Quadrige2 Core :: Quadrige2 Server Core
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2017 Ifremer
10   * %%
11   * This program is free software: you can redistribute it and/or modify
12   * it under the terms of the GNU Affero General Public License as published by
13   * the Free Software Foundation, either version 3 of the License, or
14   * (at your option) any later version.
15   * 
16   * This program is distributed in the hope that it will be useful,
17   * but WITHOUT ANY WARRANTY; without even the implied warranty of
18   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19   * GNU General Public License for more details.
20   * 
21   * You should have received a copy of the GNU Affero General Public License
22   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23   * #L%
24   */
25  
26  /**
27   * <p>
28   * HelpAction class.
29   * </p>
30   * 
31   */
32  public class HelpAction {
33  
34  	/**
35  	 * <p>
36  	 * show.
37  	 * </p>
38  	 */
39  	public void show() {
40  		StringBuilder sb = new StringBuilder();
41  
42  		sb.append("Usage:  <commands> <options>\n")
43  				.append("with <commands>:\n")
44  				.append(" -h --help                                  Display help\n")
45  				.append("    --schema-update                         Run database schema update\n")
46  				.append("    --schema-status    --output <file>      Generate a database status report (pending schema changes)\n")
47  				.append("    --schema-diff      --output <file>      Generate a database schema diff report (compare database to quadrige2 data model)\n")
48  				.append("    --schema-diff --output <file>      Generate a diff into a diff XML file (compare database to quadrige2 data model)\n")
49  				.append("\n")
50  				.append("with <options>:\n")
51  				.append(" -u --user <user>		           Database user\n")
52  				.append(" -p --password <pwd> 		       Database password\n")
53  				.append(" -db --database <db_url> 	       Database JDBC URL ()\n")
54  				.append(" -f                               Force the output directory overrite, if exists\n")
55  				.append("\n")
56  				.append(" -iu  --import-user <user>        Imported database user\n")
57  				.append(" -ip  --import-password <pwd>     Imported database password\n")
58  				.append(" -idb --import-database <db_url>  Imported database JDBC URL\n");
59  
60  		System.out.println(sb.toString());
61  	}
62  }