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_ametysObjectResolverAmetys object resolverprotected ConvertExternalResource2ImagesComponent_externalResourceComponentAttachment 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 intgetPriority()Get the priority of this handlervoidservice(ServiceManager serviceManager)Sourcesetup(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:
servicein interfaceServiceable- Overrides:
servicein classAbstractResourceHandler- Throws:
ServiceException
-
getPriority
public int getPriority()
Description copied from interface:ResourceHandlerGet the priority of this handler- Specified by:
getPriorityin interfaceResourceHandler- Overrides:
getPriorityin 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:ResourceHandlerInitialize the resource handler with a resource.- Specified by:
setupin interfaceResourceHandler- Overrides:
setupin 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
-
-