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

java.lang.Object
  extended by ro.isdc.wro.model.resource.processor.support.ImageUrlRewriter

public class ImageUrlRewriter
extends Object

Responsible for computing the url of the images from css based on the location of the css where they are located.

Since:
1.7.0
Author:
Alex Objelean

Nested Class Summary
static class ImageUrlRewriter.RewriterContext
          Holds the properties required by this class to perform rewrite operation.
 
Constructor Summary
ImageUrlRewriter(ImageUrlRewriter.RewriterContext context)
           
 
Method Summary
 String rewrite(String cssUri, String imageUrl)
          Computes the url of the image to be replaced in a css resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageUrlRewriter

public ImageUrlRewriter(ImageUrlRewriter.RewriterContext context)
Method Detail

rewrite

public String rewrite(String cssUri,
                      String imageUrl)
Computes the url of the image to be replaced in a css resource.

Parameters:
cssUri - the uri of the css where the image is located.
imageUrl - the url of the image (relative or absolute).
Returns:
replaced url of the image.


Copyright © 2008-2013. All Rights Reserved.