001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied.  See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019package org.apache.maven.scm;
020
021import java.io.Serializable;
022
023/**
024 * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
025 *
026 */
027public class CommandParameter implements Serializable {
028    private static final long serialVersionUID = -3391190831054016735L;
029
030    public static final CommandParameter BINARY = new CommandParameter("binary");
031
032    public static final CommandParameter RECURSIVE = new CommandParameter("recursive");
033
034    public static final CommandParameter SHALLOW = new CommandParameter("shallow");
035
036    public static final CommandParameter MESSAGE = new CommandParameter("message");
037
038    public static final CommandParameter BRANCH_NAME = new CommandParameter("branchName");
039
040    public static final CommandParameter START_DATE = new CommandParameter("startDate");
041
042    public static final CommandParameter END_DATE = new CommandParameter("endDate");
043
044    public static final CommandParameter NUM_DAYS = new CommandParameter("numDays");
045
046    public static final CommandParameter LIMIT = new CommandParameter("limit");
047
048    public static final CommandParameter BRANCH = new CommandParameter("branch");
049
050    public static final CommandParameter START_SCM_VERSION = new CommandParameter("startScmVersion");
051
052    public static final CommandParameter END_SCM_VERSION = new CommandParameter("endScmVersion");
053
054    public static final CommandParameter CHANGELOG_DATE_PATTERN = new CommandParameter("changelogDatePattern");
055
056    public static final CommandParameter SCM_VERSION = new CommandParameter("scmVersion");
057
058    public static final CommandParameter TAG_NAME = new CommandParameter("tagName");
059
060    public static final CommandParameter FILE = new CommandParameter("file");
061
062    public static final CommandParameter FILES = new CommandParameter("files");
063
064    public static final CommandParameter OUTPUT_FILE = new CommandParameter("outputFile");
065
066    public static final CommandParameter OUTPUT_DIRECTORY = new CommandParameter("outputDirectory");
067
068    public static final CommandParameter RUN_CHANGELOG_WITH_UPDATE = new CommandParameter("run_changelog_with_update");
069
070    public static final CommandParameter SCM_TAG_PARAMETERS = new CommandParameter("ScmTagParameters");
071
072    public static final CommandParameter SCM_BRANCH_PARAMETERS = new CommandParameter("ScmBranchParameters");
073
074    public static final CommandParameter SCM_MKDIR_CREATE_IN_LOCAL = new CommandParameter("createInLocal");
075
076    /**
077     * Parameter used only for Git SCM to truncate the emitted hash to the given character length, simulates <code>git rev-parse --short=length</code> command.
078     *
079     * @since 1.7
080     */
081    public static final CommandParameter SCM_SHORT_REVISION_LENGTH = new CommandParameter("shortRevisionLength");
082
083    /**
084     * Parameter to force add
085     *
086     * @since 1.7
087     */
088    public static final CommandParameter FORCE_ADD = new CommandParameter("forceAdd");
089
090    /**
091     * contains true or false
092     * @since 1.8
093     */
094    public static final CommandParameter IGNORE_WHITESPACE = new CommandParameter("ignoreWhitespace");
095
096    /**
097     * Parameter name
098     */
099    private String name;
100
101    /**
102     * @param name The parameter name
103     */
104    private CommandParameter(String name) {
105        this.name = name;
106    }
107
108    /**
109     * @return The parameter name
110     */
111    public String getName() {
112        return name;
113    }
114
115    public String toString() {
116        return name;
117    }
118}