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

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.apache.tools.ant.taskdefs.optional.starteam.StarTeamTask
                    |
                    +--org.apache.tools.ant.taskdefs.optional.starteam.StarTeamLabel

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"/>
 

Author:
Christopher Charlier, ThoughtWorks, Inc. 2001
, Jason Yip
See Also:
StarBase Web Site

Field Summary
 
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
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 setDescription(java.lang.String description)
          Optional 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.
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.starteam.StarTeamTask
getPassword, getProjectname, getServer, getServername, getServerport, getURL, getUserName, getUserName, getViewname, openView, setPassword, setProjectname, setServername, setServerport, setURL, setUserName, setViewname
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, 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

StarTeamLabel

public StarTeamLabel()
Method Detail

setLabel

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


setDescription

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

Overrides:
setDescription in class Task
Parameters:
description - Description of the current action. May be null, indicating that no description is available.

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

BuildException

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 - if something goes wrong with the build

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.


Copyright 2000-2002 Apache Software Foundation. All Rights Reserved.