/** * Returns a {@link CommandProvider} which adds the group commands. * @return flattened {@link CommandProvider} of this */ public CommandProvider flattern() { return builder -> builder .addCommand(new TransactionShowCommand()) .addCommand(new TransactionListCommand()) .addCommand(new TransactionApplyCommand()) .addCommand(new TransactionAbortCommand()); } }
/** * Returns a {@link CommandProvider} which adds the group commands. * @return flattened {@link CommandProvider} of this */ public CommandProvider flattern() { return builder -> builder .addCommand(new ConfigurationSystemCommand()) .addCommand(new ConfigurationListCommand()); } }
@Override public void accept(CommandBuilder<Runnable> builder) { builder.addCommand(new RunCommand()); } }
/** * Adds a leaf command. * @param command the command object * @return this */ default CommandBuilder<T> addCommand(T command) { return addCommand(Util.getCommandName(command), command); }
/** * Returns a {@link CommandProvider} which adds the group commands. * @return flattened {@link CommandProvider} of this */ public CommandProvider flattern() { return builder -> builder .addCommand(new FileListCommand()) .addCommand(new FileGetCommand()) .addCommand(new FilePutCommand()) .addCommand(new FileCopyCommand()) .addCommand(new FileMoveCommand()) .addCommand(new FileDeleteCommand()) .addCommand(new FileMakeDirectoryCommand()); } }
@Override public void accept(CommandBuilder<Runnable> builder) { builder.addGroup(new DotGroup(), group -> group .addCommand(new DrawJobflowCommand()) .addCommand(new DrawOperatorCommand()) .addCommand(new DrawPlanCommand())); } }
@Override public void accept(CommandBuilder<Runnable> builder) { builder.addGroup(this, group -> group .addCommand(new ListJobflowCommand()) .addCommand(new ListBatchCommand()) .addCommand(new ListParameterCommand()) .addCommand(new ListOperatorCommand()) .addCommand(new ListPlanCommand()) .addGroup(new ListDirectIoGroup(), directio -> directio .addCommand(new ListDirectFileInputCommand()) .addCommand(new ListDirectFileOutputCommand())) .addGroup(new ListWindGateGroup(), windgate -> windgate .addCommand(new ListWindGateInputCommand()) .addCommand(new ListWindGateOutputCommand())) .addGroup(new ListHiveGroup(), hive -> hive .addCommand(new ListHiveInputCommand()) .addCommand(new ListHiveOutputCommand()))); } }
@Override public void accept(CommandBuilder<Runnable> builder) { builder.addGroup(new DdlGroup(), group -> group .addCommand(new DdlHiveCommand())); } }