Package com.medallia.spider.api.StRenderable

Examples of com.medallia.spider.api.StRenderable.PostAction


  /** render the given embedded task (recursively) */
  private void renderEmbedded(EmbeddedRenderTask t, DynamicInputImpl dynamicInput, RequestHandler request, List<EmbeddedContent> embeddedContent) {
    for (EmbeddedRenderTask ert : t.dependsOn())
      renderEmbedded(ert, dynamicInput, request, embeddedContent);

    PostAction po = render(t, dynamicInput, request, null, "embedded/");
    if (po instanceof StRenderPostAction)
      embeddedContent.add(new EmbeddedContent(t, (StRenderPostAction) po));
    else
      throw new RuntimeException("EmbeddedRenderTask returned unsupported PostAction " + po);
  }
View Full Code Here


    throw new RuntimeException("Cannot find template " + name);
  }
 
  /** render the given task and write the output to the response */
  private void renderFinal(ITask t, HttpServletRequest req, DynamicInputImpl dynamicInput, RequestHandler request, List<EmbeddedContent> embeddedContent, HttpServletResponse res) throws IOException {
    PostAction po = render(t, dynamicInput, request, embeddedContent, "pages/");
   
    if (po instanceof CustomPostAction) {
      ((CustomPostAction)po).respond(req, res);
     
    } else if (po instanceof StRenderPostAction) {
View Full Code Here

    };
   
    ObjectProvider injector = makeObjectProvider(request);

    long nt = System.nanoTime();
    PostAction po = renderer.actionAndRender(injector, makeLifecycleHandlerSet(request), dynamicInput);
    log.info("StRender of " + t.getClass().getSimpleName() + " in " + TimeUnit.MILLISECONDS.convert(System.nanoTime() - nt, TimeUnit.NANOSECONDS) + " ms");
    return po;
  }
View Full Code Here

   * @param dynamicInput provider for request input parameters
   * @return result of the action and render
   * @throws MissingAttributesException if the template referenced any attributes not set by the action method
   */
  public PostAction actionAndRender(ObjectProvider injector, LifecycleHandlerSet hs, DynamicInputImpl dynamicInput) throws MissingAttributesException {
    PostAction pa = invokeAction(injector, hs, dynamicInput);
    return pa == null ? defaultPostAction() : render(pa);
  }
View Full Code Here

   * @param inputParams the request parameters
   * @return result of the action and render
   * @throws MissingAttributesException if the template referenced any attributes not set by the action method
   */
  public PostAction actionAndRender(ObjectProvider injector, LifecycleHandlerSet hs, Map<String, String[]> inputParams) throws MissingAttributesException {
    PostAction pa = invokeAction(injector, hs, inputParams);
    return pa == null ? defaultPostAction() : render(pa);
  }
View Full Code Here

  /** render the given embedded task (recursively) */
  private void renderEmbedded(EmbeddedRenderTask t, Map<String, String[]> reqParams, RequestHandler request, List<EmbeddedContent> embeddedContent) {
    for (EmbeddedRenderTask ert : t.dependsOn())
      renderEmbedded(ert, reqParams, request, embeddedContent);

    PostAction po = render(t, reqParams, request, null, "embedded/");
    if (po instanceof StRenderPostAction)
      embeddedContent.add(new EmbeddedContent(t, (StRenderPostAction) po));
    else
      throw new RuntimeException("EmbeddedRenderTask returned unsupported PostAction " + po);
  }
View Full Code Here

    throw new RuntimeException("Cannot find template " + name);
  }
 
  /** render the given task and write the output to the response */
  private void renderFinal(ITask t, HttpServletRequest req, Map<String, String[]> reqParams, RequestHandler request, List<EmbeddedContent> embeddedContent, HttpServletResponse res) throws IOException {
    PostAction po = render(t, reqParams, request, embeddedContent, "pages/");
   
    if (po instanceof CustomPostAction) {
      ((CustomPostAction)po).respond(req, res);
     
    } else if (po instanceof StRenderPostAction) {
View Full Code Here

    registerInputArgParser(renderer);
   
    ObjectProvider injector = makeObjectProvider(request);

    long nt = System.nanoTime();
    PostAction po = renderer.actionAndRender(injector, makeLifecycleHandlerSet(request), reqParams);
    log.info("StRender of " + t.getClass().getSimpleName() + " in " + TimeUnit.MILLISECONDS.convert(System.nanoTime() - nt, TimeUnit.NANOSECONDS) + " ms");
    return po;
  }
View Full Code Here

TOP

Related Classes of com.medallia.spider.api.StRenderable.PostAction

Copyright © 2018 www.massapicom. 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.