com.dtolabs.rundeck.core.common
Class NodesYamlGenerator

java.lang.Object
  extended by com.dtolabs.rundeck.core.common.NodesYamlGenerator
All Implemented Interfaces:
NodesFileGenerator

public class NodesYamlGenerator
extends java.lang.Object
implements NodesFileGenerator

NodesYamlGenerator produces YAML formatted output from a set of INodeEntry data. Nodes should be added with the addNode(INodeEntry) method, then generate() called.


Constructor Summary
NodesYamlGenerator(java.io.File destfile)
          Serialize nodes data as yaml to a file.
NodesYamlGenerator(java.io.OutputStream outputStream)
          Serialize nodes data as yaml to an outputstream.
NodesYamlGenerator(java.io.Writer writer)
          Serialize nodes data as yaml to a writer.
 
Method Summary
 void addNode(INodeEntry node)
          Add Node object
 void addNodes(java.util.Collection<INodeEntry> nodes)
          Add all Node objects
 void generate()
          Generate output from the provided ndoes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodesYamlGenerator

public NodesYamlGenerator(java.io.File destfile)
Serialize nodes data as yaml to a file.

Parameters:
destfile -

NodesYamlGenerator

public NodesYamlGenerator(java.io.OutputStream outputStream)
Serialize nodes data as yaml to an outputstream.

Parameters:
destfile -

NodesYamlGenerator

public NodesYamlGenerator(java.io.Writer writer)
Serialize nodes data as yaml to a writer.

Parameters:
destfile -
Method Detail

addNode

public void addNode(INodeEntry node)
Description copied from interface: NodesFileGenerator
Add Node object

Specified by:
addNode in interface NodesFileGenerator

addNodes

public void addNodes(java.util.Collection<INodeEntry> nodes)
Description copied from interface: NodesFileGenerator
Add all Node objects

Specified by:
addNodes in interface NodesFileGenerator
Parameters:
nodes - the nodes

generate

public void generate()
              throws java.io.IOException,
                     NodesGeneratorException
Description copied from interface: NodesFileGenerator
Generate output from the provided ndoes.

Specified by:
generate in interface NodesFileGenerator
Throws:
java.io.IOException
NodesGeneratorException