Render the template as the entity for a ResponseBuilder, returning the built Response

@return the result of calling responseBuilder.
773121
@Override
	public Response process(Response.ResponseBuilder responseBuilder)
	{
		final String entity = process();

		responseBuilder.entity(entity);

		return responseBuilder.build();
	}
1025855
function render()
    {
        $Template = $this->getTemplate();
        if ($Template === null)
            // Nothing To Render!!
            return null;

        if (! is_file($Template) )
        {
            ## resolve to template file path from name
            $_t_template = $this->resolver()->resolve($Template);

            ## only if file resolved
            ($_t_template === false) ?: $Template = $_t_template;

            ##! Note:
            ##- if file not resolved let it handle within renderer
            ##- ..
        }

        ## Render Into Variable:
        $vars = \Poirot\Std\cast($this->variables())->toArray();
        $renderer = $this->renderer();

        // !! If Template not resolved also let renderer to resolve into template path.

        ErrorStack::handleError(); // handle errors --------------------\
        #
        if (is_callable($renderer))
            $result = call_user_func($renderer, $Template, $vars);
        else
            ### its renderer instance
            $result = $renderer->capture($Template, $vars);
        #
        if ($ex = ErrorStack::handleDone()) throw $ex; // --------------/


        return $result;
    }
920750
public static <T> GenericResponseBuilder<T> ok(T entity, MediaType type) {
    return ok(entity).type(type);
  }
411903
public String render() {
        try {
            DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();

            // root elements
            doc = docBuilder.newDocument();
            rootElement = doc.createElement("application");
            Element element;
            rootElement.setAttribute("xmlns", "http://java.sun.com/xml/ns/javaee");
            rootElement.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
            rootElement.setAttribute("xsi:schemaLocation",
                    "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd");
            rootElement.setAttribute("version", "6");
            doc.appendChild(rootElement);

            element = doc.createElement("description");
            element.setTextContent("Autogenerated deployment for " + basename);
            rootElement.appendChild(element);

            element = doc.createElement("display-name");
            element.setTextContent(basename + "-full");
            rootElement.appendChild(element);

            for (String filename : ejbs) {
                writeEjbModule(filename);
            }

            for (Map.Entry<String, String> entry : webs) {
                writeWebModule(entry.getKey(), entry.getValue());
            }

            element = doc.createElement("library-directory");
            element.setTextContent("lib");
            rootElement.appendChild(element);

            TransformerFactory transformerFactory = TransformerFactory.newInstance();
            Transformer transformer = transformerFactory.newTransformer();
            DOMSource source = new DOMSource(doc);
            ByteArrayOutputStream bytes = new ByteArrayOutputStream();
            StreamResult result = new StreamResult(bytes);
            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
            transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
            transformer.transform(source, result);

            return bytes.toString();
        } catch (TransformerException ex) {
            throw new IllegalStateException(ex);
        } catch (ParserConfigurationException ex) {
            throw new IllegalStateException(ex);
        }
    }
593766
public function compile()
    {
        $requestHandler = $this->getRequestHandler();

        $encodedData = $this->encodeData($this->getParams());
        $requestHandler->setRawBody($encodedData);

        $response = $requestHandler->send();
        $xml = new \SimpleXMLElement($response->getBody());
        $data = $this->parseXml($xml);

        return $this->buildResponse($data);
    }
1111617
public function render()
    {
        $this->templateVariableContainer->add($this->arguments[self::ARGUMENT_AS], $this->metaRepository->findAssociationRepertoires()->getRepertoires());
        $output = $this->renderChildren();
        $this->templateVariableContainer->remove($this->arguments[self::ARGUMENT_AS]);

        return $output;
    }
151942
public static <T> GenericResponseBuilder<T> accepted(T entity) {
    return genericResponseBuilderFactory.create(Response.Status.ACCEPTED.getStatusCode(), entity);
  }
1182969
def render(self, data, accepted_media_type=None, renderer_context=None):
        
        self.accepted_media_type = accepted_media_type or ''
        self.renderer_context = renderer_context or {}

        template = loader.get_template(self.template)
        context = self.get_context(data, accepted_media_type, renderer_context)
        ret = template_render(template, context, request=renderer_context['request'])

        # Munge DELETE Response code to allow us to return content
        # (Do this *after* we've rendered the template so that we include
        # the normal deletion response code in the output)
        response = renderer_context['response']
        if response.status_code == status.HTTP_204_NO_CONTENT:
            response.status_code = status.HTTP_200_OK

        return ret
