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:
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, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidBuild the global hmc.xml which can be validate.voidexecute()protected StringreadFromFile(File file) read from file and put file content into a stringprotected voidsearch for the main hmc.xml, store the link and search for all extensions hmc.xml and store themvoidprotected voidsetHeaderAndRootNode(File file) set a xml header and the root node to a hmc.xml file, not uses at the momentprotected voidwriteToFile(File file, String string) write String to fileMethods 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, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Constructor Details
-
BuildHMCXml
public BuildHMCXml()
-
-
Method Details
-
setFileName
-
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
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 ErrorFileNotFoundException- throws if file is not found
-
buildMainHMC
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 foundIOException- throws by IO Error
-
readFromFile
read from file and put file content into a string- Parameters:
file- the file to read- Returns:
- the file content
- Throws:
IOException- by IO ErrorFileNotFoundException- throws if file not found
-
writeToFile
write String to file- Parameters:
file- the filestring- the string- Throws:
IOException- IO Error
-