View Javadoc
1   package org.apache.maven.scm;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   * http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.io.Serializable;
23  
24  /**
25   * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
26   *
27   */
28  public class CommandParameter
29      implements Serializable
30  {
31      private static final long serialVersionUID = -3391190831054016735L;
32  
33      public static final CommandParameter BINARY = new CommandParameter( "binary" );
34  
35      public static final CommandParameter RECURSIVE = new CommandParameter( "recursive" );
36  
37      public static final CommandParameter MESSAGE = new CommandParameter( "message" );
38  
39      public static final CommandParameter BRANCH_NAME = new CommandParameter( "branchName" );
40  
41      public static final CommandParameter START_DATE = new CommandParameter( "startDate" );
42  
43      public static final CommandParameter END_DATE = new CommandParameter( "endDate" );
44  
45      public static final CommandParameter NUM_DAYS = new CommandParameter( "numDays" );
46  
47      public static final CommandParameter LIMIT = new CommandParameter( "limit" );
48  
49      public static final CommandParameter BRANCH = new CommandParameter( "branch" );
50  
51      public static final CommandParameter START_SCM_VERSION = new CommandParameter( "startScmVersion" );
52  
53      public static final CommandParameter END_SCM_VERSION = new CommandParameter( "endScmVersion" );
54  
55      public static final CommandParameter CHANGELOG_DATE_PATTERN = new CommandParameter( "changelogDatePattern" );
56  
57      public static final CommandParameter SCM_VERSION = new CommandParameter( "scmVersion" );
58  
59      public static final CommandParameter TAG_NAME = new CommandParameter( "tagName" );
60  
61      public static final CommandParameter FILE = new CommandParameter( "file" );
62  
63      public static final CommandParameter FILES = new CommandParameter( "files" );
64  
65      public static final CommandParameter OUTPUT_FILE = new CommandParameter( "outputFile" );
66  
67      public static final CommandParameter OUTPUT_DIRECTORY = new CommandParameter( "outputDirectory" );
68  
69      public static final CommandParameter RUN_CHANGELOG_WITH_UPDATE =
70          new CommandParameter( "run_changelog_with_update" );
71  
72      public static final CommandParameter SCM_TAG_PARAMETERS = new CommandParameter( "ScmTagParameters" );
73  
74      public static final CommandParameter SCM_BRANCH_PARAMETERS = new CommandParameter( "ScmBranchParameters" );
75  
76      public static final CommandParameter SCM_MKDIR_CREATE_IN_LOCAL = new CommandParameter( "createInLocal" );
77  
78      /**
79       * Parameter used only for Git SCM and simulate the <code>git rev-parse --short=lenght</code> command.
80       *
81       * @since 1.7
82       */
83      public static final CommandParameter SCM_SHORT_REVISION_LENGTH = new CommandParameter( "shortRevisionLength" );
84  
85      /**
86       * Parameter to force add
87       *
88       * @since 1.7
89       */
90      public static final CommandParameter FORCE_ADD = new CommandParameter( "forceAdd" );
91  
92      /**
93       * contains true or false
94       * @since 1.8
95       */
96      public static final CommandParameter IGNORE_WHITESPACE = new CommandParameter( "ignoreWhitespace" );
97  
98  
99      /**
100      * Parameter name
101      */
102     private String name;
103 
104     /**
105      * @param name The parameter name
106      */
107     private CommandParameter( String name )
108     {
109         this.name = name;
110     }
111 
112     /**
113      * @return The parameter name
114      */
115     public String getName()
116     {
117         return name;
118     }
119 
120     public String toString()
121     {
122         return name;
123     }
124 }