Class BuildHMCXml

  • All Implemented Interfaces:
    java.lang.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
      BuildHMCXml()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void buildMainHMC()
      Build the global hmc.xml which can be validate.
      void execute()  
      protected java.lang.String readFromFile​(java.io.File file)
      read from file and put file content into a string
      protected void searchForHMCXmls()
      search for the main hmc.xml, store the link and search for all extensions hmc.xml and store them
      void setFileName​(java.lang.String s)  
      protected void setHeaderAndRootNode​(java.io.File file)
      set a xml header and the root node to a hmc.xml file, not uses at the moment
      protected void writeToFile​(java.io.File file, java.lang.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 Detail

      • BuildHMCXml

        public BuildHMCXml()
    • Method Detail

      • setFileName

        public void setFileName​(java.lang.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​(java.io.File file)
                                     throws java.io.IOException,
                                            java.io.FileNotFoundException
        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:
        java.io.IOException - throws by IO Error
        java.io.FileNotFoundException - throws if file is not found
      • buildMainHMC

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

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

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