View Javadoc
1   package net.sumaris.core.action;
2   
3   /*-
4    * #%L
5    * Quadrige3 Core :: Quadrige3 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 General Public License as
13   * published by the Free Software Foundation, either version 3 of the
14   * License, or (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 General Public
22   * License along with this program.  If not, see
23   * <http://www.gnu.org/licenses/gpl-3.0.html>.
24   * #L%
25   */
26  
27  /**
28   * <p>
29   * HelpAction class.
30   * </p>
31   * 
32   */
33  public class HelpAction {
34  
35  	/**
36  	 * <p>
37  	 * show.
38  	 * </p>
39  	 */
40  	public void show() {
41  		StringBuilder sb = new StringBuilder();
42  
43  		sb.append("Usage:  <commands> <options>").append("\n")
44  				.append("with <commands>:").append("\n")
45  				.append(" -h --help                                  Display help").append("\n")
46  				.append("    --schema-create    --output <db_dir>    Create a new database schema").append("\n")
47  				.append("    --schema-update                         Update database schema").append("\n")
48  				.append("    --schema-changelog --output <file>      Generate a database changelog report (pending schema changes)").append("\n")
49  				//.append("    --schema-diff      --output <file>      Generate a database schema diff report (compare database and model)").append("\n")
50  				.append("\n")
51  				.append("with <options>:").append("\n")
52  				.append(" -u --user <user>		           Database user").append("\n")
53  				.append(" -p --password <pwd> 		       Database password").append("\n")
54  				.append(" -db --database <db_url> 	       Database JDBC URL ()").append("\n")
55  				.append(" -f                               Force the output directory overwrite, if exists").append("\n")
56  				.append("\n");
57  
58  		System.out.println(sb.toString());
59  	}
60  }