org.hackystat.sensor.ant.issue
Class IssueSensor

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.hackystat.sensor.ant.issue.IssueSensor
All Implemented Interfaces:
java.lang.Cloneable

public class IssueSensor
extends org.apache.tools.ant.Task

Ant task to retieve the issue changes and send those information to Hackystat server.

Author:
Shaoxuan Zhang

Field Summary
static java.text.DateFormat googleDateFormat
          DateFormat for google csv table.
static java.lang.String ISSUE_SENSOR_DATA_TYPE
          SensorDataType of Issue data.
(package private)  java.util.Map<java.lang.String,IssueEntry> issues
           
(package private)  org.hackystat.sensorshell.usermap.SensorShellMap shellMap
           
(package private)  java.util.List<IssueEntry> updatedIssues
           
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
IssueSensor()
          Prepare sensor shell map for this sensor.
 
Method Summary
 void execute()
          Extracts issue information from feeds, and sends them to the Hackystat server.
 java.lang.String getAllCsvUrl()
           
 java.lang.String getOpenCsvUrl()
           
protected  void processGoogleIssueCsvData(java.util.List<java.lang.String[]> issueTableContents)
          Process the issues information from csv table contents.
 void setDataOwnerHackystatAccount(java.lang.String dataOwner)
           
 void setDataOwnerHackystatPassword(java.lang.String password)
           
 void setDefaultHackystatSensorbase(java.lang.String defaultHackystatSensorbase)
          Sets the default Hackystat sensorbase server.
 void setProjectName(java.lang.String projectName)
           
 void setVerbose(boolean isVerbose)
          Sets if verbose mode has been enabled.
protected  void validateProperties()
          Checks and make sure all properties are set up correctly.
 
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, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

googleDateFormat

public static final java.text.DateFormat googleDateFormat
DateFormat for google csv table.


ISSUE_SENSOR_DATA_TYPE

public static final java.lang.String ISSUE_SENSOR_DATA_TYPE
SensorDataType of Issue data.

See Also:
Constant Field Values

updatedIssues

java.util.List<IssueEntry> updatedIssues

issues

java.util.Map<java.lang.String,IssueEntry> issues

shellMap

org.hackystat.sensorshell.usermap.SensorShellMap shellMap
Constructor Detail

IssueSensor

public IssueSensor()
            throws org.hackystat.sensorshell.usermap.SensorShellMapException
Prepare sensor shell map for this sensor.

Throws:
org.hackystat.sensorshell.usermap.SensorShellMapException - if error when loading sensor shell map
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Extracts issue information from feeds, and sends them to the Hackystat server.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - If the task fails.

processGoogleIssueCsvData

protected void processGoogleIssueCsvData(java.util.List<java.lang.String[]> issueTableContents)
Process the issues information from csv table contents.

Parameters:
issueTableContents - the parsed table content, in forms of List of String[].

validateProperties

protected void validateProperties()
                           throws org.apache.tools.ant.BuildException
Checks and make sure all properties are set up correctly.

Throws:
org.apache.tools.ant.BuildException - If any error is detected in the property setting.

getAllCsvUrl

public java.lang.String getAllCsvUrl()
Returns:
the csvUrl

getOpenCsvUrl

public java.lang.String getOpenCsvUrl()
Returns:
the csvUrl

setVerbose

public void setVerbose(boolean isVerbose)
Sets if verbose mode has been enabled.

Parameters:
isVerbose - true if verbose mode is enabled, false if not.

setDefaultHackystatSensorbase

public void setDefaultHackystatSensorbase(java.lang.String defaultHackystatSensorbase)
Sets the default Hackystat sensorbase server.

Parameters:
defaultHackystatSensorbase - the default sensorbase server.

setProjectName

public void setProjectName(java.lang.String projectName)
Parameters:
projectName - the projectName to set

setDataOwnerHackystatAccount

public void setDataOwnerHackystatAccount(java.lang.String dataOwner)
Parameters:
dataOwner - the dataOwner account to set

setDataOwnerHackystatPassword

public void setDataOwnerHackystatPassword(java.lang.String password)
Parameters:
password - the password to set