Package com.jalios.jcms.thumbnail
Class ThumbnailPolicyManager
- java.lang.Object
-
- com.jalios.jcms.policy.AbstractPolicyManager<ThumbnailPolicyFilter>
-
- com.jalios.jcms.thumbnail.ThumbnailPolicyManager
-
- All Implemented Interfaces:
JPropertiesListener
public class ThumbnailPolicyManager extends AbstractPolicyManager<ThumbnailPolicyFilter> implements JPropertiesListener
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
createThumbnail(FileDocument doc, java.io.File dest, ImageFormat format, int maxWidth, int maxHeight, java.lang.String background, boolean square)
boolean
createThumbnail(java.io.File src, java.io.File dest, ImageFormat format, int maxWidth, int maxHeight, java.lang.String background, boolean square)
boolean
createThumbnail(java.net.URL url, java.io.File dest, ImageFormat format, int maxWidth, int maxHeight, java.lang.String background, boolean square)
static ThumbnailPolicyManager
getInstance()
protected java.lang.String
getStatusXmlTagName()
void
initFromProperties()
boolean
isValidImageSize(java.io.File imgFile, long width, long height, boolean jcms)
void
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.boolean
supportsThumbnail(FileDocument doc, boolean jcms)
-
Methods inherited from class com.jalios.jcms.policy.AbstractPolicyManager
addPolicyFilter, getPolicyFilters, getPolicyFiltersMap, handleException, removePolicyFilter, replacePolicyFilter
-
-
-
-
Method Detail
-
getInstance
public static final ThumbnailPolicyManager getInstance()
-
getStatusXmlTagName
protected java.lang.String getStatusXmlTagName()
- Specified by:
getStatusXmlTagName
in classAbstractPolicyManager<ThumbnailPolicyFilter>
-
createThumbnail
public boolean createThumbnail(java.io.File src, java.io.File dest, ImageFormat format, int maxWidth, int maxHeight, java.lang.String background, boolean square)
-
isValidImageSize
public boolean isValidImageSize(java.io.File imgFile, long width, long height, boolean jcms)
-
supportsThumbnail
public boolean supportsThumbnail(FileDocument doc, boolean jcms)
-
createThumbnail
public boolean createThumbnail(FileDocument doc, java.io.File dest, ImageFormat format, int maxWidth, int maxHeight, java.lang.String background, boolean square)
-
createThumbnail
public boolean createThumbnail(java.net.URL url, java.io.File dest, ImageFormat format, int maxWidth, int maxHeight, java.lang.String background, boolean square)
-
propertiesChange
public void propertiesChange(JProperties properties)
Description copied from interface:JPropertiesListener
Invoked after properties have been modified in JCMS and save on disk.You cannot alter the value received in parameters.
Note that properties parameter may be null, a limited set of site properties, or all site properties.
To check that a property has been modified, reload the "current" property instead using
channel.getProperties
orchannel.getProperty
.- Specified by:
propertiesChange
in interfaceJPropertiesListener
- Parameters:
properties
- the properties which have been submitted to change
-
initFromProperties
public void initFromProperties()
-
-