Package de.hybris.ant.taskdefs.compiling
Class BuildHMCXml
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- de.hybris.ant.taskdefs.compiling.BuildHMCXml
-
- All Implemented Interfaces:
java.lang.Cloneable
public class BuildHMCXml extends org.apache.tools.ant.TaskBuild a list with all hmc.xml files
-
-
Constructor Summary
Constructors Constructor Description BuildHMCXml()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuildMainHMC()Build the global hmc.xml which can be validate.voidexecute()protected java.lang.StringreadFromFile(java.io.File file)read from file and put file content into a stringprotected voidsearchForHMCXmls()search for the main hmc.xml, store the link and search for all extensions hmc.xml and store themvoidsetFileName(java.lang.String s)protected voidsetHeaderAndRootNode(java.io.File file)set a xml header and the root node to a hmc.xml file, not uses at the momentprotected voidwriteToFile(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
-
-
-
-
Method Detail
-
setFileName
public void setFileName(java.lang.String s)
-
execute
public void execute() throws org.apache.tools.ant.BuildException- Overrides:
executein classorg.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.FileNotFoundExceptionset 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 Errorjava.io.FileNotFoundException- throws if file is not found
-
buildMainHMC
protected void buildMainHMC() throws java.io.FileNotFoundException, java.io.IOExceptionBuild 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 foundjava.io.IOException- throws by IO Error
-
readFromFile
protected java.lang.String readFromFile(java.io.File file) throws java.io.IOException, java.io.FileNotFoundExceptionread 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 Errorjava.io.FileNotFoundException- throws if file not found
-
writeToFile
protected void writeToFile(java.io.File file, java.lang.String string) throws java.io.IOExceptionwrite String to file- Parameters:
file- the filestring- the string- Throws:
java.io.IOException- IO Error
-
-