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: 
 - PluginComponent, PolicyFilter, ThumbnailPolicyFilter, Comparable
 
public class DefaultThumbnailPolicyFilter
- extends BasicThumbnailPolicyFilter
 
This class allow users to customize behaviour of widgets
 by re-writing call-back methods.
- Since:
 
  - jcms-5.5.0
 
- Version:
 
  - $Revision: 25477 $
 
- Author:
 
  - Jean-Philippe Encausse
 
 
 
 
| 
Method Summary | 
 boolean | 
createThumbnail(FileDocument doc,
                File dest,
                ImageFormat format,
                int maxWidth,
                int maxHeight,
                String background,
                boolean done)
 
          This method is a hook called by Thumbnail tag to generate a
 thumbnail of the given FileDocument. | 
 boolean | 
createThumbnail(File src,
                File dest,
                ImageFormat format,
                int maxWidth,
                int maxHeight,
                String background,
                boolean done)
 
          This method is a hook called by Thumbnail tag to generate a
 thumbnail of the given source file. | 
 boolean | 
createThumbnail(URL url,
                File dest,
                ImageFormat format,
                int maxWidth,
                int maxHeight,
                String background,
                boolean done)
 
          This method is a hook called by Thumbnail tag to generate a
 thumbnail of the given URL. | 
 boolean | 
isValidImageSize(File imgFile,
                 long width,
                 long height)
 
            | 
 boolean | 
supportsThumbnail(FileDocument doc)
 
            | 
 
 
 
 
 
REVISION
public static final String REVISION
- See Also:
 - Constant Field Values
 
DefaultThumbnailPolicyFilter
public DefaultThumbnailPolicyFilter()
createThumbnail
public boolean createThumbnail(File src,
                               File dest,
                               ImageFormat format,
                               int maxWidth,
                               int maxHeight,
                               String background,
                               boolean done)
- Description copied from interface: 
ThumbnailPolicyFilter 
- This method is a hook called by Thumbnail tag to generate a
 thumbnail of the given source file.
- Specified by:
 createThumbnail in interface ThumbnailPolicyFilter- Overrides:
 createThumbnail in class BasicThumbnailPolicyFilter
 
- 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 maxHeightdone - the global plugin createThumbnail() status
- Returns:
 - true on success, or false if the thumbnail could not be created
 - See Also:
 ThumbnailPolicyFilter.createThumbnail(File, File, ImageFormat, int, int, String, boolean)
 
 
isValidImageSize
public boolean isValidImageSize(File imgFile,
                                long width,
                                long height)
- See Also:
 ThumbnailPolicyFilter.isValidImageSize(File, long, long, boolean)
 
supportsThumbnail
public boolean supportsThumbnail(FileDocument doc)
- See Also:
 ThumbnailPolicyFilter.supportsThumbnail(FileDocument, boolean)
 
createThumbnail
public boolean createThumbnail(FileDocument doc,
                               File dest,
                               ImageFormat format,
                               int maxWidth,
                               int maxHeight,
                               String background,
                               boolean done)
- Description copied from interface: 
ThumbnailPolicyFilter 
- This method is a hook called by Thumbnail tag to generate a
 thumbnail of the given FileDocument.
- Specified by:
 createThumbnail in interface ThumbnailPolicyFilter- Overrides:
 createThumbnail in class BasicThumbnailPolicyFilter
 
- 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 maxHeightdone - the global plugin createThumbnail() status
- Returns:
 - true on success, or false if the thumbnail could not be created
 - See Also:
 ThumbnailPolicyFilter.createThumbnail(FileDocument, File, ImageFormat, int, int, String, boolean)
 
 
createThumbnail
public boolean createThumbnail(URL url,
                               File dest,
                               ImageFormat format,
                               int maxWidth,
                               int maxHeight,
                               String background,
                               boolean done)
- Description copied from interface: 
ThumbnailPolicyFilter 
- This method is a hook called by Thumbnail tag to generate a
 thumbnail of the given URL.
- Specified by:
 createThumbnail in interface ThumbnailPolicyFilter- Overrides:
 createThumbnail in class BasicThumbnailPolicyFilter
 
- 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 maxHeightdone - the global plugin createThumbnail() status
- Returns:
 - true on success, or false if the thumbnail could not be created
 - See Also:
 ThumbnailPolicyFilter.createThumbnail(URL, File, ImageFormat, int, int, String, boolean)
 
 
Copyright © 2001-2007 Jalios SA. All Rights Reserved.