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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String_getContentURI(Content content, String siteName, RenderingContext context, boolean absolute, boolean internal) Get the content URIvoidcontextualize(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.voidservice(ServiceManager manager) Methods inherited from class org.ametys.odf.OdfURIResolver
checkLink, getLabel, getType, resolveBoundedImage, resolveBoundedImageAsBase64, resolveCroppedImage, resolveCroppedImageAsBase64, resolveImage, resolveImageAsBase64Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.cms.transformation.URIResolver
getMimeType
-
Constructor Details
-
OdfURIResolver
public OdfURIResolver()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classOdfURIResolver- Throws:
ServiceException
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
resolve
Description copied from interface:URIResolverResolves 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:
resolvein interfaceURIResolver- Overrides:
resolvein 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
-