Package com.jalios.jcms.policy
Class DefaultThumbnailPolicyFilter
java.lang.Object
com.jalios.jcms.policy.AbstractPolicyFilter
com.jalios.jcms.policy.BasicThumbnailPolicyFilter
com.jalios.jcms.policy.DefaultThumbnailPolicyFilter
- All Implemented Interfaces:
GenericProvider,PluginComponent,PolicyFilter,ThumbnailPolicyFilter,Comparable
Deprecated.
the DefaultThumbnailPolicyFilter will be split to 3 independents ThumbnailPolicyFilter
This class allow users to customize behaviour of widgets
by re-writing call-back methods.
- Since:
- jcms-5.5.0
- Author:
- Jean-Philippe Encausse
-
Field Summary
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancreateThumbnail(FileDocument doc, File dest, ImageFormat format, int maxWidth, int maxHeight, String background, boolean square, boolean done) Deprecated.This method is a hook called by Thumbnail tag to generate a thumbnail of the given FileDocument.booleancreateThumbnail(File src, File dest, ImageFormat format, int maxWidth, int maxHeight, String background, boolean square, boolean done) Deprecated.This method is a hook called by Thumbnail tag to generate a thumbnail of the given source file.booleancreateThumbnail(URL url, File dest, ImageFormat format, int maxWidth, int maxHeight, String background, boolean square, boolean done) Deprecated.This method is a hook called by Thumbnail tag to generate a thumbnail of the given URL.booleanisValidImageSize(File imgFile, long width, long height) Deprecated.booleanDeprecated.Methods inherited from class com.jalios.jcms.policy.BasicThumbnailPolicyFilter
createThumbnail, createThumbnail, createThumbnail, createThumbnail, createThumbnail, createThumbnail, init, init, isValidImageSize, supportsThumbnailMethods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
compareTo, equals, getOrder, setOrderMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.jalios.jcms.GenericProvider
getLabel, getName, isInitialized
-
Constructor Details
-
DefaultThumbnailPolicyFilter
public DefaultThumbnailPolicyFilter()Deprecated.
-
-
Method Details
-
createThumbnail
public boolean createThumbnail(File src, File dest, ImageFormat format, int maxWidth, int maxHeight, String background, boolean square, boolean done) Deprecated.Description copied from interface:ThumbnailPolicyFilterThis method is a hook called by Thumbnail tag to generate a thumbnail of the given source file.- Specified by:
createThumbnailin interfaceThumbnailPolicyFilter- Overrides:
createThumbnailin classBasicThumbnailPolicyFilter- Parameters:
src- source file of which to create a thumbnaildest- destination file (the thumbnail to generate)format- the format of the file to generate as requested by the ThumbnailTagmaxWidth- the maximum width of the thumbnail to generatemaxHeight- the maximum height of the thumbnail to generatebackground- the background color (eg "FFFFFF") if sets the image dimension will be set maxWidth and maxHeightsquare- set to true to crop image into a square using the specified width during thumbnail creation.done- the global plugin createThumbnail() status- Returns:
- true on success, or false if the thumbnail could not be created
- See Also:
-
isValidImageSize
Deprecated.- Parameters:
imgFile- the image File being checked (only used for logging)width- the widht of the image (in pixel)height- the heigth of the image (in pixel)- Returns:
- true if the given dimension are valid, false otherwise
- See Also:
-
supportsThumbnail
Deprecated.- Parameters:
doc- the FileDocument to be checked- Returns:
- true if a thumbnail can be generated for the given document.
- See Also:
-
createThumbnail
public boolean createThumbnail(FileDocument doc, File dest, ImageFormat format, int maxWidth, int maxHeight, String background, boolean square, boolean done) Deprecated.Description copied from interface:ThumbnailPolicyFilterThis method is a hook called by Thumbnail tag to generate a thumbnail of the given FileDocument.- Specified by:
createThumbnailin interfaceThumbnailPolicyFilter- Overrides:
createThumbnailin classBasicThumbnailPolicyFilter- Parameters:
doc- FileDocument of which to create a thumbnaildest- destination file (the thumbnail to generate)format- the format of the file to generate as requested by the ThumbnailTagmaxWidth- the maximum width of the thumbnail to generatemaxHeight- the maximum height of the thumbnail to generatebackground- the background color (eg "FFFFFF") if sets the image dimension will be set maxWidth and maxHeightsquare- set to true to crop image into a square using the specified width during thumbnail creation.done- the global plugin createThumbnail() status- Returns:
- true on success, or false if the thumbnail could not be created
- See Also:
-
createThumbnail
public boolean createThumbnail(URL url, File dest, ImageFormat format, int maxWidth, int maxHeight, String background, boolean square, boolean done) Deprecated.Description copied from interface:ThumbnailPolicyFilterThis method is a hook called by Thumbnail tag to generate a thumbnail of the given URL.- Specified by:
createThumbnailin interfaceThumbnailPolicyFilter- Overrides:
createThumbnailin classBasicThumbnailPolicyFilter- Parameters:
url- the URL of which to create a thumbnaildest- destination file (the thumbnail to generate)format- the format of the file to generate as requested by the ThumbnailTagmaxWidth- the maximum width of the thumbnail to generatemaxHeight- the maximum height of the thumbnail to generatebackground- the background color (eg "FFFFFF") if sets the image dimension will be set maxWidth and maxHeightsquare- set to true to crop image into a square using the specified width during thumbnail creation.done- the global plugin createThumbnail() status- Returns:
- true on success, or false if the thumbnail could not be created
- See Also:
-