@param integer $applicationId

@return Command
358130
public function removeCredentialsByApplicationId($applicationId)
    {
        return $this->createCommand()
            ->setRequest(
                $this->client->delete(Url::factory('application')->setQuery(array('applicationId' => $applicationId)))
            )
        ;
    }
488790
public function databaseCreate($applicationUuid, $name)
    {
        $options = [
            'form_params' => [
                'name' => $name,
            ],
        ];

        return new OperationResponse(
            $this->connector->request('post', "/applications/${applicationUuid}/databases", $this->query, $options)
        );
    }
330935
protected function runCommandInForeground(Application $app)
    {
        (new Process(
            trim($this->buildCommand(), '& '), dirname($app->request->getScriptFile()), null, null, null
        ))->run();
        $this->callAfterCallbacks($app);
    }
721002
public function setCredentials($appId, $secretKey)
    {
        $this->appId = $appId;
        $this->secretKey = $secretKey;
        return $this;
    }
431187
public function getApplication($applicationName)
    {
        $uri = "applications/$applicationName";
        try {
            $response = $this->client->getEndpoint()->get($uri);
        } catch (RequestException $e) {
            $this->processRequestException($e);
        }

        return new Application($this->client, \GuzzleHttp\json_decode($response->getBody()));
    }
542701
public function instanceApp(string $appClass): ApplicationInterface
    {
        return $this
            ->container
            ->getApplicationContainer()
            ->add($this->applicationLoader->instanceApp($appClass));
    }
859606
public function unbindFrom(string $openAppId)
    {
        $params = [
            'appid' => $this->app['config']['app_id'],
            'open_appid' => $openAppId,
        ];

        return $this->httpPostJson('cgi-bin/open/unbind', $params);
    }
850614
public ActionCommand getActionCommand(String commandId) {
        
        if (logger.isDebugEnabled()) {
            logger.debug("Attempting to retrieve ActionCommand with id ["
                         + commandId
                         + "] from the command registry.");
        }
        
        Object command = getCommand(commandId, ActionCommand.class);
        
        return (ActionCommand) command;
        
    }
225537
public function getActiveNavitiaToken($customerId, $applicationName)
    {
        $query = $this->getEntityManager()->createQueryBuilder()
            ->select('ca')
            ->from('CanalTPNmmPortalBundle:CustomerApplication', 'ca')
            ->join('ca.customer', 'c')
            ->join('ca.application', 'a')
            ->where('c.id = :customerId')
            ->andWhere('a.canonicalName = :appName')
            ->andWhere('ca.isActive = true')

            ->setParameters(array('customerId' => $customerId, 'appName' => $applicationName))
            ->getQuery();

        return $query->getOneOrNullResult();
    }
548901
public List<String> listAllCommands( String applicationName ) {

		this.logger.finer( "Listing commands in " + applicationName + "..." );

		WebResource path = this.resource.path( UrlConstants.APP )
				.path( applicationName ).path( "commands" );

		List<String> result = this.wsClient.createBuilder( path )
					.accept( MediaType.APPLICATION_JSON )
					.get( new GenericType<List<String>> () {});

		if( result != null ) {
			this.logger.finer( result.size() + " command(s) were found for " + applicationName + "." );
		} else {
			this.logger.finer( "No command was found for " + applicationName + "." );
			result = new ArrayList<>( 0 );
		}

		return result;
	}
751448
public function delete($appId)
    {
        $response = $this->client->delete(
            $this->uri . $appId . '/',
            []
        );

        return new ResponseDelete($response->getStatusCode());
    }
265614
public function getRoute($routeId) {

	    if(!array_key_exists($routeId, $this->routes)) {
            throw new ApplicationException(sprintf("No route with id '%s' configured.", $routeId));
        }

        return $this->routes[$routeId];

	}
42390
public function runActionId($actionID = '')
    {
        if (null !== ($action = $this->createAction($actionID))) {
            if ($this->getModule()->beforeControllerAction($this, $action)) {
                $this->runAction($action);
                $this->getModule()->afterControllerAction($this, $action);
            }
        } else {
            $this->missingAction($actionID);
        }
    }
366810
public function formFindModelObject($recordId)
    {
        if (!strlen($recordId)) {
            throw new ApplicationException($this->getLang('not-found-message', 'backend::lang.form.missing_id'));
        }

        $model = $this->controller->formCreateModelObject();

        /*
         * Prepare query and find model record
         */
        $query = $model->newQuery();
        $this->controller->formExtendQuery($query);
        $result = $query->find($recordId);

        if (!$result) {
            throw new ApplicationException($this->getLang('not-found-message', 'backend::lang.form.not_found', [
                'class' => get_class($model), 'id' => $recordId
            ]));
        }

        $result = $this->controller->formExtendModel($result) ?: $result;

        return $result;
    }
239084
public function getById($appId, $scanId, $functionId, array $queryParams = [])
    {
        $response = $this->api
            ->applications()
            ->scans()
            ->functions()
            ->getById($appId, $scanId, $functionId, $queryParams);

        return new CustomFunctionResponse($response);
    }
471382
public function execute(string $uri = null) : ApplicationInterface
    {
        /** @var RouteInterface $route */
        $route = App::resolve('Router')->getRoute($uri);

        /** @var Middleware $middleware */
        $middleware = App::resolve('Middleware', [$route->getMiddlewares()]);

        $this->results = $middleware->dispatch(function () use ($route, $uri) {
            return App::resolve('FrontController')->dispatch($route)->getResult();
        });

        return $this;
    }
1021213
public function getAll($applicationID, $scanID, array $queryParams = [])
    {
        $response = $this->api
            ->applications()
            ->scans()
            ->issues()
            ->getAll($applicationID, $scanID, $queryParams);

        return new IssuesResponse($response);
    }