Package org.ametys.plugins.odfweb
Class OdfURIResolver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.OdfURIResolver
org.ametys.plugins.odfweb.OdfURIResolver
- All Implemented Interfaces:
URIResolver
,LogEnabled
,Contextualizable
,Serviceable
URIResolver
for a ODF Content.-
Field Summary
Fields inherited from class org.ametys.odf.OdfURIResolver
_resolver
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
_getContentURI
(Content content, String siteName, RenderingContext context, boolean absolute, boolean internal) Get the content URIvoid
contextualize
(Context context) Resolves a link URI for rendering purposes.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser.void
service
(ServiceManager manager) Methods inherited from class org.ametys.odf.OdfURIResolver
checkLink, getLabel, getType, resolveBoundedImage, resolveBoundedImageAsBase64, resolveCroppedImage, resolveCroppedImageAsBase64, resolveImage, resolveImageAsBase64
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.cms.transformation.URIResolver
getMimeType
-
Constructor Details
-
OdfURIResolver
public OdfURIResolver()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classOdfURIResolver
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
resolve
Description copied from interface:URIResolver
Resolves 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:
resolve
in interfaceURIResolver
- Overrides:
resolve
in classOdfURIResolver
- 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.
-
_getContentURI
protected String _getContentURI(Content content, String siteName, RenderingContext context, boolean absolute, boolean internal) Get the content URI- Parameters:
content
- The contentsiteName
- The site namecontext
- The rendering contextabsolute
- true if the url must be absoluteinternal
- true to get an internal URI.- Returns:
- the content URI
-