org.apache.tools.ant.taskdefs.optional.vss
Class MSVSSLABEL

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

public class MSVSSLABEL
extends MSVSS

Task to perform LABEL commands to Microsoft Visual Source Safe.

The following attributes are interpreted:
Attribute Values Required
login username,password No
vsspath SourceSafe path Yes
ssdir directory where ss.exe resides. By default the task expects it to be in the PATH. No
label A label to apply to the hierarchy Yes
version An existing file or project version to label No

Author:
Phillip Wells

Field Summary
static java.lang.String FLAG_LABEL
           
 
Fields inherited from class org.apache.tools.ant.taskdefs.optional.vss.MSVSS
COMMAND_CHECKOUT, COMMAND_GET, COMMAND_HISTORY, COMMAND_LABEL, FLAG_AUTORESPONSE_DEF, FLAG_AUTORESPONSE_NO, FLAG_AUTORESPONSE_YES, FLAG_LOGIN, FLAG_OVERRIDE_WORKING_DIR, 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, project, target, taskName, taskType, wrapper
 
Constructor Summary
MSVSSLABEL()
           
 
Method Summary
 void execute()
          Executes the task.
 java.lang.String getLabel()
          Gets the label to be applied.
 void getLabelCommand(Commandline cmd)
          Builds the label command.
 void getVersionCommand(Commandline cmd)
          Builds the version command.
 void setLabel(java.lang.String label)
          Set the label to apply in SourceSafe
 void setVersion(java.lang.String version)
          Set the stored version string
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.vss.MSVSS
getLoginCommand, getSSCommand, getVsspath, run, setLogin, setSsdir, setVsspath
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLAG_LABEL

public static final java.lang.String FLAG_LABEL
Constructor Detail

MSVSSLABEL

public MSVSSLABEL()
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
Following copied from class: org.apache.tools.ant.Task
Throws:
BuildException - if someting goes wrong with the build

setLabel

public void setLabel(java.lang.String label)
Set the label to apply in SourceSafe

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)
Builds the version command.
Parameters:
cmd - the commandline the command is to be added to

getLabelCommand

public void getLabelCommand(Commandline cmd)
Builds the label command.
Parameters:
cmd - the commandline the command is to be added to

setVersion

public void setVersion(java.lang.String version)
Set the stored version string

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!


getLabel

public java.lang.String getLabel()
Gets the label to be applied.
Returns:
the label to be applied.


Copyright ? 2000 Apache Software Foundation. All Rights Reserved.