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
_webPrefixHandler
Fields inherited from class org.ametys.cms.transformation.AttachmentURIResolver
__PLUGIN_CONTENT_PATTERN, _context, _prefixHandler, _resolver
-
Constructor Summary
-
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, service
Methods inherited from class org.ametys.cms.transformation.AttachmentURIResolver
checkLink, getMimeType, resolveImageAsBase64
Methods inherited from class org.ametys.cms.transformation.AbstractURIResolver
resolve, resolveBoundedImage, resolveBoundedImageAsBase64, resolveCroppedImage, resolveCroppedImageAsBase64, resolveImage, resolveImageAsBase64
Methods 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:URIResolver
Returns the type of links handled by thisURIResolver
.- Specified by:
getType
in interfaceURIResolver
- Overrides:
getType
in 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:AbstractURIResolver
Resolves a link URI for rendering.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser.- Overrides:
_resolve
in 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:URIResolver
Get an URI label.- Specified by:
getLabel
in interfaceURIResolver
- Overrides:
getLabel
in classAttachmentURIResolver
- Parameters:
uri
- the uri which label to get.- Returns:
- the label.
-