Search in sources :

Example 6 with CommandGroup

use of org.apache.nifi.toolkit.cli.api.CommandGroup 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

CommandGroup (org.apache.nifi.toolkit.cli.api.CommandGroup)6 Command (org.apache.nifi.toolkit.cli.api.Command)5 Context (org.apache.nifi.toolkit.cli.api.Context)4 StandardContext (org.apache.nifi.toolkit.cli.impl.context.StandardContext)4 CommandProcessor (org.apache.nifi.toolkit.cli.impl.command.CommandProcessor)3 NiFiRegistryClient (org.apache.nifi.registry.client.NiFiRegistryClient)2 Session (org.apache.nifi.toolkit.cli.api.Session)2 NiFiClientFactory (org.apache.nifi.toolkit.cli.impl.client.NiFiClientFactory)2 NiFiRegistryClientFactory (org.apache.nifi.toolkit.cli.impl.client.NiFiRegistryClientFactory)2 NiFiClient (org.apache.nifi.toolkit.cli.impl.client.nifi.NiFiClient)2 NiFiRegistryCommandGroup (org.apache.nifi.toolkit.cli.impl.command.registry.NiFiRegistryCommandGroup)2 InMemorySession (org.apache.nifi.toolkit.cli.impl.session.InMemorySession)2 LineReader (org.jline.reader.LineReader)2 PrintStream (java.io.PrintStream)1 ArrayList (java.util.ArrayList)1 TreeMap (java.util.TreeMap)1 ParseException (org.apache.commons.cli.ParseException)1 CommandException (org.apache.nifi.toolkit.cli.api.CommandException)1 DemoCommandGroup (org.apache.nifi.toolkit.cli.impl.command.composite.DemoCommandGroup)1 NiFiCommandGroup (org.apache.nifi.toolkit.cli.impl.command.nifi.NiFiCommandGroup)1