## org.apache.tools.ant.taskdefs.optional.vss
Class MSVSSGET

    java.lang.Object
      |
      +--org.apache.tools.ant.ProjectComponent
            |
            +--org.apache.tools.ant.Task
                  |
                  +--org.apache.tools.ant.taskdefs.optional.vss.MSVSS
                        |
                        +--org.apache.tools.ant.taskdefs.optional.vss.MSVSSGET

public class MSVSSGET
extends MSVSS

Perform Get commands to Microsoft Visual SourceSafe.

The following attributes are interpreted:

Attribute | Values | Required
--- | --- | ---
login | username,password | No
vsspath | SourceSafe path | Yes
localpath | Override the working directory and get to the specified path | No
writable | true or false | No
recursive | true or false | No
version | a version number to get | No
date | a date stamp to get at | No
label | a label to get for | No
quiet | suppress output (off by default) | No
autoresponse | What to respond with (sets the -I option). By default, -I- is used; values of Y or N will be appended to this. | No

Note that only one of version, date or label should be specified

Author:
  Craig Cottingham, Andrew Everitt

Field Summary

Fields inherited from class org.apache.tools.ant.taskdefs.optional.vss.MSVSS
`COMMAND_ADD, COMMAND_CHECKIN, COMMAND_CHECKOUT, COMMAND_CP, COMMAND_CREATE, COMMAND_GET, COMMAND_HISTORY, COMMAND_LABEL, FLAG_AUTORESPONSE_DEF, FLAG_AUTORESPONSE_NO, FLAG_AUTORESPONSE_YES, FLAG_LOGIN, FLAG_OVERRIDE_WORKING_DIR, FLAG_QUIET, FLAG_RECURSION, FLAG_VERSION, FLAG_VERSION_DATE, FLAG_VERSION_LABEL, FLAG_WRITABLE, PROJECT_PREFIX, VALUE_NO, VALUE_YES`

Fields inherited from class org.apache.tools.ant.Task
`description, location, target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`project`

Constructor Summary
`MSVSSGET()`

Method Summary
`void` `execute()` Executes the task.
`void` `getAutoresponse(Commandline cmd)` Checks the value set for the autoResponse.
`void` `getLocalpathCommand(Commandline cmd)` Builds and returns the -GL flag command if required.
`void` `getQuietCommand(Commandline cmd)`
`void` `getRecursiveCommand(Commandline cmd)`
`void` `getVersionCommand(Commandline cmd)` Simple order of priority.
`void` `getWritableCommand(Commandline cmd)`
`void` `setAutoresponse(java.lang.String response)` What to respond with (sets the -I option).
`void` `setDate(java.lang.String date)` Set the date to get; optional, only one of `version`, `label`, or `date` allowed.
`void` `setLabel(java.lang.String label)` Set the label to get; optional, only one of `version`, `label`, or `date` allowed.
`void` `setLocalpath(Path localPath)` Override the working directory and get to the specified path; optional.
`void` `setQuiet(boolean quiet)` Flag to suppress output when true ; false by default.
`void` `setRecursive(boolean recursive)` Flag to tell the task to recurse down the tree; optional, default false.
`void` `setVersion(java.lang.String version)` Set a version number to get; optional, only one of `version`, `label`, or `date` allowed.
`void` `setWritable(boolean argWritable)` make fetched files writable; optional, default false.

Methods inherited from class org.apache.tools.ant.taskdefs.optional.vss.MSVSS
`getLoginCommand, getSSCommand, getVsspath, run, setLogin, setServerpath, setSsdir, setVsspath`

Methods inherited from class org.apache.tools.ant.Task
`getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`getProject, setProject`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MSVSSGET

    public MSVSSGET()

Method Detail

### execute

    public void execute()
                 throws BuildException

  Executes the task.

  Builds a command line to execute ss and then calls Exec's run method to execute the command line.

  Overrides:
    `execute` in class `Task`
  Throws:
    `BuildException` - if something goes wrong with the build

### setLocalpath

    public void setLocalpath(Path localPath)

  Override the working directory and get to the specified path; optional.

### getLocalpathCommand

    public void getLocalpathCommand(Commandline cmd)

  Builds and returns the -GL flag command if required.

  The localpath is created if it didn't exist

### setRecursive

    public void setRecursive(boolean recursive)

  Flag to tell the task to recurse down the tree; optional, default false.

### getRecursiveCommand

    public void getRecursiveCommand(Commandline cmd)

  Returns:
    the 'recursive' command if the attribute was 'true', otherwise an empty string

### setQuiet

    public final void setQuiet(boolean quiet)

  Flag to suppress output when true ; false by default.

### getQuietCommand

    public void getQuietCommand(Commandline cmd)

### setWritable

    public final void setWritable(boolean argWritable)

  make fetched files writable; optional, default false.

### getWritableCommand

    public void getWritableCommand(Commandline cmd)

  Returns:
    the 'make writable' command if the attribute was 'true', otherwise an empty string

### setVersion

    public void setVersion(java.lang.String version)

  Set a version number to get; optional, only one of `version`, `label`, or `date` allowed.

  ORIGINAL COMMENT THAT DOES NOT SEEM AT ALL VALID: Note we assume that if the supplied string has the value "null" that something went wrong and that the string value got populated from a null object. This happens if a ant variable is used e.g. version="${ver_server}" when ver_server has not been defined to ant! NO, in this case the version string is "${ver_server}".

  To do:
    fix this

### setDate

    public void setDate(java.lang.String date)

  Set the date to get; optional, only one of `version`, `label`, or `date` allowed.

  ORIGINAL COMMENT THAT DOES NOT SEEM AT ALL VALID: Note we assume that if the supplied string has the value "null" that something went wrong and that the string value got populated from a null object. This happens if a ant variable is used e.g. date="${date}" when date has not been defined to ant!

  To do:
    fix this

### setLabel

    public void setLabel(java.lang.String label)

  Set the label to get; optional, only one of `version`, `label`, or `date` allowed.

  Note we assume that if the supplied string has the value "null" that something went wrong and that the string value got populated from a null object. This happens if a ant variable is used e.g. label="${label_server}" when label_server has not been defined to ant!

### getVersionCommand

    public void getVersionCommand(Commandline cmd)

  Simple order of priority. Returns the first specified of version, date, label. If none of these was specified returns ""

### setAutoresponse

    public void setAutoresponse(java.lang.String response)

  What to respond with (sets the -I option). By default, -I- is used; values of Y or N will be appended to this.

### getAutoresponse

    public void getAutoresponse(Commandline cmd)

  Checks the value set for the autoResponse. if it equals "Y" then we return -I-Y if it equals "N" then we return -I-N otherwise we return -I

Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.