Class BuildHMCXml

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
de.hybris.ant.taskdefs.compiling.BuildHMCXml
All Implemented Interfaces:
Cloneable

public class BuildHMCXml extends org.apache.tools.ant.Task
Build a list with all hmc.xml files
  • 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
    protected void
    Build the global hmc.xml which can be validate.
    void
     
    protected String
    read from file and put file content into a string
    protected void
    search for the main hmc.xml, store the link and search for all extensions hmc.xml and store them
    void
     
    protected void
    set a xml header and the root node to a hmc.xml file, not uses at the moment
    protected void
    writeToFile(File file, String string)
    write String to file

    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

    • BuildHMCXml

      public BuildHMCXml()
  • Method Details

    • setFileName

      public void setFileName(String s)
    • 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
    • searchForHMCXmls

      protected void searchForHMCXmls()
      search for the main hmc.xml, store the link and search for all extensions hmc.xml and store them
    • setHeaderAndRootNode

      protected void setHeaderAndRootNode(File file) throws IOException
      set a xml header and the root node to a hmc.xml file, not uses at the moment
      Parameters:
      file - the file without header ands root node
      Throws:
      IOException - throws by IO Error
      FileNotFoundException - throws if file is not found
    • buildMainHMC

      protected void buildMainHMC() throws IOException
      Build the global hmc.xml which can be validate. Therefore all extension hmc.xml are appended to the main hmc.xml file
      Throws:
      FileNotFoundException - if one of the hmc.xml file is not found
      IOException - throws by IO Error
    • readFromFile

      protected String readFromFile(File file) throws IOException
      read from file and put file content into a string
      Parameters:
      file - the file to read
      Returns:
      the file content
      Throws:
      IOException - by IO Error
      FileNotFoundException - throws if file not found
    • writeToFile

      protected void writeToFile(File file, String string) throws IOException
      write String to file
      Parameters:
      file - the file
      string - the string
      Throws:
      IOException - IO Error