Package org.bladerunnerjs.plugin

Examples of org.bladerunnerjs.plugin.ResponseContent


    if (contentPath.formName.equals(DEV_BUNDLE_REQUEST) || contentPath.formName.equals(PROD_BUNDLE_REQUEST)) {
      String minifierSetting = contentPath.properties.get("minifier-setting");
      MinifierPlugin minifierPlugin = brjs.plugins().minifierPlugin(minifierSetting);
     
      List<InputSource> inputSources = getInputSourcesFromOtherBundlers(contentPath, bundleSet, contentAccessor, version);
      ResponseContent content = new CharResponseContent( bundleSet.getBundlableNode().root(), minifierPlugin.minify(minifierSetting, inputSources) );
     
      closeInputSources(inputSources);
     
      return content;
    }
View Full Code Here


      localeForwardingPage.write("<script type='text/javascript'>\n");
     
      ContentPlugin appVersionContentPlugin = app.root().plugins().contentPlugin("app-meta");
      ContentPathParser appVersionContentPathParser = appVersionContentPlugin.getContentPathParser();
      String appVersionContentPath = appVersionContentPathParser.createRequest("app-meta-request");
      ResponseContent responseContent = appVersionContentPlugin.handleRequest(appVersionContentPathParser.parse(appVersionContentPath), bundleSet, contentAccessor, appVersionContentPath);
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      responseContent.write(baos);
      localeForwardingPage.write( baos.toString() );
     
      localeForwardingPage.write("\n");
      IOUtils.copy(localeForwarderReader, localeForwardingPage);
      localeForwardingPage.write("\n");     
View Full Code Here

  }
 
  public CommanderChainer requestReceived(final String requestPath, final StringBuffer response) throws MalformedRequestException, ResourceNotFoundException, ContentProcessingException, UnsupportedEncodingException {
    call(new Command() {
      public void call() throws Exception {
        ResponseContent contentOutput = app.handleLogicalRequest(requestPath, new StaticContentAccessor(app));
        ByteArrayOutputStream pluginContent = new ByteArrayOutputStream();
        contentOutput.write(pluginContent);
        response.append( pluginContent );
      }
    });
   
    return commanderChainer;
View Full Code Here

  }
 
  public CommanderChainer requestReceivedInDev(final String requestPath, final StringBuffer response) throws MalformedRequestException, ResourceNotFoundException, ContentProcessingException, UnsupportedEncodingException {
    call(new Command() {
      public void call() throws Exception {
        ResponseContent content = bundlableNode.handleLogicalRequest(requestPath, new StaticContentAccessor(bundlableNode.app()), bundlableNode.root().getAppVersionGenerator().getDevVersion());           
        ByteArrayOutputStream pluginContent = new ByteArrayOutputStream();
            content.write(pluginContent);
            response.append(pluginContent.toString(BladerunnerConf.OUTPUT_ENCODING));
      }
    });
   
    return commanderChainer;
View Full Code Here

  }
 
  public CommanderChainer requestReceivedInDev(final String requestPath, final OutputStream response) throws MalformedRequestException, ResourceNotFoundException, ContentProcessingException, UnsupportedEncodingException {
    call(new Command() {
      public void call() throws Exception {
        ResponseContent content = bundlableNode.handleLogicalRequest(requestPath, new StaticContentAccessor(bundlableNode.app()), bundlableNode.root().getAppVersionGenerator().getDevVersion());
            content.write(response);
      }
    });
   
    return commanderChainer;
  }
View Full Code Here

  }
 
  public CommanderChainer requestReceivedInProd(final String requestPath, final StringBuffer response) throws MalformedRequestException, ResourceNotFoundException, ContentProcessingException, UnsupportedEncodingException {
    call(new Command() {
      public void call() throws Exception {
        ResponseContent content = bundlableNode.handleLogicalRequest(requestPath, new StaticContentAccessor(bundlableNode.app()), bundlableNode.root().getAppVersionGenerator().getProdVersion());
            ByteArrayOutputStream pluginContent = new ByteArrayOutputStream();
            content.write(pluginContent);
            response.append(pluginContent);
      }
    });
   
    return commanderChainer;
View Full Code Here

  }
 
  public CommanderChainer requestReceivedInProd(final String requestPath, final OutputStream response) throws MalformedRequestException, ResourceNotFoundException, ContentProcessingException, UnsupportedEncodingException {
    call(new Command() {
      public void call() throws Exception {
        ResponseContent content = bundlableNode.handleLogicalRequest(requestPath, new StaticContentAccessor(bundlableNode.app()), bundlableNode.root().getAppVersionGenerator().getProdVersion());
            content.write(response);
      }
    });
   
    return commanderChainer;
  }
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.plugin.ResponseContent

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.