Package org.ametys.plugins.flipbook
Class Resource2FlipbookUriResolver
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.transformation.AbstractURIResolver
org.ametys.cms.transformation.ResourceURIResolver
org.ametys.web.editor.ResourceURIResolver
org.ametys.plugins.flipbook.Resource2FlipbookUriResolver
- All Implemented Interfaces:
URIResolver,PluginAware,Configurable,Contextualizable,LogEnabled,Serviceable
public class Resource2FlipbookUriResolver
extends ResourceURIResolver
implements PluginAware, Configurable
URIResolver for type "explorer-flipbook".These links point to a document file from the resource explorer converted to flash.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe plugin name.protected ConvertResource2ImagesComponentThe cache resource component.protected StringThe type.Fields inherited from class org.ametys.web.editor.ResourceURIResolver
_webPrefixHandlerFields inherited from class org.ametys.cms.transformation.ResourceURIResolver
_context, _prefixHandler, _resolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Configuration configuration) getType()Returns the type of links handled by thisURIResolver.Resolves a link URI for rendering purposes.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser.resolveBoundedImage(String uri, int maxHeight, int maxWidth, boolean download, boolean absolute, boolean internal) Resolves a link URI for rendering image.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser.resolveImage(String uri, int height, int width, boolean download, boolean absolute, boolean internal) Resolves a link URI for rendering image.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser.voidservice(ServiceManager serviceManager) voidsetPluginInfo(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.Methods inherited from class org.ametys.web.editor.ResourceURIResolver
_getSiteName, getRealPrefix, getResourcePath, getUriPrefixMethods inherited from class org.ametys.cms.transformation.ResourceURIResolver
_resolve, checkLink, contextualize, getLabel, resolveImageAsBase64Methods inherited from class org.ametys.cms.transformation.AbstractURIResolver
resolveBoundedImageAsBase64, resolveCroppedImage, resolveCroppedImageAsBase64, resolveImageAsBase64Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_pluginName
The plugin name. -
_type
The type. -
_resourceComponent
The cache resource component.
-
-
Constructor Details
-
Resource2FlipbookUriResolver
public Resource2FlipbookUriResolver()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classResourceURIResolver- Throws:
ServiceException
-
setPluginInfo
Description copied from interface:PluginAwareSets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfoin interfacePluginAware- Parameters:
pluginName- Unique identifier for the plugin hosting the extensionfeatureName- Unique feature identifier (unique for a given pluginName)id- Unique identifier of this component
-
configure
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
getType
Description copied from interface:URIResolverReturns the type of links handled by thisURIResolver.- Specified by:
getTypein interfaceURIResolver- Overrides:
getTypein classResourceURIResolver- Returns:
- the type of links handled by this
URIResolver.
-
resolve
Description copied from interface:URIResolverResolves a link URI for rendering purposes.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser.- Specified by:
resolvein interfaceURIResolver- Overrides:
resolvein classAbstractURIResolver- Parameters:
uri- the link URI.download- true if the pointed resource is to be downloaded.absolute- true if the url must be absoluteinternal- true to get an internal URI.- Returns:
- the path to the resource.
-
resolveImage
public String resolveImage(String uri, int height, int width, boolean download, boolean absolute, boolean internal) Description copied from interface:URIResolverResolves a link URI for rendering image.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser.- Specified by:
resolveImagein interfaceURIResolver- Overrides:
resolveImagein classAbstractURIResolver- Parameters:
uri- the link URI.height- the height of the image.width- the width of the imagedownload- true if the pointed resource is to be downloaded.absolute- true if the url must be absoluteinternal- true to get an internal URI.- Returns:
- the path to the image.
-
resolveBoundedImage
public String resolveBoundedImage(String uri, int maxHeight, int maxWidth, boolean download, boolean absolute, boolean internal) Description copied from interface:URIResolverResolves a link URI for rendering image.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser.- Specified by:
resolveBoundedImagein interfaceURIResolver- Overrides:
resolveBoundedImagein classAbstractURIResolver- Parameters:
uri- the link URI.maxHeight- the max heightmaxWidth- the max widthdownload- true if the pointed resource is to be downloaded.absolute- true if the url must be absoluteinternal- true to get an internal URI.- Returns:
- the path to the image.
-