Package com.dtolabs.rundeck.core.common
Class NodesYamlGenerator
- java.lang.Object
-
- 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 ofINodeEntry
data. Nodes should be added with theaddNode(INodeEntry)
method, thengenerate()
called.
-
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNode(INodeEntry node)
Add Node objectvoid
addNodes(java.util.Collection<INodeEntry> nodes)
Add all Node objectsvoid
generate()
Generate output from the provided ndoes.
-
-
-
Constructor Detail
-
NodesYamlGenerator
public NodesYamlGenerator(java.io.File destfile)
Serialize nodes data as yaml to a file.- Parameters:
destfile
- destination
-
NodesYamlGenerator
public NodesYamlGenerator(java.io.OutputStream outputStream)
Serialize nodes data as yaml to an outputstream.- Parameters:
outputStream
- output
-
NodesYamlGenerator
public NodesYamlGenerator(java.io.Writer writer)
Serialize nodes data as yaml to a writer.- Parameters:
writer
- writer
-
-
Method Detail
-
addNode
public void addNode(INodeEntry node)
Description copied from interface:NodesFileGenerator
Add Node object- Specified by:
addNode
in interfaceNodesFileGenerator
- Parameters:
node
- node
-
addNodes
public void addNodes(java.util.Collection<INodeEntry> nodes)
Description copied from interface:NodesFileGenerator
Add all Node objects- Specified by:
addNodes
in interfaceNodesFileGenerator
- 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 interfaceNodesFileGenerator
- Throws:
java.io.IOException
- on io errorNodesGeneratorException
- on other error
-
-