Class ToolUtils
java.lang.Object
org.infinispan.tools.ToolUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindFirstChildByPath(Node parent, String fullPath) Similar tofindFirstChildByTagName(Node, String)but it uses afullPathto search the first child that matches it.findFirstChildByTagName(Node parent, String tagName) Given a parentNode, it search all the children and returns the first one to match thetagName.static StringgetBaseFileName(String absoluteFileName) static List<Dependency> parseXMLDependencies(Document document) Parses the "licenses.xml" files generated by the Wildfly licenses-plugin (maven projects) or license-reporter (nodejs projects).static voidprintDocument(Document doc, OutputStream out) static voidremoveEmptyLinesFromFile(File file) Trims all the empty lines from a file.static StringtextFromNode(Node node)
-
Field Details
-
EMPTY
- See Also:
-
-
Constructor Details
-
ToolUtils
public ToolUtils()
-
-
Method Details
-
getBaseFileName
-
printDocument
- Throws:
TransformerException
-
findFirstChildByTagName
Given a parentNode, it search all the children and returns the first one to match thetagName. -
findFirstChildByPath
Similar tofindFirstChildByTagName(Node, String)but it uses afullPathto search the first child that matches it. -
parseXMLDependencies
Parses the "licenses.xml" files generated by the Wildfly licenses-plugin (maven projects) or license-reporter (nodejs projects).- Parameters:
document- TheDocumentto parse.- Returns:
- A
Listwith all theDependencyfound.
-
removeEmptyLinesFromFile
Trims all the empty lines from a file.- Parameters:
file- TheFileto trim.- Throws:
IOException- If an i/o error occurs.
-
textFromNode
-