Package org.ametys.plugins.flipbook
Class PdfCoverResourceHandler
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.resources.AbstractResourceHandler
-
- org.ametys.core.resources.ImageResourceHandler
-
- org.ametys.plugins.flipbook.PdfCoverResourceHandler
-
- All Implemented Interfaces:
ResourceHandler
,LogEnabled
,Component
,Configurable
,Contextualizable
,Serviceable
public class PdfCoverResourceHandler extends ImageResourceHandler
Resource handler for pdf resources files
-
-
Field Summary
Fields Modifier and Type Field Description protected AmetysObjectResolver
_ametysObjectResolver
Ametys object resolverprotected ConvertExternalResource2ImagesComponent
_externalResourceComponent
Attachment componentprivate static Pattern
_RESOURCE_PATH_PATTERN
-
Fields inherited from class org.ametys.core.resources.AbstractResourceHandler
_cocoonContext, _context, _resolver, _supportedSuffixes
-
Fields inherited from interface org.ametys.core.resources.ResourceHandler
MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description PdfCoverResourceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPriority()
Get the priority of this handlervoid
service(ServiceManager serviceManager)
Source
setup(String location, Map objectModel, Parameters par, Map<String,Object> additionalParameters)
Initialize the resource handler with a resource.-
Methods inherited from class org.ametys.core.resources.ImageResourceHandler
generateResource, getKey
-
Methods inherited from class org.ametys.core.resources.AbstractResourceHandler
configure, contextualize, getLastModified, getMimeType, getSize, getValidity, isSupported
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_RESOURCE_PATH_PATTERN
private static final Pattern _RESOURCE_PATH_PATTERN
-
_externalResourceComponent
protected ConvertExternalResource2ImagesComponent _externalResourceComponent
Attachment component
-
_ametysObjectResolver
protected AmetysObjectResolver _ametysObjectResolver
Ametys object resolver
-
-
Constructor Detail
-
PdfCoverResourceHandler
public PdfCoverResourceHandler()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractResourceHandler
- Throws:
ServiceException
-
getPriority
public int getPriority()
Description copied from interface:ResourceHandler
Get the priority of this handler- Specified by:
getPriority
in interfaceResourceHandler
- Overrides:
getPriority
in classAbstractResourceHandler
- Returns:
- the priority. The bigger the highest priority
-
setup
public Source setup(String location, Map objectModel, Parameters par, Map<String,Object> additionalParameters) throws IOException, ProcessingException
Description copied from interface:ResourceHandler
Initialize the resource handler with a resource.- Specified by:
setup
in interfaceResourceHandler
- Overrides:
setup
in classImageResourceHandler
- Parameters:
location
- The source uriobjectModel
- The object modelpar
- The parametersadditionalParameters
- Additional parameters that can be filled, and will be transmitted to getKey, getValidity and generateResource- Returns:
- the resolved source
- Throws:
IOException
- If an error occursProcessingException
- If an error occurs
-
-