Search in sources :

Example 96 with RevisionDTO

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;
    }
}
Also used : ControllerServiceEntity(org.apache.nifi.web.api.entity.ControllerServiceEntity) RevisionDTO(org.apache.nifi.web.api.dto.RevisionDTO)

Aggregations

RevisionDTO (org.apache.nifi.web.api.dto.RevisionDTO)96 Response (javax.ws.rs.core.Response)45 Authorizable (org.apache.nifi.authorization.resource.Authorizable)30 PermissionsDTO (org.apache.nifi.web.api.dto.PermissionsDTO)29 PortEntity (org.apache.nifi.web.api.entity.PortEntity)27 ProcessGroupEntity (org.apache.nifi.web.api.entity.ProcessGroupEntity)27 ProcessorEntity (org.apache.nifi.web.api.entity.ProcessorEntity)26 HashMap (java.util.HashMap)24 Set (java.util.Set)24 NiFiUser (org.apache.nifi.authorization.user.NiFiUser)24 Map (java.util.Map)23 ProcessorDTO (org.apache.nifi.web.api.dto.ProcessorDTO)23 HashSet (java.util.HashSet)22 Collectors (java.util.stream.Collectors)22 ControllerServiceEntity (org.apache.nifi.web.api.entity.ControllerServiceEntity)22 ScheduledState (org.apache.nifi.controller.ScheduledState)21 ControllerServiceState (org.apache.nifi.controller.service.ControllerServiceState)21 VersionControlInformationDTO (org.apache.nifi.web.api.dto.VersionControlInformationDTO)21 Authorizer (org.apache.nifi.authorization.Authorizer)19 RequestAction (org.apache.nifi.authorization.RequestAction)19