public class OdfURIResolver extends OdfURIResolver implements Contextualizable
URIResolver
for a ODF Content.Modifier and Type | Field and Description |
---|---|
private Context |
_context |
private OdfPageHandler |
_odfPageHandler |
private OdfPageResolver |
_odfPageResolver |
private URIPrefixHandler |
_prefixHandler |
private RenderingContextHandler |
_renderingContextHandler |
private SiteManager |
_siteManager |
_resolver
Constructor and Description |
---|
OdfURIResolver() |
Modifier and Type | Method and Description |
---|---|
protected String |
_getContentURI(Content content,
String siteName,
RenderingContext context,
boolean absolute,
boolean internal)
Get the content URI
|
private Page |
_getCoursePage(Course course,
Page odfRootPage,
String[] paths) |
private Page |
_getSubProgramPage(SubProgram subProgram,
Page odfRootPage,
String[] paths) |
void |
contextualize(Context context) |
String |
resolve(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. |
void |
service(ServiceManager manager) |
checkLink, getLabel, getType, resolveBoundedImage, resolveBoundedImageAsBase64, resolveCroppedImage, resolveCroppedImageAsBase64, resolveImage, resolveImageAsBase64
getLogger, setLogger
private SiteManager _siteManager
private OdfPageResolver _odfPageResolver
private RenderingContextHandler _renderingContextHandler
private URIPrefixHandler _prefixHandler
private OdfPageHandler _odfPageHandler
public OdfURIResolver()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class OdfURIResolver
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public String resolve(String uri, boolean download, boolean absolute, boolean internal)
URIResolver
resolve
in interface URIResolver
resolve
in class OdfURIResolver
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.private Page _getSubProgramPage(SubProgram subProgram, Page odfRootPage, String[] paths)
private Page _getCoursePage(Course course, Page odfRootPage, String[] paths)
protected String _getContentURI(Content content, String siteName, RenderingContext context, boolean absolute, boolean internal)
content
- The contentsiteName
- The site namecontext
- The rendering contextabsolute
- true if the url must be absoluteinternal
- true to get an internal URI.