Process the view request at the current state.
12989
def process(
            self, request, application,
            expected_state, label, extra_roles=None):
        

        # Get the authentication of the current user
        roles = self._get_roles_for_request(request, application)
        if extra_roles is not None:
            roles.update(extra_roles)

        # Ensure current user is authenticated. If user isn't applicant,
        # leader, delegate or admin, they probably shouldn't be here.
        if 'is_authorised' not in roles:
            return HttpResponseForbidden('<h1>Access Denied</h1>')

        # If user didn't supply state on URL, redirect to full URL.
        if expected_state is None:
            url = get_url(request, application, roles, label)
            return HttpResponseRedirect(url)

        # Check that the current state is valid.
        if application.state not in self._config:
            raise RuntimeError("Invalid current state '%s'" % application.state)

        # If state user expected is different to state we are in, warn user
        # and jump to expected state.
        if expected_state != application.state:
            # post data will be lost
            if request.method == "POST":
                messages.warning(
                    request,
                    "Discarding request and jumping to current state.")
            # note we discard the label, it probably isn't relevant for new
            # state
            url = get_url(request, application, roles)
            return HttpResponseRedirect(url)

        # Get the current state for this application
        state_config = self._config[application.state]

        # Finally do something
        instance = load_state_instance(state_config)
        if request.method == "GET":
            # if method is GET, state does not ever change.
            response = instance.get_next_config(request, application, label, roles)
            assert isinstance(response, HttpResponse)
            return response

        elif request.method == "POST":
            # if method is POST, it can return a HttpResponse or a string
            response = instance.get_next_config(request, application, label, roles)
            if isinstance(response, HttpResponse):
                # If it returned a HttpResponse, state not changed, just
                # display
                return response
            else:
                # If it returned a string, lookit up in the actions for this
                # state
                next_config = response
                # Go to the next state
                return self._next(request, application, roles, next_config)

        else:
            # Shouldn't happen, user did something weird
            return HttpResponseBadRequest("<h1>Bad Request</h1>")
344162
public function process()
	{
		$view = $this->getView();
		$context = $this->getContext();
		$ids = (array) $view->param( 'fav_id', [] );

		try
		{
			if( $context->getUserId() != null && !empty( $ids ) )
			{
				switch( $view->param( 'fav_action' ) )
				{
					case 'add':
						$this->addFavorites( $ids ); break;
					case 'delete':
						$this->deleteFavorites( $ids ); break;
				}
			}

			parent::process();
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->favoriteErrorList = $view->get( 'favoriteErrorList', [] ) + $error;
		}
		catch( \Aimeos\Controller\Frontend\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
			$view->favoriteErrorList = $view->get( 'favoriteErrorList', [] ) + $error;
		}
		catch( \Aimeos\Client\Html\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
			$view->favoriteErrorList = $view->get( 'favoriteErrorList', [] ) + $error;
		}
		catch( \Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
			$view->favoriteErrorList = $view->get( 'favoriteErrorList', [] ) + $error;
			$this->logException( $e );
		}
	}
1030120
def process_request(self, request_object):
        """"""

        identifier = request_object.identifier

        # Look for the object by its ID and return it
        resource = request_object.entity_cls.get(identifier)
        return ResponseSuccess(Status.SUCCESS, resource)
330389
public function process()
    {
        try {
            $this->processAlias();
            $this->processRoute();
            $this->output404();
        } catch (Exception $ex) {
            trigger_error($ex->getMessage());
            $this->response->outputError500();
        }
    }
187110
public function process ()
		{
			if (!empty( $this->_params ))
			{
				if ($this->getIsUploading())
					$this->uploadChunk();
				else
					$this->testChunk();
			}
		}
47912
async def dispatch(self, request, view=None, **kwargs):
        """"""
        if view is None and request.method not in self.methods:
            raise HTTPMethodNotAllowed(request.method, self.methods)

        method = getattr(self, view or request.method.lower())
        response = await method(request, **kwargs)
        return await self.make_response(request, response)
