org.figure8.join.services.scripting.ant.tasks
Class LogStatusTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.figure8.join.services.scripting.ant.tasks.RemoteServiceTask
              extended by org.figure8.join.services.scripting.ant.tasks.LogStatusTask
Direct Known Subclasses:
ListenStatusTask

public class LogStatusTask
extends RemoteServiceTask

This an Ant task to use for logging a status to a specified process.
As an example, use a logstatus that way to ensure logging of build process status :
>logstatus process="build" ref="mybuild-r1.0-v01" statusKey="myStatus" url="http://mydomain.org:8080/join"/<

That logger will then connect to Join system denoted by url to update the status of build "mybuild-r1.0-v01" to status with identifier "myStatus".
The type attribute defines a specific type of process to update status. There are today 3 different types :

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux

Field Summary
 
Fields inherited from class org.figure8.join.services.scripting.ant.tasks.RemoteServiceTask
REMOTE_URL_SUBCONTEXT
 
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
LogStatusTask()
          Creates a new instance of LogStatusTask.
 
Method Summary
 void execute()
          Execute the logging of status.
 java.lang.String getProcess()
           
 java.lang.String getRef()
           
 java.lang.String getStatusKey()
           
protected  void logStatus()
          Log the status using remote service
 void setProcess(java.lang.String process)
           
 void setRef(java.lang.String ref)
           
 void setStatusKey(java.lang.String statusKey)
           
protected  void validateAttributes()
          Validate this task attributes before execution
 
Methods inherited from class org.figure8.join.services.scripting.ant.tasks.RemoteServiceTask
getPassword, getUrl, getUser, loginToRemoteService, releaseRemoteService, retrieveRemoteService, setPassword, setUrl, setUser
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
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

LogStatusTask

public LogStatusTask()
Creates a new instance of LogStatusTask.

Method Detail

getRef

public java.lang.String getRef()
Returns:
The reference of object to log status on

setRef

public void setRef(java.lang.String ref)
Parameters:
ref - The reference of object to log status on

getProcess

public java.lang.String getProcess()
Returns:
The process to set status for

setProcess

public void setProcess(java.lang.String process)
Parameters:
process - The process to set status for

getStatusKey

public java.lang.String getStatusKey()
Returns:
The key of status to log

setStatusKey

public void setStatusKey(java.lang.String statusKey)
Parameters:
statusKey - The key of status to log

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Execute the logging of status.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - if a mandatory attribute is not present

validateAttributes

protected void validateAttributes()
                           throws org.apache.tools.ant.BuildException
Validate this task attributes before execution

Throws:
org.apache.tools.ant.BuildException - if a mandatory attribute is not present

logStatus

protected void logStatus()
                  throws org.apache.tools.ant.BuildException
Log the status using remote service

Throws:
org.apache.tools.ant.BuildException - if


Copyright © 2005-2008 Join. All Rights Reserved.