Examples of Command


Examples of org.apache.tuscany.das.rdb.Command

        try {
            InputStream mapping = createConfigStream();
            Connection conn = getConnection();
            DAS das = DAS.FACTORY.createDAS(mapping, conn);

            Command select = das.createCommand("SELECT firstName, lastName, loginID, password, id FROM customers where loginID = ?");

            select.setParameter(1, logonID);

            DataObject root = select.executeQuery();
            conn.close();

            Collection customers = root.getList("CustomerProfileData");
            CustomerProfileData customerProfileData = (CustomerProfileData) customers.iterator().next();
View Full Code Here

Examples of org.apache.tuscany.das.rdb.config.Command

        info.setManagedtx(managedtx);
        config.setConnectionInfo(info);
    }

    public Command addCommand(String name, String sql, String kind) {
        Command cmd = ConfigFactory.INSTANCE.createCommand();
        cmd.setName(name);
        cmd.setKind(kind);
        cmd.setSQL(sql);

        config.getCommand().add(cmd);

        return cmd;
    }
View Full Code Here

Examples of org.apache.twill.api.Command

  private boolean handleSetInstances(final Message message, final Runnable completion) {
    if (message.getType() != Message.Type.SYSTEM || message.getScope() != Message.Scope.RUNNABLE) {
      return false;
    }

    Command command = message.getCommand();
    Map<String, String> options = command.getOptions();
    if (!"instances".equals(command.getCommand()) || !options.containsKey("count")) {
      return false;
    }

    final String runnableName = message.getRunnableName();
    if (runnableName == null || runnableName.isEmpty() || !twillSpec.getRunnables().containsKey(runnableName)) {
View Full Code Here

Examples of org.apache.whirr.command.Command

    assertThat(bytes.toString(), containsString("Unrecognized command 'bogus-command'"));
  }
 
  @Test
  public void testCommand() throws Exception {
    Command command = mock(Command.class);
    when(command.getName()).thenReturn("mock-command");
    Main main = new Main(command);
    main.run(null, null, null, Lists.newArrayList("mock-command", "arg1", "arg2"));
    verify(command).run(null, null, null, Lists.newArrayList("arg1", "arg2"));
  }
View Full Code Here

Examples of org.apache.wiki.ui.Command

        }
        else if ( VIEW_GROUP.equals( permission )
            || EDIT_GROUP.equals( permission )
            || DELETE_GROUP.equals( permission ) )
        {
            Command command = m_wikiContext.getCommand();
            gotPermission = false;
            if ( command instanceof GroupCommand && command.getTarget() != null )
            {
                GroupPrincipal group = (GroupPrincipal)command.getTarget();
                String groupName = group.getName();
                String action = "view";
                if( EDIT_GROUP.equals( permission ) )
                {
                    action = "edit";
View Full Code Here

Examples of org.apache.xindice.tools.command.Command

            Database db = new DatabaseImpl();
  
            DatabaseManager.registerDatabase( db );
      
             // execute command class
             Command command = (Command)Class.forName( commandClass ).newInstance();
             command.execute( table );
             return true;
          } catch (XMLDBException e) {
             System.err.println( "XMLDB Exception with code " + e.errorCode );
             if (table.get(VERBOSE).equals("true")) {
                e.printStackTrace(System.err);
View Full Code Here

Examples of org.apdplat.module.module.model.Command

        commands=new ArrayList<>();
        for(String id :ids){
            String[] attr=id.split("-");
            if(attr.length==2){
                if("command".equals(attr[0])){
                    Command command=getService().retrieve(Command.class, Integer.parseInt(attr[1]));
                    commands.add(command);
                }
            }
        }       
    }
View Full Code Here

Examples of org.arquillian.spacelift.process.Command

    @Override
    protected ProcessResult process(Object input) throws Exception {

        Validate.executionNotNull(commandBuilder, "Command must not be null");

        Command command = commandBuilder.build();
        Process process = null;

        Execution<Process> spawnedProcess = Tasks.prepare(SpawnProcessTask.class)
            .redirectErrorStream(true)
            .shouldExitWith(allowedExitCodes)
            .command(command)
            .workingDir(workingDirectory)
            .addEnvironment(environment)
            .runAsDaemon(isDaemon)
            .execute();

        // wait for process to finish
        process = spawnedProcess.await();

        // set processReference
        processRef.setProcess(process);

        // handle IO of spawned process
        Execution<ProcessResult> processConsumer = Tasks.chain(spawnedProcess, ConsumeProcessOutputTask.class)
            .programName(command.getProgramName()).interaction(interaction).execute();

        // wait for process to finish IO
        ProcessResult result = processConsumer.await();

        if (spawnedProcess.hasFailed()) {
View Full Code Here

Examples of org.bladerunnerjs.testing.specutility.engine.Command

    super(specTest, app);
    this.app = app;
  }
 
  public CommanderChainer populate(final String requirePrefix) {
    call(new Command() {
      public void call() throws Exception {
        app.populate(requirePrefix);
      }
    });
   
View Full Code Here

Examples of org.broad.igv.dev.api.batch.Command

        List<String> subArgs = Collections.emptyList();
        if (args.size() > 1) subArgs = args.subList(1, args.size());
        try {
            Object ocmmand = RuntimeUtils.loadInstanceForName(cmd, null);
            Command command = (Command) ocmmand;
            return command.run(subArgs);
        } catch (ClassNotFoundException e) {
            return null;
        } catch (Exception e) {
            return e.getMessage();
        }
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.