720130
final function render()
    {
        if ($this->_c__isNowRendering)
            return '';

        $this->_c__isNowRendering = true;


        # Render Bind View Models:
        #
        $makeCopyOfCurrentQueue = clone $this->queue;
        foreach($this->queue as $vc)
        {
            /** @var DecorateViewModel $vc */

            try
            {
                $vc->delegateRenderBy($this, $this->nextRoot);
                // prepare bind view model result into parent model
                $vc->assertRenderResult(
                    $vc_render = $vc->render()
                    , $this
                );

                if ( $vc->isFinal() )
                    $rFinal = (string) $vc_render;
            }
            catch (\Exception $e) {
                ## set render flag to false, render job is done
                $this->_c__isNowRendering = false;
                throw $e;
            }
        }

        $this->queue = $makeCopyOfCurrentQueue;
        $this->_c__isNowRendering = false;


        if ( isset($rFinal) )
            return $rFinal;

        # Then Render Self ...
        ## ... implement on extend classes
        return $this->_view->render();
    }
484831
private static void render(final Throwable throwable, final StringBuilder builder) {
		builder.append(throwable.getClass().getName());
		String message = throwable.getMessage();
		if (message != null) {
			builder.append(": ");
			builder.append(message);
		}

		StackTraceElement[] stackTrace = throwable.getStackTrace();
		for (int i = 0; i < stackTrace.length; ++i) {
			builder.append(NEW_LINE);
			builder.append("\tat ");
			builder.append(stackTrace[i]);
		}

		Throwable cause = throwable.getCause();
		if (cause != null) {
			builder.append(NEW_LINE);
			builder.append("Caused by: ");
			render(cause, builder);
		}
	}
397517
def render_to_response(self, context, **response_kwargs):
        
        return HttpResponse(json.dumps(context, cls=JSON_ENCODER), 
                            content_type='application/json',
                            **response_kwargs)
634422
public function render()
    {
        if ($this->isAfterLastPage()) {
            $this->invokeFinishers();
            $parentResponse = $this->response->getParentResponse();
            if ($parentResponse !== null) {
                foreach ($this->response->getHeaders()->getAll() as $key => $value) {
                    $parentResponse->getHeaders()->set($key, $value, true);
                }
            }
            return $this->response->getContent();
        }

        $this->formState->setLastDisplayedPageIndex($this->currentPage->getIndex());

        if ($this->formDefinition->getRendererClassName() === null) {
            throw new RenderingException(sprintf('The form definition "%s" does not have a rendererClassName set.', $this->formDefinition->getIdentifier()), 1326095912);
        }
        $rendererClassName = $this->formDefinition->getRendererClassName();
        $renderer = new $rendererClassName();
        if (!($renderer instanceof RendererInterface)) {
            throw new RenderingException(sprintf('The renderer "%s" des not implement RendererInterface', $rendererClassName), 1326096024);
        }

        $controllerContext = $this->getControllerContext();
        $renderer->setControllerContext($controllerContext);

        $renderer->setFormRuntime($this);
        return $renderer->renderRenderable($this);
    }
276667
public static GenericResponseBuilderFactory newInstance() {
    ServiceLoader<GenericResponseBuilderFactory> clientBuilderFactoryLoader =
        ServiceLoader.load(GenericResponseBuilderFactory.class);

    Iterator<GenericResponseBuilderFactory> iterator = clientBuilderFactoryLoader.iterator();

    if (!iterator.hasNext()) {
      throw new IllegalStateException(
          "An implementation of GenericResponseBuilderFactory was not found");
    }

    return iterator.next();
  }
597881
def render_response(self):
        
        # Use whatever renderers are defined for name and value.
        # (.attributes() is responsible for all other rendering.)
        name, value = self.name, self.value
        renderer = self.attribute_renderers.get('name', None)
        if renderer:
            name = renderer(name)
        renderer = self.attribute_renderers.get('value', None)
        if renderer:
            value = renderer(value)
        return '; '.join(
            ['{0}={1}'.format(name, value)] +
            [key if isinstance(val, bool) else '='.join((key, val))
             for key, val in self.attributes().items()]
        )
361394
@SneakyThrows
    public static void render(final Object model, final HttpServletResponse response) {
        val jsonConverter = new MappingJackson2HttpMessageConverter();
        jsonConverter.setPrettyPrint(true);
        val jsonMimeType = MediaType.APPLICATION_JSON;
        jsonConverter.write(model, jsonMimeType, new ServletServerHttpResponse(response));
    }
413138
def _render_response(self, value, system):
        
        super_call = super(DefaultResponseRendererMixin, self)._render_response
        try:
            method_name = 'render_{}'.format(system['request'].action)
        except (KeyError, AttributeError):
            return super_call(value, system)
        method = getattr(self, method_name, None)
        if method is not None:
            common_kw = self._get_common_kwargs(system)
            response = method(value, system, common_kw)
            system['request'].response = response
            return
        return super_call(value, system)
745940
def render(self, **kwargs):
        """"""
        return self._template.render(this=self, kwargs=kwargs)