12776
public function process(View $view): void
    {
        if ($this->request === null) {
            throw new MissingRequestException('Cannot process a view without a request set. This method should be called from the callback passed to Pipeline::withRequest');
        }

        call_user_func($this->middleware, $view);
    }
903831
def post(self, request, *args, **kwargs):
        
        queryset = self.get_selected(request)

        if request.POST.get('modify'):
            response = self.process_action(request, queryset)
            if not response:
                url = self.get_done_url()
                return self.render(request, redirect_url=url)
            else:
                return response
        else:
            return self.render(request, redirect_url=request.build_absolute_uri())
105757
def request
      raise StateError, "already processing a request" if current_request

      req = @parser.current_request
      @request_fsm.transition :headers
      @keepalive = false if req[CONNECTION] == CLOSE || req.version == HTTP_VERSION_1_0
      @current_request = req

      req
    rescue IOError, Errno::ECONNRESET, Errno::EPIPE
      @request_fsm.transition :closed
      @keepalive = false
      nil
    end
21340
def update_view_state(self, view, state):
        """"""
        if view.name not in self:
            self[view.name] = Bunch()
        self[view.name].update(state)
586315
protected function process()
    {
        $this->result = $this[self::RESPONSE_PROCESSING] != self::TYPE_RAW
            ? DefaultResponseParser::getInstance()->parse($this)
            : $this->request->getResponse();
    }
1095285
public function process()
	{
		$view = $this->getView();

		try
		{
			// only start if there's something to do
			if( ( $option = $view->param( 'cs-order', null ) ) === null
				|| $view->get( 'standardStepActive' ) !== null
			) {
				return;
			}

			$context = $this->_getContext();
			$orderBaseManager = MShop_Factory::createManager( $context, 'order/base' );

			$basket = $orderBaseManager->getSession();
			$basket->setCustomerId( $context->getUserId() );
			$basket->finish();

			$cntl = Controller_Frontend_Factory::createController( $context, 'order' );
			$orderItem = $cntl->store( $basket );
			$cntl->block( $orderItem );

			$context->getSession()->set( 'arcavias/orderid', $orderItem->getId() );

			$view->orderItem = $orderItem;
			$view->orderBasket = $basket;

			parent::process();

			// save again after sub-clients modified it's state
			MShop_Factory::createManager( $context, 'order' )->saveItem( $orderItem );
		}
		catch( Exception $e )
		{
			$view->standardStepActive = 'order';
			throw $e;
		}
	}
1132631
def process_request(self, request_object):
        """"""

        resource = request_object.entity_cls.create(**request_object.data)
        return ResponseSuccessCreated(resource)
34317
def process_requests(self):
        
        while True:
            id, args, kwargs = self.request_queue.get()
            try:
                response = self._make_request(*args, **kwargs)
            except Exception as e:
                response = e
            self.results[id] = response
789899
def handle_request(self, request, **resources):
        
        if not request.method in self._meta.callmap.keys():
            raise HttpError(
                'Unknown or unsupported method \'%s\'' % request.method,
                status=status.HTTP_501_NOT_IMPLEMENTED)

        # Get the appropriate create/read/update/delete function
        view = getattr(self, self._meta.callmap[request.method])

        # Get function data
        return view(request, **resources)
1236272
public function process()
    {
        $form = $this->getForm();
        if ($form !== null && $form->isSubmitted()) {
            $data = $form->getFormData();
            if (isset($data[$this->id])) {
                $this->selected_value = $data[$this->id];

                $view = $this->getFirstAncestor('SwatView');
                if ($view !== null) {
                    $selection = new SwatViewSelection(array(
                        $this->selected_value
                    ));

                    $view->setSelection($selection, $this);
                }
            }
        }
    }
1294146
protected function process()
    {

        // add the path => entity ID/store view code mapping
        $this->addPathEntityIdMapping($path = $this->getValue(ColumnKeys::PATH));
        $this->addPathStoreViewCodeMapping($path, $this->getSubject()->getStoreViewCode(StoreViewCodes::ADMIN));

        // temporary persist the path
        $this->setLastPath($path);
    }