Class ExcelAntHandlerTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.poi.ss.excelant.ExcelAntHandlerTask
All Implemented Interfaces:
Cloneable

public class ExcelAntHandlerTask extends org.apache.tools.ant.Task
This is the class that backs the <handler> tag in the Ant task.

Its purpose is to provide a way to manipulate a workbook in the course of an ExcelAnt task. The idea being to model a way for test writers to simulate the behaviors of the workbook.

Suppose, for example, you have a workbook that has a worksheet that reacts to values entered or selected by the user. It's possible in Excel to change other cells based on this but this isn't easily possible in POI. In ExcelAnt we handle this using the Handler, which is a Java class you write to manipulate the workbook.

In order to use this tag you must write a class that implements the IExcelAntWorkbookHandler interface. After writing the class you should package it and its dependencies into a jar file to add as library in your Ant build file.

  • Field Summary

    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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    protected void
     

    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
  • Constructor Details

    • ExcelAntHandlerTask

      public ExcelAntHandlerTask()
  • Method Details

    • setClassName

      public void setClassName(String cName)
    • setEAWorkbookUtil

      protected void setEAWorkbookUtil(ExcelAntWorkbookUtil wkbkUtil)
    • execute

      public void execute() throws org.apache.tools.ant.BuildException
      Overrides:
      execute in class org.apache.tools.ant.Task
      Throws:
      org.apache.tools.ant.BuildException