Package org.ametys.plugins.flipbook
Class ConvertContentAttachment2ImagesComponent
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.flipbook.AbstractConvertDocument2ImagesComponent
org.ametys.plugins.flipbook.ConvertContentAttachment2ImagesComponent
- All Implemented Interfaces:
Initializable
,Component
,LogEnabled
,Serviceable
,ThreadSafe
public class ConvertContentAttachment2ImagesComponent
extends AbstractConvertDocument2ImagesComponent
Implementation of a
AbstractConvertDocument2ImagesComponent
for a content attachment-
Field Summary
Fields inherited from class org.ametys.plugins.flipbook.AbstractConvertDocument2ImagesComponent
_cocoonContext, _documentToImages, _resolver
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionPut the file in cachevoid
doCleanCache
(String path) Remove the image stored in cache that are associated with the resource path.void
doCleanCache
(Content content, String siteName) Remove content attachments image stored in the flipbook cache for the given content and sitenameMethods inherited from class org.ametys.plugins.flipbook.AbstractConvertDocument2ImagesComponent
cache, cleanCache, createImages, getCacheFile, initialize, isMimeTypeSupported, service
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
ROLE
Avalon ROLE.
-
-
Constructor Details
-
ConvertContentAttachment2ImagesComponent
-
-
Method Details
-
doCache
Put the file in cache- Parameters:
resource
- the resourcecontentName
- the name of the contentsiteName
- the name of the site- Returns:
- The absolute cache path
- Throws:
Exception
- if an error occurs while caching the file
-
doCleanCache
Remove content attachments image stored in the flipbook cache for the given content and sitename- Parameters:
content
- the linked contentsiteName
- the sitename
-
doCleanCache
Remove the image stored in cache that are associated with the resource path. If the provided resource path doesn't point to a content attachment, calling this method will have no effect.- Parameters:
path
- the JCR path of the resource to clean
-