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
public class PageAttachmentURIResolver extends AttachmentURIResolver
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
Constructors Constructor Description PageAttachmentURIResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
_resolve(String uri, String uriArgument, boolean download, boolean absolute, boolean internal)
Resolves a link URI for rendering.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser.I18nizableText
getLabel(String uri)
Get an URI label.String
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, 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 Detail
-
PageAttachmentURIResolver
public PageAttachmentURIResolver()
-
-
Method Detail
-
getType
public String 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
public I18nizableText getLabel(String uri)
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.
-
-