Class ImageRemapper

java.lang.Object
net.sf.basedb.clients.web.extensions.skin.ImageRemapper

public class ImageRemapper
extends Object
Remaps image URLs. Used by SkinAction:s to remap images to other versions.
Since:
3.4
Author:
nicklas
  • Field Details

  • Constructor Details

    • ImageRemapper

      public ImageRemapper()
      Creates a new image remapper.
  • Method Details

    • map

      public boolean map​(String src, String dest)
      Remap a source image to a destination image. The paths should be relative the context root and start with /. Null values are not ignored. Mappings that create a circular reference are ignored.
      Returns:
      TRUE if the mapping was accepted, FALSE if not
    • get

      public String get​(String src)
      Get the remapped image for the given source image. The path should be relative the context root and start with /.
      Returns:
      The remapped path or null if the image is not remapped
    • size

      public int size()
      Get the number of remapped images.
    • toString

      public String toString()
      Overrides:
      toString in class Object