Class ImageUrlAccordingToHtmlSizeDirective.SrcWithSizeParametersTranslator
- java.lang.Object
-
- org.silverpeas.core.contribution.content.wysiwyg.service.directive.ImageUrlAccordingToHtmlSizeDirective.SrcWithSizeParametersTranslator
-
- All Implemented Interfaces:
ImageUrlAccordingToHtmlSizeDirective.SrcTranslator
- Direct Known Subclasses:
FileServer.ImageUrlAccordingToHtmlSizeDirectiveTranslator
- Enclosing class:
- ImageUrlAccordingToHtmlSizeDirective
public abstract static class ImageUrlAccordingToHtmlSizeDirective.SrcWithSizeParametersTranslator extends Object implements ImageUrlAccordingToHtmlSizeDirective.SrcTranslator
Abstract implementation which centralizing the processing of an URL with parameters.
-
-
Constructor Summary
Constructors Constructor Description SrcWithSizeParametersTranslator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
translateUrl(String url, String width, String height)
Translates the given URL to a new one which is taking into account the given width and the given height.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.contribution.content.wysiwyg.service.directive.ImageUrlAccordingToHtmlSizeDirective.SrcTranslator
isCompliantUrl
-
-
-
-
Method Detail
-
translateUrl
public String translateUrl(String url, String width, String height)
Description copied from interface:ImageUrlAccordingToHtmlSizeDirective.SrcTranslator
Translates the given URL to a new one which is taking into account the given width and the given height.ImageUrlAccordingToHtmlSizeDirective.SrcTranslator.isCompliantUrl(String)
MUST be verified before calling this method.- Specified by:
translateUrl
in interfaceImageUrlAccordingToHtmlSizeDirective.SrcTranslator
- Parameters:
url
- an URL as string.width
- a width which could be an empty string to represent no width.height
- a height which could be an empty string to represent no height.- Returns:
- the translated URL as string.
-
-