Top Description Fields Constructors Methods
waffle.util

public Class WaffleInfo

extends Object
Class Inheritance
Imports
com.sun.jna.Platform, com.sun.jna.platform.WindowUtils, com.sun.jna.platform.win32.LMJoin, .Netapi32Util, .Win32Exception, java.awt.Desktop, java.io.File, .IOException, .StringWriter, java.nio.charset.StandardCharsets, java.nio.file.Files, .StandardOpenOption, java.util.ArrayList, .Arrays, .List, javax.xml.XMLConstants, javax.xml.parsers.DocumentBuilderFactory, .ParserConfigurationException, javax.xml.transform.OutputKeys, .Transformer, .TransformerException, .TransformerFactory, javax.xml.transform.dom.DOMSource, javax.xml.transform.stream.StreamResult, org.slf4j.Logger, .LoggerFactory, org.w3c.dom.Document, .Element, waffle.windows.auth.IWindowsAccount, .IWindowsAuthProvider, .IWindowsComputer, .IWindowsDomain, waffle.windows.auth.impl.WindowsAccountImpl, .WindowsAuthProviderImpl

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

Field Summary

Modifier and TypeField and Description
private static final Logger
LOGGER

The Constant LOGGER.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
addAccountInfo(final Document
the doc
doc
,
final Element
the node
node
,
final IWindowsAccount
the account
account
)

Adds the account info.

protected Element

Returns:

the auth provider info
getAuthProviderInfo
(final Document
the doc
doc
)

Gets the auth provider info.

public static Element

Returns:

the exception
getException
(final Document
the doc
doc
,
final Exception
the t
t
)

Gets the exception.

public Element

Returns:

the lookup info
getLookupInfo
(final Document
the doc
doc
,
final String
the lookup
lookup
)

Gets the lookup info.

public Document

Returns:

Document with waffle info.
getWaffleInfo
()

Get a Document with basic system information.

public static void
main(final String[]
variable arguments to pass to main. Valid values are "-show" and "-lookup".
args
)

Print system information.

public static String

Returns:

the string
toPrettyXML
(final Document
the doc
doc
)

To pretty xml.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
private static final Logger LOGGER

The Constant LOGGER.

Constructor Detail

WaffleInfoback to summary
public WaffleInfo()

Method Detail

addAccountInfoback to summary
protected void addAccountInfo(final Document doc, final Element node, final IWindowsAccount account)

Adds the account info.

Parameters
doc:Document

the doc

node:Element

the node

account:IWindowsAccount

the account

getAuthProviderInfoback to summary
protected Element getAuthProviderInfo(final Document doc)

Gets the auth provider info.

Parameters
doc:Document

the doc

Returns:Element

the auth provider info

getExceptionback to summary
public static Element getException(final Document doc, final Exception t)

Gets the exception.

Parameters
doc:Document

the doc

t:Exception

the t

Returns:Element

the exception

getLookupInfoback to summary
public Element getLookupInfo(final Document doc, final String lookup)

Gets the lookup info.

Parameters
doc:Document

the doc

lookup:String

the lookup

Returns:Element

the lookup info

getWaffleInfoback to summary
public Document getWaffleInfo() throws ParserConfigurationException

Get a Document with basic system information.

This uses the builtin javax.xml package even though the API is quite verbose

Returns:Document

Document with waffle info.

Exceptions
ParserConfigurationException:
when getting new document builder.
mainback to summary
public static void main(final String[] args)

Print system information.

Parameters
args:String[]

variable arguments to pass to main. Valid values are "-show" and "-lookup".

toPrettyXMLback to summary
public static String toPrettyXML(final Document doc) throws TransformerException

To pretty xml.

Parameters
doc:Document

the doc

Returns:String

the string

Exceptions
TransformerException:
the transformer exception