org.apache.maven.scm

## Class CommandParameters

- java.lang.Object
- - org.apache.maven.scm.CommandParameters

All Implemented Interfaces:
  Serializable

    public class CommandParameters
    extends Object
    implements Serializable

Version:
  $Id: CommandParameters.java 892494 2009-12-19 18:40:43Z olamy $
Author:
  Trygve Laugstøl
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`CommandParameters()`

### Method Summary

Methods
`boolean` `getBoolean(CommandParameter parameter)` Return the parameter value as boolean.
`Date` `getDate(CommandParameter parameter)` Return the parameter value as Date.
`Date` `getDate(CommandParameter parameter, Date defaultValue)` Return the parameter value as String or the default value if it doesn't exist.
`File[]` `getFileArray(CommandParameter parameter)`
`File[]` `getFileArray(CommandParameter parameter, File[] defaultValue)`
`int` `getInt(CommandParameter parameter)` Return the parameter value as int.
`int` `getInt(CommandParameter parameter, int defaultValue)` Return the parameter value as int or the default value if it doesn't exist.
`ScmBranchParameters` `getScmBranchParameters(CommandParameter parameter)`
`ScmTagParameters` `getScmTagParameters(CommandParameter parameter)`
`ScmVersion` `getScmVersion(CommandParameter parameter)` Return the parameter value as ScmVersion.
`ScmVersion` `getScmVersion(CommandParameter parameter, ScmVersion defaultValue)` Return the parameter value as ScmVersion or the default value.
`String` `getString(CommandParameter parameter)` Return the parameter value as String.
`String` `getString(CommandParameter parameter, String defaultValue)` Return the parameter value or the default value if it doesn't exist.
`void` `setDate(CommandParameter parameter, Date date)` Set a parameter value.
`void` `setInt(CommandParameter parameter, int value)` Set a parameter value.
`void` `setScmBranchParameters(CommandParameter parameter, ScmBranchParameters scmBranchParameters)`
`void` `setScmTagParameters(CommandParameter parameter, ScmTagParameters scmTagParameters)`
`void` `setScmVersion(CommandParameter parameter, ScmVersion scmVersion)` Set a parameter value.
`void` `setString(CommandParameter parameter, String value)` Set a parameter value.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CommandParameters

    public CommandParameters()

### Method Detail

#### getString

    public String getString(CommandParameter parameter)
                     throws ScmException

Return the parameter value as String.

Parameters:
  `parameter` - The parameter
Returns:
  The parameter value as a String
Throws:
  `ScmException` - if the parameter doesn't exist

#### getString

    public String getString(CommandParameter parameter,
                   String defaultValue)
                     throws ScmException

Return the parameter value or the default value if it doesn't exist.

Parameters:
  `parameter` - The parameter
  `defaultValue` - The default value
Returns:
  The parameter value as a String
Throws:
  `ScmException` - if the value is in the wrong type

#### setString

    public void setString(CommandParameter parameter,
                 String value)
                   throws ScmException

Set a parameter value.

Parameters:
  `parameter` - The parameter name
  `value` - The value of the parameter
Throws:
  `ScmException` - if the parameter already exist

#### getInt

    public int getInt(CommandParameter parameter)
               throws ScmException

Return the parameter value as int.

Parameters:
  `parameter` - The parameter
Returns:
  The parameter value as a String
Throws:
  `ScmException` - if the parameter doesn't exist

#### getInt

    public int getInt(CommandParameter parameter,
             int defaultValue)
               throws ScmException

Return the parameter value as int or the default value if it doesn't exist.

Parameters:
  `parameter` - The parameter
  `defaultValue` - The defaultValue
Returns:
  The parameter value as a int
Throws:
  `ScmException` - if the value is in the wrong type

#### setInt

    public void setInt(CommandParameter parameter,
              int value)
                throws ScmException

Set a parameter value.

Parameters:
  `parameter` - The parameter name
  `value` - The value of the parameter
Throws:
  `ScmException` - if the parameter already exist

#### getDate

    public Date getDate(CommandParameter parameter)
                 throws ScmException

Return the parameter value as Date.

Parameters:
  `parameter` - The parameter
Returns:
  The parameter value as a Date
Throws:
  `ScmException` - if the parameter doesn't exist

#### getDate

    public Date getDate(CommandParameter parameter,
               Date defaultValue)
                 throws ScmException

Return the parameter value as String or the default value if it doesn't exist.

Parameters:
  `parameter` - The parameter
  `defaultValue` - The defaultValue
Returns:
  The parameter value as a Date
Throws:
  `ScmException` - if the value is in the wrong type

#### setDate

    public void setDate(CommandParameter parameter,
               Date date)
                 throws ScmException

Set a parameter value.

Parameters:
  `parameter` - The parameter name
  `date` - The value of the parameter
Throws:
  `ScmException` - if the parameter already exist

#### getBoolean

    public boolean getBoolean(CommandParameter parameter)
                       throws ScmException

Return the parameter value as boolean.

Parameters:
  `parameter` - The parameter
Returns:
  The parameter value as a String
Throws:
  `ScmException` - if the parameter doesn't exist

#### getScmVersion

    public ScmVersion getScmVersion(CommandParameter parameter)
                             throws ScmException

Return the parameter value as ScmVersion.

Parameters:
  `parameter` - The parameter
Returns:
  The parameter value as a ScmVersion
Throws:
  `ScmException` - if the parameter doesn't exist

#### getScmVersion

    public ScmVersion getScmVersion(CommandParameter parameter,
                           ScmVersion defaultValue)
                             throws ScmException

Return the parameter value as ScmVersion or the default value.

Parameters:
  `parameter` - The parameter
  `defaultValue` - The default value
Returns:
  The parameter value as a ScmVersion
Throws:
  `ScmException` - if the parameter doesn't exist

#### setScmVersion

    public void setScmVersion(CommandParameter parameter,
                     ScmVersion scmVersion)
                       throws ScmException

Set a parameter value.

Parameters:
  `parameter` - The parameter name
  `scmVersion` - The tbranch/tag/revision
Throws:
  `ScmException` - if the parameter already exist

#### getFileArray

    public File[] getFileArray(CommandParameter parameter)
                        throws ScmException

Parameters:
  `parameter` - not null
Returns:
  an array of files
Throws:
  `ScmException` - if any

#### getFileArray

    public File[] getFileArray(CommandParameter parameter,
                      File[] defaultValue)
                        throws ScmException

Parameters:
  `parameter` - not null
  `defaultValue` - could be null
Returns:
  an array of files
Throws:
  `ScmException` - if any

#### getScmTagParameters

    public ScmTagParameters getScmTagParameters(CommandParameter parameter)
                                         throws ScmException

Throws:
  `ScmException`

#### setScmTagParameters

    public void setScmTagParameters(CommandParameter parameter,
                           ScmTagParameters scmTagParameters)
                             throws ScmException

Throws:
  `ScmException`

#### setScmBranchParameters

    public void setScmBranchParameters(CommandParameter parameter,
                              ScmBranchParameters scmBranchParameters)
                                throws ScmException

Throws:
  `ScmException`

#### getScmBranchParameters

    public ScmBranchParameters getScmBranchParameters(CommandParameter parameter)
                                               throws ScmException

Throws:
  `ScmException`