Package org.ametys.plugins.flipbook
Class ConvertExternalResource2ImagesComponent
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.flipbook.AbstractConvertDocument2ImagesComponent
-
- org.ametys.plugins.flipbook.ConvertExternalResource2ImagesComponent
-
- All Implemented Interfaces:
Initializable
,Component
,LogEnabled
,Serviceable
,ThreadSafe
public class ConvertExternalResource2ImagesComponent extends AbstractConvertDocument2ImagesComponent
Implementation of aAbstractConvertDocument2ImagesComponent
for an external resource
-
-
Field Summary
Fields Modifier and Type Field Description static String
ROLE
Avalon ROLE.-
Fields inherited from class org.ametys.plugins.flipbook.AbstractConvertDocument2ImagesComponent
_cocoonContext, _documentToImages, _resolver
-
-
Constructor Summary
Constructors Constructor Description ConvertExternalResource2ImagesComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private String
_getCacheDirectory(String path, String cacheDir)
String
doCache(Source resource, String path, String cacheDir, String name)
Put the file in cache-
Methods inherited from class org.ametys.plugins.flipbook.AbstractConvertDocument2ImagesComponent
cache, createImages, initialize, isMimeTypeSupported, service
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Constructor Detail
-
ConvertExternalResource2ImagesComponent
public ConvertExternalResource2ImagesComponent()
-
-
Method Detail
-
doCache
public String doCache(Source resource, String path, String cacheDir, String name) throws Exception
Put the file in cache- Parameters:
resource
- the resource to cachepath
- The resource pathcacheDir
- The cache directoryname
- The resource name- Returns:
- The absolute cache path
- Throws:
Exception
- if an error occurs while caching the file
-
_getCacheDirectory
private String _getCacheDirectory(String path, String cacheDir)
-
-