View Javadoc
1   package fr.ifremer.quadrige3.batch.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 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>").append("\n")
43  				.append("with <commands>:").append("\n")
44  				.append(" -h --help                                  Display help").append("\n")
45  				.append("    --schema-update                         Run database schema update").append("\n")
46  				.append("    --schema-status    --output <file>      Generate a database status report (pending schema changes)").append("\n")
47  				.append("    --schema-diff      --output <file>      Generate a database schema diff report (compare database to quadrige3 data model)").append("\n")
48                  .append("    --import-shapes                         Import shapes files with default input/output directories").append("\n")
49                  .append("    --import-shapes    <input> <output>     Import shapes files with specified input/output directories").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  }