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