use of org.apache.nifi.toolkit.cli.impl.result.VersionedFlowSnapshotMetadataResult in project nifi by apache.
the class ListFlowVersions method doExecute.
@Override
public VersionedFlowSnapshotMetadataResult doExecute(final NiFiRegistryClient client, final Properties properties) throws ParseException, IOException, NiFiRegistryException {
final String flow = getRequiredArg(properties, CommandOption.FLOW_ID);
final String bucket = getBucketId(client, flow);
final FlowSnapshotClient snapshotClient = client.getFlowSnapshotClient();
final List<VersionedFlowSnapshotMetadata> snapshotMetadata = snapshotClient.getSnapshotMetadata(bucket, flow);
return new VersionedFlowSnapshotMetadataResult(getResultType(properties), snapshotMetadata);
}
Aggregations