Google

StarTeamTask (Apache Ant API)

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


java.lang.Object

  |

  +--org.apache.tools.ant.ProjectComponent

        |

        +--org.apache.tools.ant.Task

              |

              +--org.apache.tools.ant.taskdefs.optional.starteam.StarTeamTask

Direct Known Subclasses:
StarTeamLabel, TreeBasedTask

public abstract class StarTeamTask
extends Task

Common super class for all StarTeam tasks. At this level of the hierarchy we are concerned only with obtaining a connection to the StarTeam server. The subclass TreeBasedTask, also abstract defines the tree-walking behavior common to many subtasks.

Version:
1.1
Author:
Jason Yip
, Steve Cohen
See Also:
TreeBasedTask

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
StarTeamTask()
           
 
Method Summary
protected abstract  com.starbase.starteam.View createSnapshotView(com.starbase.starteam.View rawview)
          Derived classes must override createSnapshotView defining the kind of configured view appropriate to its task.
 java.lang.String getPassword()
          returns the password used for login
 java.lang.String getProjectname()
          returns the name of the StarTeam project to be acted on
protected  com.starbase.starteam.Server getServer()
          returns a reference to the server which may be used for informational purposes by subclasses.
 java.lang.String getServername()
          returns the name of the StarTeamServer
 java.lang.String getServerport()
          returns the port number of the StarTeam connection
 java.lang.String getURL()
          a convenience method which returns the whole StarTeam connection information as a single URL string of
 java.lang.String getUserName()
          returns the name of the StarTeam user
protected  java.lang.String getUserName(int userID)
          Returns the name of the user with the supplied ID or a blank string if user not found.
 java.lang.String getViewname()
          returns the name of the StarTeam view to be acted on
protected  com.starbase.starteam.View openView()
          All subclasses will call on this method to open the view needed for processing.
 void setPassword(java.lang.String password)
          set the password to be used for login; required.
 void setProjectname(java.lang.String projectname)
          set the name of the StarTeam project to be acted on; required if URL is not set.
 void setServername(java.lang.String servername)
          Set the name of StarTeamServer; required if URL is not set.
 void setServerport(java.lang.String serverport)
          set the port number of the StarTeam connection; required if URL is not set.
 void setURL(java.lang.String url)
          Set the server name, server port, project name and project folder in one shot; optional, but the server connection must be specified somehow.
 void setUserName(java.lang.String userName)
          set the name of the StarTeam user, needed for the connection
 void setViewname(java.lang.String viewname)
          set the name of the StarTeam view to be acted on; required if URL is not set.
 
Methods inherited from class org.apache.tools.ant.Task
execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, 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

StarTeamTask


public StarTeamTask()
Method Detail

setServername


public void setServername(java.lang.String servername)
Set the name of StarTeamServer; required if URL is not set.

Parameters:
servername - a String value
See Also:
setURL(String)

getServername


public java.lang.String getServername()
returns the name of the StarTeamServer

Returns:
the name of the StarTeam server
See Also:
getURL()

setServerport


public void setServerport(java.lang.String serverport)
set the port number of the StarTeam connection; required if URL is not set.

Parameters:
serverport - port number to be set
See Also:
setURL(String)

getServerport


public java.lang.String getServerport()
returns the port number of the StarTeam connection

Returns:
the port number of the StarTeam connection
See Also:
getURL()

setProjectname


public void setProjectname(java.lang.String projectname)
set the name of the StarTeam project to be acted on; required if URL is not set.

Parameters:
projectname - the name of the StarTeam project to be acted on
See Also:
setURL(String)

getProjectname


public java.lang.String getProjectname()
returns the name of the StarTeam project to be acted on

Returns:
the name of the StarTeam project to be acted on
See Also:
getURL()

setViewname


public void setViewname(java.lang.String viewname)
set the name of the StarTeam view to be acted on; required if URL is not set.

See Also:
setURL(String)

getViewname


public java.lang.String getViewname()
returns the name of the StarTeam view to be acted on

Returns:
the name of the StarTeam view to be acted on
See Also:
getURL()

setURL


public void setURL(java.lang.String url)
Set the server name, server port, project name and project folder in one shot; optional, but the server connection must be specified somehow.

Parameters:
url - a String of the form "servername:portnum/project/view"
See Also:
setServername(String), setServerport(String), setProjectname(String), setViewname(String)

getURL


public java.lang.String getURL()
a convenience method which returns the whole StarTeam connection information as a single URL string of

Returns:
a String of the form "servername:portnum/project/view"
See Also:
getServername(), getServerport(), getProjectname(), getViewname()

setUserName


public void setUserName(java.lang.String userName)
set the name of the StarTeam user, needed for the connection

Parameters:
userName - name of the user to be logged in

getUserName


public java.lang.String getUserName()
returns the name of the StarTeam user

Returns:
the name of the StarTeam user

setPassword


public void setPassword(java.lang.String password)
set the password to be used for login; required.

Parameters:
password - the password to be used for login

getPassword


public java.lang.String getPassword()
returns the password used for login

Returns:
the password used for login

getServer


protected com.starbase.starteam.Server getServer()
returns a reference to the server which may be used for informational purposes by subclasses.

Returns:
a reference to the server

createSnapshotView


protected abstract com.starbase.starteam.View createSnapshotView(com.starbase.starteam.View rawview)
Derived classes must override createSnapshotView defining the kind of configured view appropriate to its task.

Parameters:
rawview - the unconfigured View
Returns:
the snapshot View appropriately configured.

openView


protected com.starbase.starteam.View openView()
                                       throws BuildException
All subclasses will call on this method to open the view needed for processing. This method also saves a reference to the Server that may be accessed for information at various points in the process.

Returns:
the View that will be used for processing.
BuildException
See Also:
createSnapshotView(View), getServer()

getUserName


protected java.lang.String getUserName(int userID)
Returns the name of the user with the supplied ID or a blank string if user not found.

Parameters:
userID - a user's ID
Returns:
the name of the user with ID userID


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