use of org.apache.nifi.web.api.dto.RevisionDTO in project kylo by Teradata.
the class NiFiReportingTaskRestClientV1 method createReportingTaskControllerService.
@Override
public ControllerServiceDTO createReportingTaskControllerService(@Nonnull ControllerServiceDTO controllerService) {
ControllerServiceEntity entity = new ControllerServiceEntity();
entity.setComponent(controllerService);
final RevisionDTO revision = new RevisionDTO();
revision.setVersion(0L);
entity.setRevision(revision);
ControllerServiceEntity updatedService = client.post(CREATE_CONTROLLER_SERVICE_PATH, entity, ControllerServiceEntity.class);
if (updatedService != null) {
return updatedService.getComponent();
} else {
return null;
}
}
Aggregations