use of org.apache.nifi.toolkit.cli.impl.result.VersionControlInfoResult in project nifi by apache.
the class PGGetVersion method doExecute.
@Override
public VersionControlInfoResult doExecute(final NiFiClient client, final Properties properties) throws NiFiClientException, IOException, MissingOptionException, CommandException {
final String pgId = getRequiredArg(properties, CommandOption.PG_ID);
final VersionControlInformationEntity entity = client.getVersionsClient().getVersionControlInfo(pgId);
if (entity.getVersionControlInformation() == null) {
throw new NiFiClientException("Process group is not under version control");
}
return new VersionControlInfoResult(getResultType(properties), entity);
}
Aggregations