Examples of CommandModule


Examples of ecks.services.modules.CommandModule

        Generic.curProtocol.outPRVMSG(who, user, "\u0002COMMAND     \u0002<required argument> [optional argument]");
        Generic.curProtocol.outPRVMSG(who, user, "\u0002            Command Description\u0002");
        Generic.curProtocol.outPRVMSG(who, user, "\u0002------------------------------------------------\u0002");

        for (Map.Entry<String, CommandModule> z : who.getCommands().entrySet()) {
            CommandModule cm = z.getValue();
            if (cm.getDesc().Required_Access.ordinal() <= ((SrvAuth) Configuration.getSvc().get(Configuration.authservice)).checkAccess(user.toLowerCase()).ordinal()) {
                if (!cm.getName().startsWith("\u0001")) {
                    Generic.curProtocol.outPRVMSG(who, user, "\u0002" + util.pad(z.getKey(), 12) + "\u0002" + cm.getDesc().arguments);
                    Generic.curProtocol.outPRVMSG(who, user, "\u0002            " + cm.getDesc().help + "\u0002");
                }
            }
        }
    }
View Full Code Here

Examples of ecks.services.modules.CommandModule

        Generic.curProtocol.outPRVMSG(who, user, "\u0002COMMAND     \u0002<required argument> [optional argument]");
        Generic.curProtocol.outPRVMSG(who, user, "\u0002            Command Description\u0002");
        Generic.curProtocol.outPRVMSG(who, user, "\u0002------------------------------------------------\u0002");

        for (Map.Entry<String, CommandModule> z : who.getCommands().entrySet()) {
            CommandModule cm = z.getValue();
            if (Configuration.getSvc().containsKey(Configuration.authservice)) {
                if (cm.getDesc().Required_Access.ordinal() <= ((SrvAuth) Configuration.getSvc().get(Configuration.authservice)).checkAccess(user.toLowerCase()).ordinal()) {
                    if (!cm.getName().startsWith("\u0001")) {
                        Generic.curProtocol.outPRVMSG(who, user, "\u0002" + util.pad(z.getKey(), 12) + "\u0002" + cm.getDesc().arguments);
                        Generic.curProtocol.outPRVMSG(who, user, "\u0002            " + cm.getDesc().help + "\u0002");
                    }
                }
            } else {
                if (!cm.getName().startsWith("\u0001")) {
                    Generic.curProtocol.outPRVMSG(who, user, "\u0002" + util.pad(z.getKey(), 12) + "\u0002" + cm.getDesc().arguments);
                    Generic.curProtocol.outPRVMSG(who, user, "\u0002            " + cm.getDesc().help + "\u0002");
                }
            }

        }
    }
View Full Code Here

Examples of ecks.services.modules.CommandModule

        Generic.curProtocol.outPRVMSG(who, user, "\u0002COMMAND     \u0002<required argument> [optional argument]");
        Generic.curProtocol.outPRVMSG(who, user, "\u0002            Command Description\u0002");
        Generic.curProtocol.outPRVMSG(who, user, "\u0002------------------------------------------------\u0002");

        for (Map.Entry<String, CommandModule> z : who.getCommands().entrySet()) {
            CommandModule cm = z.getValue();
            if (cm.getDesc().Required_Access.ordinal() <= ((SrvAuth) Configuration.getSvc().get(Configuration.authservice)).checkAccess(user.toLowerCase()).ordinal()) {
                if (!cm.getName().startsWith("\u0001")) {
                    Generic.curProtocol.outPRVMSG(who, user, "\u0002" + util.pad(z.getKey(), 12) + "\u0002" + cm.getDesc().arguments);
                    Generic.curProtocol.outPRVMSG(who, user, "\u0002            " + cm.getDesc().help + "\u0002");
                }
            }
        }
    }
View Full Code Here

Examples of org.elasticsearch.shell.command.CommandModule

        provider.load("not found");
    }

    @Test
    public void testAllCommandsHaveHelp() {
        Injector injector = Guice.createInjector(new ShellModule(), new JLineModule(), new RhinoShellModule(), new CommandModule(), new Module() {
            @Override
            public void configure(Binder binder) {
                binder.bind(CommandRegistry.class).asEagerSingleton();
            }
        });
View Full Code Here

Examples of org.elasticsearch.shell.command.CommandModule

        }
    }

    @Test
    public void testHelpMessageContainsAllCommands() {
        Injector injector = Guice.createInjector(new ShellModule(), new JLineModule(), new RhinoShellModule(), new CommandModule(), new Module() {
            @Override
            public void configure(Binder binder) {
                binder.bind(CommandRegistry.class).asEagerSingleton();
            }
        });
View Full Code Here

Examples of org.elasticsearch.shell.command.CommandModule

*/
public class Main {

    public static void main(String... args) {
        Injector injector = Guice.createInjector(new ShellModule(), new JLineModule(),
                new RhinoShellModule(), new CommandModule());
        Shell shell = injector.getInstance(Shell.class);
        shell.run();
    }
View Full Code Here

Examples of org.jitterbit.cli.CommandModule

   
    private CommandModule commands;
   
    public CommandConsole(CommandProducer producer) {
        this.producer = producer;
        commands = new CommandModule();
        commands.addCommand(helpCommand());
        producer.setCommandConsumer(new Consumer());
        producer.setCompleter(new Completer());
    }
View Full Code Here

Examples of org.jitterbit.cli.CommandModule

        this.launchers = launchers;
        this.actions = actions;
        addResource(new ViewDestroyingResource(view.getWindow().getViewManager(), view, WindowElementStateSpan.WHEN_OPEN));
        addResource(new ViewActivationResource(view, WindowElementStateSpan.WHEN_ACTIVE));
        addResource(new ContextMenuShortCutResource(view.getWindow()));
        CommandModule commands = new ConsoleCommands(launchers).build();
        addResource(new CommandActivator(view.getWindow().getCommandConsole(), commands));
    }
View Full Code Here

Examples of org.jitterbit.cli.CommandModule

    public ConsoleCommands(ConsoleLauncher[] launchers) {
        this.launchers = launchers;
    }
    public CommandModule build() {
        CommandModule module = new CommandModule();
        module.addCommands(Arrays2.transform(launchers, Command.class, new Converter()));
        return module;
    }
View Full Code Here

Examples of org.jitterbit.cli.CommandModule

    public DefaultPageConfig(InterchangeView view, EntityPageFactory pageFactory) {
        this.view = view;
        this.pageFactory = pageFactory;
        saveConsequences = Lists.newArrayList();
        additionalToolbarButtons = Lists.newArrayList();
        commands = new CommandModule();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.