Package com.github.dandelion.core.asset

Examples of com.github.dandelion.core.asset.Asset.toLog()


   */
  @Override
  protected void doProcess(Reader reader, Writer writer, ProcessingContext processingContext) throws Exception {
    Asset asset = processingContext.getAsset();
    String contextPath = processingContext.getRequest().getContextPath();
    LOG.debug("Processing {}", asset.toLog());
    urlRewriter.setContextPath(contextPath);

    StringBuilder assetContent = StringBuilderUtils.toStringBuilder(reader);

    BufferedWriter bufferedWriter = null;
View Full Code Here


      bufferedWriter = new BufferedWriter(writer);
      bufferedWriter.write(urlRewriter.rewriteUrl("/" + contextPath + asset.getConfigLocation(),
          asset.getFinalLocation(), assetContent.toString()).toString());
    }
    catch (IOException e) {
      LOG.error("An error occurred when processing relative paths inside the asset " + asset.toLog());
      throw DandelionException.wrap(e);
    }
    finally {
      try {
        if (reader != null)
View Full Code Here

        if (reader != null)
          reader.close();
      }
      catch (IOException e) {
        // Should never happen
        LOG.error("An error occurred when processing relative paths inside the asset " + asset.toLog());
        throw DandelionException.wrap(e);
      }

      // Flush and closes the stream
      bufferedWriter.close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.