Search in sources :

Example 1 with VersionedFlowsResult

use of org.apache.nifi.toolkit.cli.impl.result.VersionedFlowsResult in project nifi by apache.

the class ListFlows method doExecute.

@Override
public VersionedFlowsResult doExecute(final NiFiRegistryClient client, final Properties properties) throws ParseException, IOException, NiFiRegistryException {
    final String bucketId = getRequiredArg(properties, CommandOption.BUCKET_ID);
    final FlowClient flowClient = client.getFlowClient();
    final List<VersionedFlow> flows = flowClient.getByBucket(bucketId);
    return new VersionedFlowsResult(getResultType(properties), flows);
}
Also used : VersionedFlow(org.apache.nifi.registry.flow.VersionedFlow) FlowClient(org.apache.nifi.registry.client.FlowClient) VersionedFlowsResult(org.apache.nifi.toolkit.cli.impl.result.VersionedFlowsResult)

Aggregations

FlowClient (org.apache.nifi.registry.client.FlowClient)1 VersionedFlow (org.apache.nifi.registry.flow.VersionedFlow)1 VersionedFlowsResult (org.apache.nifi.toolkit.cli.impl.result.VersionedFlowsResult)1