Search in sources :

Example 1 with VersionedFlowSnapshotMetadataResult

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);
}
Also used : FlowSnapshotClient(org.apache.nifi.registry.client.FlowSnapshotClient) VersionedFlowSnapshotMetadata(org.apache.nifi.registry.flow.VersionedFlowSnapshotMetadata) VersionedFlowSnapshotMetadataResult(org.apache.nifi.toolkit.cli.impl.result.VersionedFlowSnapshotMetadataResult)

Aggregations

FlowSnapshotClient (org.apache.nifi.registry.client.FlowSnapshotClient)1 VersionedFlowSnapshotMetadata (org.apache.nifi.registry.flow.VersionedFlowSnapshotMetadata)1 VersionedFlowSnapshotMetadataResult (org.apache.nifi.toolkit.cli.impl.result.VersionedFlowSnapshotMetadataResult)1