001/*
002 * Copyright 2013 Atteo.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.atteo.moonshine;
017
018import java.util.ArrayList;
019import java.util.List;
020
021import com.beust.jcommander.Parameter;
022
023public class MoonshineCommandLineParameters {
024    @Parameter(names = "--config", description = "Services configuration file(s)."
025            + " By default all config.xml files found in any directory from ${configHome}"
026            + " and ${configDirs} are merged.")
027    private final List<String> configurationFiles = new ArrayList<>();
028
029    @Parameter(names = "--no-defaults", description = "Do not read default configuration")
030    private boolean noDefaults;
031
032    @Parameter(names = "--print-config", description = "Print combined configuration to standard output")
033    private boolean printConfig;
034
035    @Parameter(names = "--print-filtered-config", description = "Print combined and filtered configuration"
036            + " to standard output")
037    private boolean printFilteredConfig;
038
039    @Parameter(names = "--print-guice-bindings", description = "Print all bindings registered in Guice")
040    private boolean printGuiceBindings;
041
042    @Parameter(names = { "-h", "--help" }, description = "Show help", help = true)
043    private boolean help;
044
045    public List<String> getConfigurationFiles() {
046        return configurationFiles;
047    }
048
049    public boolean isNoDefaults() {
050        return noDefaults;
051    }
052
053    public boolean isPrintConfig() {
054        return printConfig;
055    }
056
057    public boolean isPrintFilteredConfig() {
058        return printFilteredConfig;
059    }
060
061    public boolean isPrintGuiceBindings() {
062        return printGuiceBindings;
063    }
064
065    public boolean isHelp() {
066        return help;
067    }
068}