Package org.ametys.web.editor
Class AttachmentURIResolver
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.transformation.AbstractURIResolver
-
- org.ametys.cms.transformation.AttachmentURIResolver
-
- org.ametys.web.editor.AttachmentURIResolver
-
- All Implemented Interfaces:
URIResolver
,Contextualizable
,LogEnabled
,Serviceable
- Direct Known Subclasses:
Attachment2FlipbookUriResolver
,PageAttachmentURIResolver
public class AttachmentURIResolver extends AttachmentURIResolver
URIResolver
for type "attachment-content".
These links point to a file from the attachments of the current Content.
-
-
Field Summary
Fields Modifier and Type Field Description protected URIPrefixHandler
_webPrefixHandler
The URI prefix handler-
Fields inherited from class org.ametys.cms.transformation.AttachmentURIResolver
__PLUGIN_CONTENT_PATTERN, _context, _prefixHandler, _resolver
-
-
Constructor Summary
Constructors Constructor Description AttachmentURIResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextualize(Context context)
protected String
getUriPrefix(AmetysObject object, boolean download, boolean absolute, boolean internal)
Get the URI prefixvoid
service(ServiceManager manager)
-
Methods inherited from class org.ametys.cms.transformation.AttachmentURIResolver
_resolve, checkLink, getLabel, getType, 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
-
-
-
-
Field Detail
-
_webPrefixHandler
protected URIPrefixHandler _webPrefixHandler
The URI prefix handler
-
-
Constructor Detail
-
AttachmentURIResolver
public AttachmentURIResolver()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Overrides:
contextualize
in classAttachmentURIResolver
- Throws:
ContextException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAttachmentURIResolver
- Throws:
ServiceException
-
getUriPrefix
protected String getUriPrefix(AmetysObject object, boolean download, boolean absolute, boolean internal)
Description copied from class:AttachmentURIResolver
Get the URI prefix- Overrides:
getUriPrefix
in classAttachmentURIResolver
- Parameters:
object
- The objectdownload
- true if the pointed resource is to be downloaded.absolute
- true to get an internal URI.internal
- true if the url must be absolute- Returns:
- the URI prefix
-
-