Search in sources :

Example 1 with NiFiComponentErrors

use of com.thinkbiganalytics.nifi.rest.model.NiFiComponentErrors in project kylo by Teradata.

the class NifiProcessorValidationUtil method getProcessorValidationErrors.

public static List<NiFiComponentErrors> getProcessorValidationErrors(ProcessGroupDTO group) {
    List<NiFiComponentErrors> errors = new ArrayList<>();
    errors.addAll(getProcessorValidationErrors(group.getContents().getProcessors()));
    if (group.getContents().getProcessGroups() != null) {
        for (ProcessGroupDTO groupDTO : group.getContents().getProcessGroups()) {
            errors.addAll(getProcessorValidationErrors(groupDTO));
        }
    }
    return errors;
}
Also used : ArrayList(java.util.ArrayList) ProcessGroupDTO(org.apache.nifi.web.api.dto.ProcessGroupDTO) NiFiComponentErrors(com.thinkbiganalytics.nifi.rest.model.NiFiComponentErrors)

Example 2 with NiFiComponentErrors

use of com.thinkbiganalytics.nifi.rest.model.NiFiComponentErrors in project kylo by Teradata.

the class NifiProcessorValidationUtil method getProcessorValidationErrors.

public static NiFiComponentErrors getProcessorValidationErrors(ProcessorDTO dto, boolean ignoreDisabled) {
    if (!ignoreDisabled || (ignoreDisabled && (!NifiProcessUtil.PROCESS_STATE.DISABLED.name().equalsIgnoreCase(dto.getState()))) && dto.getValidationErrors() != null) {
        NiFiComponentErrors processorDTO = new NiFiComponentErrors(dto.getName(), dto.getId(), dto.getParentGroupId());
        processorDTO.addValidationErrors(dto.getValidationErrors());
        return processorDTO;
    }
    return null;
}
Also used : NiFiComponentErrors(com.thinkbiganalytics.nifi.rest.model.NiFiComponentErrors)

Example 3 with NiFiComponentErrors

use of com.thinkbiganalytics.nifi.rest.model.NiFiComponentErrors in project kylo by Teradata.

the class NifiProcessorValidationUtil method getValidationErrors.

public static List<NifiError> getValidationErrors(ProcessGroupDTO group) {
    List<NiFiComponentErrors> processorValidationErrors = getProcessorValidationErrors(group);
    List<NifiError> errors = new ArrayList<>();
    for (NiFiComponentErrors dto : processorValidationErrors) {
        errors.addAll(dto.getValidationErrors());
    }
    return errors;
}
Also used : NifiError(com.thinkbiganalytics.nifi.rest.model.NifiError) ArrayList(java.util.ArrayList) NiFiComponentErrors(com.thinkbiganalytics.nifi.rest.model.NiFiComponentErrors)

Aggregations

NiFiComponentErrors (com.thinkbiganalytics.nifi.rest.model.NiFiComponentErrors)3 ArrayList (java.util.ArrayList)2 NifiError (com.thinkbiganalytics.nifi.rest.model.NifiError)1 ProcessGroupDTO (org.apache.nifi.web.api.dto.ProcessGroupDTO)1