Search in sources :

Example 1 with NiFiCommandGroup

use of org.apache.nifi.toolkit.cli.impl.command.nifi.NiFiCommandGroup in project nifi by apache.

the class CommandFactory method createCommandGroups.

public static Map<String, CommandGroup> createCommandGroups(final Context context) {
    final List<CommandGroup> groups = new ArrayList<>();
    groups.add(new NiFiRegistryCommandGroup());
    groups.add(new NiFiCommandGroup());
    groups.add(new DemoCommandGroup());
    groups.add(new SessionCommandGroup());
    final Map<String, CommandGroup> groupMap = new TreeMap<>();
    groups.stream().forEach(g -> {
        g.initialize(context);
        groupMap.put(g.getName(), g);
    });
    return Collections.unmodifiableMap(groupMap);
}
Also used : SessionCommandGroup(org.apache.nifi.toolkit.cli.impl.command.session.SessionCommandGroup) NiFiRegistryCommandGroup(org.apache.nifi.toolkit.cli.impl.command.registry.NiFiRegistryCommandGroup) CommandGroup(org.apache.nifi.toolkit.cli.api.CommandGroup) DemoCommandGroup(org.apache.nifi.toolkit.cli.impl.command.composite.DemoCommandGroup) SessionCommandGroup(org.apache.nifi.toolkit.cli.impl.command.session.SessionCommandGroup) NiFiCommandGroup(org.apache.nifi.toolkit.cli.impl.command.nifi.NiFiCommandGroup) NiFiCommandGroup(org.apache.nifi.toolkit.cli.impl.command.nifi.NiFiCommandGroup) DemoCommandGroup(org.apache.nifi.toolkit.cli.impl.command.composite.DemoCommandGroup) ArrayList(java.util.ArrayList) NiFiRegistryCommandGroup(org.apache.nifi.toolkit.cli.impl.command.registry.NiFiRegistryCommandGroup) TreeMap(java.util.TreeMap)

Aggregations

ArrayList (java.util.ArrayList)1 TreeMap (java.util.TreeMap)1 CommandGroup (org.apache.nifi.toolkit.cli.api.CommandGroup)1 DemoCommandGroup (org.apache.nifi.toolkit.cli.impl.command.composite.DemoCommandGroup)1 NiFiCommandGroup (org.apache.nifi.toolkit.cli.impl.command.nifi.NiFiCommandGroup)1 NiFiRegistryCommandGroup (org.apache.nifi.toolkit.cli.impl.command.registry.NiFiRegistryCommandGroup)1 SessionCommandGroup (org.apache.nifi.toolkit.cli.impl.command.session.SessionCommandGroup)1