Java Code Examples for org.apache.nifi.groups.ProcessGroup#getFunnels()

The following examples show how to use org.apache.nifi.groups.ProcessGroup#getFunnels() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DtoFactory.java    From localization_nifi with Apache License 2.0 4 votes vote down vote up
/**
 * Creates a ProcessGroupContentDTO from the specified ProcessGroup.
 *
 * @param group group
 * @param recurse recurse
 * @return dto
 */
private FlowSnippetDTO createProcessGroupContentsDto(final ProcessGroup group, final boolean recurse) {
    if (group == null) {
        return null;
    }

    final FlowSnippetDTO dto = new FlowSnippetDTO();

    for (final ProcessorNode procNode : group.getProcessors()) {
        dto.getProcessors().add(createProcessorDto(procNode));
    }

    for (final Connection connNode : group.getConnections()) {
        dto.getConnections().add(createConnectionDto(connNode));
    }

    for (final Label label : group.getLabels()) {
        dto.getLabels().add(createLabelDto(label));
    }

    for (final Funnel funnel : group.getFunnels()) {
        dto.getFunnels().add(createFunnelDto(funnel));
    }

    for (final ProcessGroup childGroup : group.getProcessGroups()) {
        if (recurse) {
            dto.getProcessGroups().add(createProcessGroupDto(childGroup, recurse));
        } else {
            dto.getProcessGroups().add(createConciseProcessGroupDto(childGroup));
        }
    }

    for (final RemoteProcessGroup remoteProcessGroup : group.getRemoteProcessGroups()) {
        dto.getRemoteProcessGroups().add(createRemoteProcessGroupDto(remoteProcessGroup));
    }

    for (final Port inputPort : group.getInputPorts()) {
        dto.getInputPorts().add(createPortDto(inputPort));
    }

    for (final Port outputPort : group.getOutputPorts()) {
        dto.getOutputPorts().add(createPortDto(outputPort));
    }

    return dto;
}
 
Example 2
Source File: StandardFunnelDAO.java    From localization_nifi with Apache License 2.0 4 votes vote down vote up
@Override
public Set<Funnel> getFunnels(String groupId) {
    ProcessGroup group = locateProcessGroup(flowController, groupId);
    return group.getFunnels();
}
 
Example 3
Source File: StandardFunnelDAO.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public Set<Funnel> getFunnels(String groupId) {
    ProcessGroup group = locateProcessGroup(flowController, groupId);
    return group.getFunnels();
}