001package fr.ifremer.adagio.core.config; 002 003/* 004 * #%L 005 * SIH-Adagio :: Shared 006 * $Id:$ 007 * $HeadURL:$ 008 * %% 009 * Copyright (C) 2012 - 2014 Ifremer 010 * %% 011 * This program is free software: you can redistribute it and/or modify 012 * it under the terms of the GNU Affero General Public License as published by 013 * the Free Software Foundation, either version 3 of the License, or 014 * (at your option) any later version. 015 * 016 * This program is distributed in the hope that it will be useful, 017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 019 * GNU General Public License for more details. 020 * 021 * You should have received a copy of the GNU Affero General Public License 022 * along with this program. If not, see <http://www.gnu.org/licenses/>. 023 * #L% 024 */ 025 026import org.nuiton.config.ConfigActionDef; 027 028import fr.ifremer.adagio.core.action.AdagioCoreHelpAction; 029import fr.ifremer.adagio.core.action.DatabaseChangeLogAction; 030import fr.ifremer.adagio.core.action.DatabaseDiffAction; 031import fr.ifremer.adagio.core.action.DatabaseStatusAction; 032import fr.ifremer.adagio.core.action.DatabaseUpdateAction; 033 034/** 035 * @author Benoit Lavenier <benoit.lavenier@e-is.pro> 036 * @since 3.5.4 037 * 038 */ 039public enum AdagioCoreConfigurationAction implements ConfigActionDef { 040 041 HELP(AdagioCoreHelpAction.class.getName() + "#show", "-h", "--help"), 042 043 DB_UPDATE(DatabaseUpdateAction.class.getName() + "#run", "--schema-update"), 044 045 DB_STATUS(DatabaseStatusAction.class.getName() + "#run", "--schema-status"), 046 047 DB_DIFF(DatabaseDiffAction.class.getName() + "#run", "--schema-diff"), 048 049 DB_CHANGELOG(DatabaseChangeLogAction.class.getName() + "#run", "--schema-changelog"); 050 051 public String action; 052 public String[] aliases; 053 054 private AdagioCoreConfigurationAction(String action, String... aliases) { 055 this.action = action; 056 this.aliases = aliases; 057 } 058 059 @Override 060 public String getAction() { 061 return action; 062 } 063 064 @Override 065 public String[] getAliases() { 066 return aliases; 067 } 068}