Package org.bladerunnerjs.plugin

Examples of org.bladerunnerjs.plugin.CharResponseContent


     
      try (Writer writer =  new OutputStreamWriter(byteArrayOutputStream, BladerunnerConf.OUTPUT_ENCODING)) {
        browsableNode.filterIndexPage(indexPageContent.toString(), locale, version, writer, requestMode);
      }

      return new CharResponseContent( browsableNode.root(), byteArrayOutputStream.toString() );
    }
    catch (IOException | ConfigException | ModelOperationException e) {
      throw new ContentProcessingException(e, "Error when trying to write the index page for " + RelativePathUtility.get(app.root().getFileInfoAccessor(), browsableNode.root().dir(), indexPage));
    }
  }
View Full Code Here


     
      localeForwardingPage.write("\n</script>\n");
      localeForwardingPage.write("</head>\n");
      localeForwardingPage.write("<body onload='forwardToLocalePage()'></body>\n");
     
      return new CharResponseContent( app.root(), localeForwardingPage.toString() );
    }
    catch (IOException | ConfigException | MalformedTokenException | MalformedRequestException e) {
      throw new ContentProcessingException(e);
    }
  }
View Full Code Here

  }

  @Override
  public ResponseContent handleRequest(ParsedContentPath contentPath, BundleSet bundleSet, UrlContentAccessor contentAccessor, String version) throws ContentProcessingException
  {
    return new CharResponseContent( bundleSet.getBundlableNode().root(), this.getClass().getCanonicalName() );
  }
View Full Code Here

  }

  @Override
  public ResponseContent handleRequest(ParsedContentPath contentPath, BundleSet bundleSet, UrlContentAccessor contentAccessor, String version) throws ContentProcessingException
  {
    return new CharResponseContent( bundleSet.getBundlableNode().root(), this.getClass().getCanonicalName() );
  }
View Full Code Here

  }

  @Override
  public ResponseContent handleRequest(ParsedContentPath contentPath, BundleSet bundleSet, UrlContentAccessor contentAccessor, String version) throws ContentProcessingException
  {
    return new CharResponseContent( bundleSet.getBundlableNode().root(), this.getClass().getCanonicalName() );
  }
View Full Code Here

  }

  @Override
  public ResponseContent handleRequest(ParsedContentPath contentPath, BundleSet bundleSet, UrlContentAccessor contentAccessor, String version) throws ContentProcessingException
  {
    return new CharResponseContent( bundleSet.getBundlableNode().root(), this.getClass().getCanonicalName() );
  }
View Full Code Here

      String bundlePath = AppMetadataUtility.getRelativeVersionedBundlePath(version, "").replaceFirst("/$", "");
      String xmlBundlePathToken = AppMetadataUtility.XML_BUNDLE_PATH_TOKEN;
      //TODO: Can we do a streaming replacement rather than buffer into  string?
      String result = bufferedOutput.toString().replace(xmlBundlePathToken, bundlePath);
     
      return new CharResponseContent(brjs, result);
    }
    catch(    XMLStreamException  e) {
      throw new ContentProcessingException(e, "Error while processing XML assets '" );
    }
  }
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.plugin.CharResponseContent

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.