com.atlassian.confluence.content.render.xhtml.links
Class HtmlExportHrefEvaluator
java.lang.Object
com.atlassian.confluence.content.render.xhtml.links.HtmlExportHrefEvaluator
- All Implemented Interfaces:
- HrefEvaluator
public class HtmlExportHrefEvaluator
- extends java.lang.Object
- implements HrefEvaluator
An HrefEvaluator that will generate links appropriate for HTML exported content. This means that should a link be
to a page included in the export then it will become a file system link. Otherwise it will become a link to the
server i.e. will include the server's baseUrl.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HtmlExportHrefEvaluator
public HtmlExportHrefEvaluator(HrefEvaluator defaultHrefEvaluator,
HrefEvaluator absoluteHrefEvaluator)
createHref
public java.lang.String createHref(ConversionContext context,
java.lang.Object entity,
java.lang.String anchor)
- Attachments and Pages may well exist in the export so look for them as a special case. All other entity types
will have hrefs created using the defaultHrefEvaluator. WebLinks may be server relative - relative links will
need to become absolute URLs in the export.
Note that while comment may also exist in the export, Confluence does not have a comment link type so there is
no handling for comments. If this changes in the future then we need to add additional handling here.
- Specified by:
createHref
in interface HrefEvaluator
- Parameters:
context
- the ConversionContext providing information about the conversion being performed, including the
target output type e.g. display, pdfentity
- the objectanchor
- an option parameter specifying an anchor component for the href attribute. This may be null if
there is no destination anchor.
- Returns:
- the attribute value appropriate for the outputType specified.
- See Also:
ConversionContextOutputType} for the supported outputType
createHref
public java.lang.String createHref(ConversionContext context,
Page page,
java.lang.String anchor)
createHref
public java.lang.String createHref(ConversionContext context,
Attachment attachment,
java.lang.String anchor)
createHref
public java.lang.String createHref(ConversionContext context,
WebLink link,
java.lang.String anchor)
Copyright © 2003-2014 Atlassian. All Rights Reserved.