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 ofINodeEntrydata. 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 voidaddNode(INodeEntry node)Add Node objectvoidaddNodes(java.util.Collection<INodeEntry> nodes)Add all Node objectsvoidgenerate()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:NodesFileGeneratorAdd Node object- Specified by:
addNodein interfaceNodesFileGenerator- Parameters:
node- node
-
addNodes
public void addNodes(java.util.Collection<INodeEntry> nodes)
Description copied from interface:NodesFileGeneratorAdd all Node objects- Specified by:
addNodesin interfaceNodesFileGenerator- Parameters:
nodes- the nodes
-
generate
public void generate() throws java.io.IOException, NodesGeneratorExceptionDescription copied from interface:NodesFileGeneratorGenerate output from the provided ndoes.- Specified by:
generatein interfaceNodesFileGenerator- Throws:
java.io.IOException- on io errorNodesGeneratorException- on other error
-
-