Package org.ametys.web.editor
Class PageAttachmentURIResolver
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.transformation.AbstractURIResolver
org.ametys.cms.transformation.AttachmentURIResolver
org.ametys.web.editor.AttachmentURIResolver
org.ametys.web.editor.PageAttachmentURIResolver
- All Implemented Interfaces:
URIResolver,Contextualizable,LogEnabled,Serviceable
URIResolver for type "attachment-page".These links point to a file from the attachments of the current Page.
-
Field Summary
Fields inherited from class org.ametys.web.editor.AttachmentURIResolver
_webPrefixHandlerFields inherited from class org.ametys.cms.transformation.AttachmentURIResolver
__PLUGIN_CONTENT_PATTERN, _context, _prefixHandler, _resolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResolves a link URI for rendering.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser.Get an URI label.getType()Returns the type of links handled by thisURIResolver.Methods inherited from class org.ametys.web.editor.AttachmentURIResolver
contextualize, getUriPrefix, serviceMethods inherited from class org.ametys.cms.transformation.AttachmentURIResolver
checkLink, getMimeType, resolveImageAsBase64Methods inherited from class org.ametys.cms.transformation.AbstractURIResolver
resolve, resolveBoundedImage, resolveBoundedImageAsBase64, resolveCroppedImage, resolveCroppedImageAsBase64, resolveImage, resolveImageAsBase64Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
PageAttachmentURIResolver
public PageAttachmentURIResolver()
-
-
Method Details
-
getType
Description copied from interface:URIResolverReturns the type of links handled by thisURIResolver.- Specified by:
getTypein interfaceURIResolver- Overrides:
getTypein classAttachmentURIResolver- Returns:
- the type of links handled by this
URIResolver.
-
_resolve
public String _resolve(String uri, String uriArgument, boolean download, boolean absolute, boolean internal) Description copied from class:AbstractURIResolverResolves a link URI for rendering.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser.- Overrides:
_resolvein classAttachmentURIResolver- Parameters:
uri- the link URI.uriArgument- the argument to append to the uridownload- 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.
-
getLabel
Description copied from interface:URIResolverGet an URI label.- Specified by:
getLabelin interfaceURIResolver- Overrides:
getLabelin classAttachmentURIResolver- Parameters:
uri- the uri which label to get.- Returns:
- the label.
-