use of com.hortonworks.streamline.streams.catalog.topology.component.TopologyExportVisitor in project streamline by hortonworks.
the class StreamCatalogService method doExportTopology.
private TopologyData doExportTopology(Topology topology) throws Exception {
TopologyDag dag = topologyDagBuilder.getDag(topology);
topology.setTopologyDag(dag);
TopologyData topologyData = new TopologyData();
TopologyExportVisitor exportVisitor = new TopologyExportVisitor(topology.getId(), topologyData, this);
topologyData.setTopologyName(topology.getName());
topologyData.setConfig(topology.getConfig());
TopologyDag topologyDag = topology.getTopologyDag();
if (topologyDag != null) {
topologyDag.traverse(exportVisitor);
}
topologyData.setMetadata(getTopologyEditorMetadata(topology.getId()));
return topologyData;
}
Aggregations