Package waffle.util

# Class WaffleInfo

java.lang.Object
waffle.util.WaffleInfo

public class WaffleInfo extends Object
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
Constructor
Description
`WaffleInfo()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`addAccountInfo(Document doc, Element node, IWindowsAccount account)`
Adds the account info.
`protected Element`
`getAuthProviderInfo(Document doc)`
Gets the auth provider info.
`static Element`
`getException(Document doc, Exception t)`
Gets the exception.
`Element`
`getLookupInfo(Document doc, String lookup)`
Gets the lookup info.
`Document`
`getWaffleInfo()`
Get a Document with basic system information.
`static void`
`main(String[] args)`
Print system information.
`static String`
`toPrettyXML(Document doc)`
To pretty xml.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### WaffleInfo

public WaffleInfo()

## Method Details

### getWaffleInfo

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 with waffle info.
Throws:
  `ParserConfigurationException` - when getting new document builder.

### getAuthProviderInfo

protected Element getAuthProviderInfo(Document doc)
Gets the auth provider info.

Parameters:
  `doc` - the doc
Returns:
  the auth provider info

### addAccountInfo

protected void addAccountInfo(Document doc, Element node, IWindowsAccount account)
Adds the account info.

Parameters:
  `doc` - the doc
  `node` - the node
  `account` - the account

### getLookupInfo

public Element getLookupInfo(Document doc, String lookup)
Gets the lookup info.

Parameters:
  `doc` - the doc
  `lookup` - the lookup
Returns:
  the lookup info

### getException

public static Element getException(Document doc, Exception t)
Gets the exception.

Parameters:
  `doc` - the doc
  `t` - the t
Returns:
  the exception

### toPrettyXML

public static String toPrettyXML(Document doc) throws TransformerException
To pretty xml.

Parameters:
  `doc` - the doc
Returns:
  the string
Throws:
  `TransformerException` - the transformer exception

### main

public static void main(String[] args)
Print system information.

Parameters:
  `args` - variable arguments to pass to main. Valid values are "-show" and "-lookup".