001package org.apache.maven.scm; 002 003import java.io.Serializable; 004 005/* 006 * Licensed to the Apache Software Foundation (ASF) under one 007 * or more contributor license agreements. See the NOTICE file 008 * distributed with this work for additional information 009 * regarding copyright ownership. The ASF licenses this file 010 * to you under the Apache License, Version 2.0 (the 011 * "License"); you may not use this file except in compliance 012 * with the License. You may obtain a copy of the License at 013 * 014 * http://www.apache.org/licenses/LICENSE-2.0 015 * 016 * Unless required by applicable law or agreed to in writing, 017 * software distributed under the License is distributed on an 018 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 019 * KIND, either express or implied. See the License for the 020 * specific language governing permissions and limitations 021 * under the License. 022 */ 023 024/** 025 * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstø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 MESSAGE = new CommandParameter( "message" ); 038 039 public static final CommandParameter BRANCH_NAME = new CommandParameter( "branchName" ); 040 041 public static final CommandParameter START_DATE = new CommandParameter( "startDate" ); 042 043 public static final CommandParameter END_DATE = new CommandParameter( "endDate" ); 044 045 public static final CommandParameter NUM_DAYS = new CommandParameter( "numDays" ); 046 047 public static final CommandParameter LIMIT = new CommandParameter( "limit" ); 048 049 public static final CommandParameter BRANCH = new CommandParameter( "branch" ); 050 051 public static final CommandParameter START_SCM_VERSION = new CommandParameter( "startScmVersion" ); 052 053 public static final CommandParameter END_SCM_VERSION = new CommandParameter( "endScmVersion" ); 054 055 public static final CommandParameter CHANGELOG_DATE_PATTERN = new CommandParameter( "changelogDatePattern" ); 056 057 public static final CommandParameter SCM_VERSION = new CommandParameter( "scmVersion" ); 058 059 public static final CommandParameter TAG_NAME = new CommandParameter( "tagName" ); 060 061 public static final CommandParameter FILE = new CommandParameter( "file" ); 062 063 public static final CommandParameter FILES = new CommandParameter( "files" ); 064 065 public static final CommandParameter OUTPUT_FILE = new CommandParameter( "outputFile" ); 066 067 public static final CommandParameter OUTPUT_DIRECTORY = new CommandParameter( "outputDirectory" ); 068 069 public static final CommandParameter RUN_CHANGELOG_WITH_UPDATE = 070 new CommandParameter( "run_changelog_with_update" ); 071 072 public static final CommandParameter SCM_TAG_PARAMETERS = new CommandParameter( "ScmTagParameters" ); 073 074 public static final CommandParameter SCM_BRANCH_PARAMETERS = new CommandParameter( "ScmBranchParameters" ); 075 076 public static final CommandParameter SCM_MKDIR_CREATE_IN_LOCAL = new CommandParameter( "createInLocal" ); 077 078 /** 079 * Parameter used only for Git SCM and simulate the <code>git rev-parse --short=lenght</code> command. 080 * 081 * @since 1.7 082 */ 083 public static final CommandParameter SCM_SHORT_REVISION_LENGTH = new CommandParameter( "shortRevisionLength" ); 084 085 /** 086 * Parameter to force add 087 * 088 * @since 1.7 089 */ 090 public static final CommandParameter FORCE_ADD = new CommandParameter( "forceAdd" ); 091 092 /** 093 * contains true or false 094 * @since 1.8 095 */ 096 public static final CommandParameter IGNORE_WHITESPACE = new CommandParameter( "ignoreWhitespace" ); 097 098 099 /** 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}