org.apache.tools.ant.taskdefs.optional.starteam
Class StarTeamLabel

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.optional.starteam.StarTeamTask
              extended by org.apache.tools.ant.taskdefs.optional.starteam.StarTeamLabel
All Implemented Interfaces:
java.lang.Cloneable

public class StarTeamLabel
extends StarTeamTask

Creates a view label in StarTeam at the specified view. Ant Usage:

 <taskdef name="stlabel"
          classname="org.apache.tools.ant.taskdefs.optional.starteam.StarTeamLabel"/<
     <stlabel
 label="1.0" lastbuild="20011514100000" description="Successful Build"
 username="BuildMaster" password="ant"
 starteamurl="server:port/project/view"/>
 

See Also:
borland StarTeam Web Site

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
location, project
 
Constructor Summary
StarTeamLabel()
           
 
Method Summary
protected  com.starbase.starteam.View createSnapshotView(com.starbase.starteam.View raw)
          Override of base-class abstract function creates an appropriately configured view.
 void execute()
          This method does the work of creating the new view and checking it into Starteam.
 void setBuildLabel(boolean buildlabel)
          set the type of label based on the supplied value - if true, this label will be a revision label, if false, a build label.
 void setDescription(java.lang.String description)
          Description of the label to be stored in the StarTeam project.
 void setLabel(java.lang.String label)
          The name to be given to the label; required.
 void setLastBuild(java.lang.String lastbuild)
          The timestamp of the build that will be stored with the label; required.
 void setRevisionLabel(boolean revisionlabel)
          set the type of label based on the supplied value - if true, this label will be a revision label, if false, a build label.
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.starteam.StarTeamTask
disconnectFromServer, getPassword, getProjectname, getServer, getServername, getServerport, getTypeNames, getURL, getUserName, getUserName, getViewname, getViewURL, openView, setPassword, setProjectname, setServername, setServerport, setURL, setUserName, setViewname
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StarTeamLabel

public StarTeamLabel()
Method Detail

setLabel

public void setLabel(java.lang.String label)
The name to be given to the label; required.

Parameters:
label - the name to be used

setDescription

public void setDescription(java.lang.String description)
Description of the label to be stored in the StarTeam project.

Overrides:
setDescription in class ProjectComponent
Parameters:
description - the description to be used

setBuildLabel

public void setBuildLabel(boolean buildlabel)
set the type of label based on the supplied value - if true, this label will be a revision label, if false, a build label.

Parameters:
buildlabel - If true this will be a revision label; if false, a build label

setRevisionLabel

public void setRevisionLabel(boolean revisionlabel)
set the type of label based on the supplied value - if true, this label will be a revision label, if false, a build label.

Parameters:
revisionlabel - If true this will be a revision label; if false, a build label

setLastBuild

public void setLastBuild(java.lang.String lastbuild)
                  throws BuildException
The timestamp of the build that will be stored with the label; required. Must be formatted yyyyMMddHHmmss

Parameters:
lastbuild - the timestamp of the last build
Throws:
BuildException - on error

execute

public void execute()
             throws BuildException
This method does the work of creating the new view and checking it into Starteam.

Overrides:
execute in class Task
Throws:
BuildException - on error

createSnapshotView

protected com.starbase.starteam.View createSnapshotView(com.starbase.starteam.View raw)
Override of base-class abstract function creates an appropriately configured view. For labels this a view configured as of this.lastBuild.

Specified by:
createSnapshotView in class StarTeamTask
Parameters:
raw - the unconfigured View
Returns:
the snapshot View appropriately configured.