Package com.emc.d2fs.utils

# Class NodeUtils

java.lang.Object
com.emc.d2fs.utils.NodeUtils

public class NodeUtils extends Object
Model node utilities.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `NODE_DIALOG`
  Dialog node name
  `static final String`
  `NODE_FAILURE`
  Failure node name
  `static final String`
  `NODE_SUCCESS`
  Success node name

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NodeUtils()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Node`
  `appendChildNode(Node parent, String name)`
  Append a child node
  `static String`
  `getAttribute(Node node, String name)`
  Get a node attribute
  `static Node`
  `getRootDialog()`
  Get a dialog node
  `static Node`
  `getRootFailure(Throwable e)`
  Get a failure node from exception
  `static Node`
  `getRootSuccess()`
  Get a success node
  `static void`
  `setAttribute(Node node, String name, boolean value)`
  Set a node attribute
  `static void`
  `setAttribute(Node node, String name, int value)`
  Set a node attribute
  `static void`
  `setAttribute(Node node, String name, String value)`
  Set a node attribute

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

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

- ## Field Details

  - ### NODE_SUCCESS

    public static final String NODE_SUCCESS
    Success node name
    See Also:
      - Constant Field Values

  - ### NODE_FAILURE

    public static final String NODE_FAILURE
    Failure node name
    See Also:
      - Constant Field Values

  - ### NODE_DIALOG

    public static final String NODE_DIALOG
    Dialog node name
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### NodeUtils

    public NodeUtils()

- ## Method Details

  - ### setAttribute

    public static void setAttribute(Node node, String name, String value)
    Set a node attribute
    Parameters:
      `node` - Target node
      `name` -
      `value` -

  - ### setAttribute

    public static void setAttribute(Node node, String name, boolean value)
    Set a node attribute
    Parameters:
      `node` - Target node
      `name` - Name of attribute
      `value` - Boolean value

  - ### setAttribute

    public static void setAttribute(Node node, String name, int value)
    Set a node attribute
    Parameters:
      `node` - Target node
      `name` - Name of attribute
      `value` - Integer value

  - ### getAttribute

    public static String getAttribute(Node node, String name)
    Get a node attribute
    Parameters:
      `node` - Source node
      `name` - Name of attribute
    Returns:
      Attribute value

  - ### getRootDialog

    public static Node getRootDialog()
    Get a dialog node
    Returns:
      New Node object

  - ### getRootSuccess

    public static Node getRootSuccess()
    Get a success node
    Returns:
      New Node object

  - ### getRootFailure

    public static Node getRootFailure(Throwable e)
    Get a failure node from exception
    Parameters:
      `e` - Source Throwable exception
    Returns:
      New Node object

  - ### appendChildNode

    public static Node appendChildNode(Node parent, String name)
    Append a child node
    Parameters:
      `parent` - Parent node for new child
      `name` - Name of new child node
    Returns:
      New child Node object