/* (non-Javadoc)
@see com.tvd12.ezyfox.core.command.BaseCommand#execute()
344315
@SuppressWarnings("unchecked")
    @Override
    public Boolean execute() {
        try {
            api.createNPC(username, 
                    SmartFoxServer.getInstance()
                        .getZoneManager().getZoneByName(zone), 
                    forceLogin);
        } catch (SFSLoginException e) {
            throw new IllegalStateException(e);
        }
        return Boolean.TRUE;
    }
191434
public void execute(Runnable command) {
        if (!(command instanceof ClusteredFutureTask)) {
            command = new ClusteredFutureTask<Object>(command, null);
        }
        command.run();
    }
202374
@Override
    public void execute() {
        if ((str == null || str.isEmpty()) && !FindContext.isAvailable()) {
            try {
                str = editor.readLine("Find previous:");
                editor.findPrevious(str);
                FindContext.setLastSearch(str);
            } catch (IOException e) {
                //noop
            }
        } else if (FindContext.isAvailable()) {
            editor.findPrevious(FindContext.getLastSearch());
        } else {
            editor.findPrevious(str);
            FindContext.setLastSearch(str);
        }
    }
132446
@Override
    public void execute()
            throws MojoExecutionException, MojoFailureException
        {
        if (command == null)
            {
            throw new MojoExecutionException("The npm command to execute must be set");
            }

        CommandLine cmdLine = getNpmCommand();
        addCommand(cmdLine);
        addArguments(cmdLine);

        execute(cmdLine);
        }
268815
public static void executeCommand(String[] args) throws IOException {

            OptionParser parser = getParser();

            // declare parameters
            String url = null;

            // parse command-line input
            OptionSet options = parser.parse(args);
            if(options.has(AdminParserUtils.OPT_HELP)) {
                printHelp(System.out);
                return;
            }

            // check required options and/or conflicting options
            AdminParserUtils.checkRequired(options, AdminParserUtils.OPT_URL);

            // load parameters
            url = (String) options.valueOf(AdminParserUtils.OPT_URL);

            // execute command
            AdminClient adminClient = AdminToolUtils.getAdminClient(url);

            doMetaCheckVersion(adminClient);
        }
1359430
@SuppressWarnings("unchecked")
    @Override
    public Boolean execute() {
        User sfsSender = CommandUtil.getSfsUser(sender, api);
        User sfsRecipient = CommandUtil.getSfsUser(recipient, api);
        if(sfsSender == null || sfsRecipient == null)
            return Boolean.FALSE;
        message = (message == null) ? "" : message;
        ISFSObject sfsParams = null;
        if(params != null) {
            MessageParamsClass clazz = context.getMessageParamsClass(params.getClass());
            if(clazz != null) 
                sfsParams = new ResponseParamSerializer().object2params(clazz.getUnwrapper(), params);
        }
        if(sfsParams == null) sfsParams = new SFSObject();
        try {
            api.sendBuddyMessage(sfsSender, sfsRecipient, message, sfsParams);
        } catch (SFSBuddyListException e) {
            throw new IllegalStateException(e);
        }
        return Boolean.TRUE;
    }
755771
@Override
   public void execute() throws BuildException 
   {
      if (getHome() == null)
         throw new BuildException("Home isn't set");

      try 
      {
         ProcessController pc = ProcessController.getInstance();
         if (!pc.start(getHome(), options))
            throw new BuildException("IronJacamar instance couldn't be started from: " + getHome());

         log("Started IronJacamar instance from: " + getHome());
      }
      catch (BuildException be) 
      {
         throw be;
      }
      catch (Throwable t) 
      {
         throw new BuildException(t.getMessage(), t);
      }
   }
1179433
private void execute(String command) throws XAException {
    try {
      connection.createStatement().execute(command);
    } catch (SQLException sqle) {
      throw mapXaException(sqle);
    }
  }
390579
@Override
   public void execute() throws BuildException 
   {
      if (getHome() == null)
         throw new BuildException("Home isn't set");

      try 
      {
         ProcessController pc = ProcessController.getInstance();
         int exitCode = pc.stop(getHome());

         if (exitCode != 0)
            throw new BuildException("IronJacamar instance exit code: " + exitCode);

         log("Stopped IronJacamar instance from: " + getHome());
      }
      catch (BuildException be) 
      {
         throw be;
      }
      catch (Throwable t) 
      {
         throw new BuildException(t.getMessage(), t);
      }
   }
1051919
@Override
	public final void run () {
		Status result = execute();
		if (result == null) throw new IllegalStateException("Invalid status 'null' returned by the execute method");
		switch (result) {
		case SUCCEEDED:
			success();
			return;
		case FAILED:
			fail();
			return;
		case RUNNING:
			running();
			return;
		default:
			throw new IllegalStateException("Invalid status '" + result.name() + "' returned by the execute method");
		}
	}
267934
@SuppressWarnings("unchecked")
    @Override
    public Boolean execute() {
        User sfsUser = CommandUtil.getSfsUser(userToJoin, api);
        Room sfsRoomToJoin = CommandUtil.getSfsRoom(roomToJoin, extension);
        Room sfsRoomToLeave = (roomToLeave != null)
                ? CommandUtil.getSfsRoom(roomToLeave, extension) : null;
        sfsRoomToLeave = (sfsRoomToLeave == null) 
                ? sfsUser.getLastJoinedRoom() : sfsRoomToLeave;
        try {
            api.joinRoom(sfsUser, 
                    sfsRoomToJoin, 
                    password, 
                    asSpectator, 
                    sfsRoomToLeave, 
                    fireClientEvent, 
                    fireServerEvent);
        } catch (SFSJoinRoomException e) {
            throw new IllegalStateException(e);
        }
        return Boolean.TRUE;
    }
426524
@SuppressWarnings("unchecked")
    @Override
    public Boolean execute() {
        api.leaveRoom(CommandUtil.getSfsUser(user, api), 
                CommandUtil.getSfsRoom(room, extension), 
                fireClientEvent, fireServerEvent);
        return Boolean.TRUE;
    }
217184
protected void execute(EntityManagerCommand command) {
        try {
            getEntityManagerCommandExecutor().execute(command);
        } catch (javax.persistence.PersistenceException e) {
            throw new PersistenceException(e);
        }
    }
193231
@Override
    public void execute() {
        logger = new DITAOTAntLogger(getProject());
        logger.info(message);

        //ensure outdir is absolute
        if (!new File(outputdir).isAbsolute()) {
            outputdir = new File(basedir, outputdir).getAbsolutePath();
        }

        //initialize language map
        createLangMap();
        //initialize entity map
        createEntityMap();
        //Initialize entitye exceptions
        entityExceptionSet = new HashSet<>(128);
        //initialize charset map
        createCharsetMap();
        //change charset of html files
        convertHtmlCharset();
        //update entity and lang code
        updateAllEntitiesAndLangs();
    }
1319888
@Override
    public void execute(final ReplaceInList command) {
        referenceKeeper.cleanReferenceCache();
        if (couldBeExecuted(command)) {
            executor.execute(command);
        } else {
            keepReferenceIfObservable(command.getValue());
        }
    }
733812
public <T> T execute(final Object[] args, final Class<T> clazz) {
        return execute(args, clazz, true);
    }
1359148
@Override
    public void execute() throws UpdateExecutionException {
        try {
            sync();
            getMarkLogicClient().sendUpdateQuery(getQueryString(), getBindings(), getIncludeInferred(), getBaseURI());
        }catch(ForbiddenUserException | FailedRequestException e){
            throw new UpdateExecutionException(e);
        } catch (RepositoryException e) {
            throw new UpdateExecutionException(e);
        } catch (MalformedQueryException e) {
            throw new UpdateExecutionException(e);
        } catch (IOException e) {
            throw new UpdateExecutionException(e);
        }
    }