java.lang.Object
waffle.util.WaffleInfo
A Utility class to read system info to help troubleshoot WAFFLE system configuration.
This utility class collects system information and returns it as an XML document.From the command line, you can write the info to stdout using:
java -cp "jna.jar;waffle-core.jar;waffle-api.jar;jna-platform.jar;guava-21.0.jar" waffle.util.WaffleInfo
To show this information in a browser, run:
java -cp "..." waffle.util.WaffleInfo -show
To lookup account names and return any listed info, run:
java -cp "..." waffle.util.WaffleInfo -lookup AccountName
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAccountInfo(Document doc, Element node, IWindowsAccount account) Adds the account info.protected ElementGets the auth provider info.static ElementgetException(Document doc, Exception t) Gets the exception.getLookupInfo(Document doc, String lookup) Gets the lookup info.Get a Document with basic system information.static voidPrint system information.static StringtoPrettyXML(Document doc) To pretty xml.
-
Constructor Details
-
WaffleInfo
public WaffleInfo()
-
-
Method Details
-
getWaffleInfo
Get a Document with basic system information.This uses the builtin jakarta.xml package even though the API is quite verbose
- Returns:
- Document with waffle info.
- Throws:
ParserConfigurationException- when getting new document builder.
-
getAuthProviderInfo
-
addAccountInfo
Adds the account info.- Parameters:
doc- the docnode- the nodeaccount- the account
-
getLookupInfo
-
getException
-
toPrettyXML
To pretty xml.- Parameters:
doc- the doc- Returns:
- the string
- Throws:
TransformerException- the transformer exception
-
main
Print system information.- Parameters:
args- variable arguments to pass to main. Valid values are "-show" and "-lookup".
-