Package ro.isdc.wro.model.resource.processor.support.ImageUrlRewriter

Examples of ro.isdc.wro.model.resource.processor.support.ImageUrlRewriter.RewriterContext


   */
  @Override
  protected String replaceImageUrl(final String cssUri, final String imageUrl) {
    //Can be null when using standalone context.
    final String contextPath = context.getRequest() != null ? context.getRequest().getContextPath() : null;
    final RewriterContext rewriterContext = new RewriterContext().setAggregatedFolderPath(
        context.getAggregatedFolderPath()).setProxyPrefix(getUrlPrefix()).setContextPath(contextPath);

    return new ImageUrlRewriter(rewriterContext).rewrite(cssUri, imageUrl);
  }
View Full Code Here


    assertEquals(0, Context.countActive());
  }

  @Before
  public void setUp() {
    context = new RewriterContext();
    context.setProxyPrefix(DEFAULT_PREFIX);
    context.setContextPath(DEFAULT_CONTEXT_PATH);
    victim = new ImageUrlRewriter(context);
  }
View Full Code Here

    victim = new ImageUrlRewriter(context);
  }

  @Test(expected = NullPointerException.class)
  public void cannotAcceptNullProxyPrefix() {
    final RewriterContext context = new RewriterContext();
    context.setContextPath(DEFAULT_CONTEXT_PATH);
    new ImageUrlRewriter(context);
  }
View Full Code Here

TOP

Related Classes of ro.isdc.wro.model.resource.processor.support.ImageUrlRewriter.RewriterContext

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.