Class ImageUrlAccordingToHtmlSizeDirective
- java.lang.Object
-
- org.silverpeas.core.contribution.content.wysiwyg.service.directive.AbstractDirective
-
- org.silverpeas.core.contribution.content.wysiwyg.service.directive.ImageUrlAccordingToHtmlSizeDirective
-
- All Implemented Interfaces:
WysiwygContentTransformerDirective
public class ImageUrlAccordingToHtmlSizeDirective extends AbstractDirective
Transforms all URL of images to take into account theirs display size.- Author:
- Yohann Chastagnier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ImageUrlAccordingToHtmlSizeDirective.SrcTranslator
This interface permits to the different provider of images to translate an URL with given height and width.static class
ImageUrlAccordingToHtmlSizeDirective.SrcWithSizeParametersTranslator
Abstract implementation which centralizing the processing of an URL with parameters.
-
Constructor Summary
Constructors Constructor Description ImageUrlAccordingToHtmlSizeDirective()
ImageUrlAccordingToHtmlSizeDirective(Integer minWidth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
prepareReplacements(net.htmlparser.jericho.Source source, Map<String,String> replacements)
Prepares all replacements to perform.-
Methods inherited from class org.silverpeas.core.contribution.content.wysiwyg.service.directive.AbstractDirective
execute, modifyElementAttribute, modifyElementAttributes
-
-
-
-
Constructor Detail
-
ImageUrlAccordingToHtmlSizeDirective
public ImageUrlAccordingToHtmlSizeDirective()
-
ImageUrlAccordingToHtmlSizeDirective
public ImageUrlAccordingToHtmlSizeDirective(Integer minWidth)
-
-
Method Detail
-
prepareReplacements
public void prepareReplacements(net.htmlparser.jericho.Source source, Map<String,String> replacements)
Description copied from class:AbstractDirective
Prepares all replacements to perform.- Specified by:
prepareReplacements
in classAbstractDirective
- Parameters:
source
- the initial source content.replacements
- the map into which replacements MUST be specified. The key represents the occurrence into source, the value the replacements.
-
-