View Javadoc
1   /*
2    * #%L
3    * JRst :: Api
4    * %%
5    * Copyright (C) 2011 - 2014 CodeLutin, Chatellier Eric
6    * %%
7    * This program is free software: you can redistribute it and/or modify
8    * it under the terms of the GNU Lesser General Public License as 
9    * published by the Free Software Foundation, either version 3 of the 
10   * License, or (at your option) any later version.
11   * 
12   * This program is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   * GNU General Lesser Public License for more details.
16   * 
17   * You should have received a copy of the GNU General Lesser Public 
18   * License along with this program.  If not, see
19   * <http://www.gnu.org/licenses/lgpl-3.0.html>.
20   * #L%
21   */
22  
23  package org.nuiton.jrst;
24  
25  import static org.nuiton.i18n.I18n.t;
26  import static org.nuiton.i18n.I18n.n;
27  
28  import org.nuiton.config.ConfigActionDef;
29  
30  /**
31   * JRST actions.
32   * 
33   * @author echatellier
34   */
35  public enum JRSTConfigAction implements ConfigActionDef {
36      HELP(n("JRST help"), JRSTConfig.class.getName() + "#help", "-h", "--help");
37  
38      public String description;
39      public String action;
40      public String[] aliases;
41  
42      private JRSTConfigAction(String description, String action, String... aliases) {
43          this.description = description;
44          this.action = action;
45          this.aliases = aliases;
46      }
47  
48      public String getDescription() {
49          return t(description);
50      }
51  
52      @Override
53      public String getAction() {
54          return action;
55      }
56  
57      @Override
58      public String[] getAliases() {
59          return aliases;
60      }
61  
62  }