Class 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 it's 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()  
      void setClassName​(String cName)  
      protected void setEAWorkbookUtil​(ExcelAntWorkbookUtil wkbkUtil)  
      • 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
    • Constructor Detail

      • ExcelAntHandlerTask

        public ExcelAntHandlerTask()
    • Method Detail

      • setClassName

        public void setClassName​(String cName)
      • 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