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
public class OdfURIResolver extends OdfURIResolver implements Contextualizable
URIResolverfor a ODF Content.
-
-
Field Summary
-
Fields inherited from class org.ametys.odf.OdfURIResolver
_resolver
-
-
Constructor Summary
Constructors Constructor Description OdfURIResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String_getContentURI(Content content, String siteName, RenderingContext context, boolean absolute, boolean internal)Get the content URIvoidcontextualize(Context context)Stringresolve(String uri, boolean download, boolean absolute, boolean internal)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, resolveImageAsBase64
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
OdfURIResolver
public OdfURIResolver()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classOdfURIResolver- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
resolve
public String resolve(String uri, boolean download, boolean absolute, boolean internal)
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
-
-