001package fr.ifremer.adagio.synchro.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.synchro.action.SynchroHelpAction;
029import fr.ifremer.adagio.synchro.action.SynchroImportDataAction;
030import fr.ifremer.adagio.synchro.action.SynchroImportReferentialAction;
031import fr.ifremer.adagio.synchro.socket.SynchroHttpServer;
032
033public enum SynchroConfigurationAction implements ConfigActionDef {
034
035    HELP(SynchroHelpAction.class.getName() + "#show", "-h", "--help"),
036
037    DB_IMPORT_REF(SynchroImportReferentialAction.class.getName() + "#run", "--import-ref"),
038
039    SERVER_START(SynchroHttpServer.class.getName() + "#start", "--start-server")
040
041    /* DB_IMPORT_DATA(SynchroImportDataAction.class.getName() + "#run", "--import-data") */;
042
043    public String action;
044    public String[] aliases;
045
046    private SynchroConfigurationAction(String action, String... aliases) {
047        this.action = action;
048        this.aliases = aliases;
049    }
050
051    @Override
052    public String getAction() {
053        return action;
054    }
055
056    @Override
057    public String[] getAliases() {
058        return aliases;
059    }
060}