Package org.exoplatform.commons.utils

Examples of org.exoplatform.commons.utils.PortalPrinter


   final public Writer getWriter() throws Exception
   {
      if (writer_ == null)
      {
         PortalPrinter printer = new PortalPrinter(response_.getOutputStream(), true, 30000);

         //
         if (HtmlValidator.DEBUG_MODE)
         {
            writer_ = new WriterPrinter(new HtmlValidator(printer));
View Full Code Here


         */

        PortalRequestContext prc = (PortalRequestContext) context;
        OutputStream responseOutputStream = prc.getResponse().getOutputStream();

        PortalPrinter parentWriter = new PortalPrinter(responseOutputStream, true, 5000);
        PortalPrinter childWriter = new PortalPrinter(responseOutputStream, true, 25000, true);

        context.setWriter(childWriter);
        processRender(uicomponent, context, "system:/groovy/portal/webui/workspace/UIPortalApplicationChildren.gtmpl");

        context.setWriter(parentWriter);
        processRender(uicomponent, context, "system:/groovy/portal/webui/workspace/UIPortalApplication.gtmpl");

        try {
            // flush the parent writer to the output stream so that we are really to accept the child content
            parentWriter.flushOutputStream();
            // now that the parent has been flushed, we can flush the contents of the child to the output
            childWriter.flushOutputStream();
        } catch (IOException ioe) {
            // We want to ignore the ClientAbortException since this is caused by the users
            // browser closing the connection and is not something we should be logging.
            if (!ioe.getClass().toString().contains("ClientAbortException")) {
                throw ioe;
View Full Code Here

   private PortletRequestContext createRequestContext(PortletRequest req, PortletResponse res,
      WebuiRequestContext parentAppRequestContext) throws IOException
   {
      String attributeName = getApplicationId() + "$PortletRequest";
      PortletRequestContext context = (PortletRequestContext)parentAppRequestContext.getAttribute(attributeName);
      PortalPrinter w = null;
      if (res instanceof RenderResponse)
      {
         RenderResponse renderRes = (RenderResponse)res;
         renderRes.setContentType("text/html; charset=UTF-8");
         w = new PortalPrinter(renderRes.getPortletOutputStream(), true, 0);
      }
      if (context != null)
      {
         context.init(w, req, res);
      }
View Full Code Here

        return request_.isUserInRole(roleUser);
    }

    public final Writer getWriter() throws Exception {
        if (writer_ == null) {
            writer_ = new PortalPrinter(response_.getOutputStream(), true, 30000);
        }
        return writer_;
    }
View Full Code Here

    public void processRender(UIStandaloneApplication uicomponent, WebuiRequestContext context) throws Exception {

        PortalRequestContext prc = (PortalRequestContext) context;
        OutputStream responseOutputStream = prc.getResponse().getOutputStream();

        PortalPrinter parentWriter = new PortalPrinter(responseOutputStream, true, 5000);
        PortalPrinter childWriter = new PortalPrinter(responseOutputStream, true, 25000, true);

        context.setWriter(childWriter);
        processRender(uicomponent, context, "system:/groovy/portal/webui/workspace/UIStandaloneApplicationChildren.gtmpl");

        context.setWriter(parentWriter);
        processRender(uicomponent, context, "system:/groovy/portal/webui/workspace/UIStandaloneApplication.gtmpl");

        try {
            // flush the parent writer to the output stream so that we are really to accept the child content
            parentWriter.flushOutputStream();
            // now that the parent has been flushed, we can flush the contents of the child to the output
            childWriter.flushOutputStream();
        } catch (IOException ioe) {
            // We want to ignore the ClientAbortException since this is caused by the users
            // browser closing the connection and is not something we should be logging.
            if (!ioe.getClass().toString().contains("ClientAbortException")) {
                throw ioe;
View Full Code Here

        return request_.isUserInRole(roleUser);
    }

    public final Writer getWriter() throws Exception {
        if (writer_ == null) {
            writer_ = new PortalPrinter(response_.getOutputStream(), true, 30000);
        }
        return writer_;
    }
View Full Code Here

        return request_.isUserInRole(roleUser);
    }

    public final Writer getWriter() throws Exception {
        if (writer_ == null) {
            writer_ = new PortalPrinter(response_.getOutputStream(), true, 30000);
        }
        return writer_;
    }
View Full Code Here

        return request_.isUserInRole(roleUser);
    }

    public final Writer getWriter() throws Exception {
        if (writer_ == null) {
            writer_ = new PortalPrinter(response_.getOutputStream(), true, 30000);
        }
        return writer_;
    }
View Full Code Here

   final public Writer getWriter() throws Exception
   {
      if (writer_ == null)
      {
         PortalPrinter printer = new PortalPrinter(response_.getOutputStream(), true, 30000);

         //
         if (HtmlValidator.DEBUG_MODE)
         {
            writer_ = new WriterPrinter(new HtmlValidator(printer));
View Full Code Here

     */
   
    PortalRequestContext prc = (PortalRequestContext) context;
    OutputStream responseOutputStream = prc.getResponse().getOutputStream();
   
    PortalPrinter parentWriter = new PortalPrinter(responseOutputStream, true, 5000);
    PortalPrinter childWriter = new PortalPrinter(responseOutputStream, true, 25000, true);
   
    context.setWriter(childWriter);
    processRender(uicomponent, context, "system:/groovy/portal/webui/workspace/UIPortalApplicationChildren.gtmpl");

    context.setWriter(parentWriter);
    processRender(uicomponent, context, "system:/groovy/portal/webui/workspace/UIPortalApplication.gtmpl");

      try
      {
         //flush the parent writer to the output stream so that we are really to accept the child content
         parentWriter.flushOutputStream();
         //now that the parent has been flushed, we can flush the contents of the child to the output
         childWriter.flushOutputStream();
      }
      catch (IOException ioe)
      {
         //We want to ignore the ClientAbortException since this is caused by the users
         //browser closing the connection and is not something we should be logging.
View Full Code Here

TOP

Related Classes of org.exoplatform.commons.utils.PortalPrinter

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.