All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.jett.event.TagEvent Maven / Gradle / Ivy

package net.sf.jett.event;

import java.util.Map;

import org.apache.poi.ss.usermodel.Sheet;

import net.sf.jett.model.Block;

/**
 * A TagEvent represents data associated with a "tag processed"
 * event.  It contains a reference to the Block of
 * Cells that was processed and the Map of bean names
 * to values used to process it.
 *
 * @author Randy Gettman
 * @since 0.3.0
 */
public class TagEvent
{
   private Sheet mySheet;
   private Block myBlock;
   private Map myBeans;

   /**
    * Constructs a TagEvent built using the given
    * TagContext.
    * @param sheet A Sheet.
    * @param block A Block.
    * @param beans A Map of bean names to values.
    */
   public TagEvent(Sheet sheet, Block block, Map beans)
   {
      mySheet = sheet;
      myBlock = block;
      myBeans = beans;
   }

   /**
    * Returns the Sheet on which the block of cells was processed.
    * @return The Sheet on which the block of cells was processed.
    */
   public Sheet getSheet()
   {
      return mySheet;
   }

   /**
    * Returns the Block of cells that was processed.
    * @return The Block of cells that was processed.
    */
   public Block getBlock()
   {
      return myBlock;
   }

   /**
    * Returns the Map of bean names to values used to process the
    * block of cells.
    * @return The Map of bean names to values.
    */
   public Map getBeans()
   {
      return myBeans;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy