com.atlassian.confluence.content.render.xhtml.links
Class OutputTypeAwareHrefEvaluator
java.lang.Object
com.atlassian.confluence.content.render.xhtml.links.OutputTypeAwareHrefEvaluator
- All Implemented Interfaces:
- HrefEvaluator
public class OutputTypeAwareHrefEvaluator
- extends java.lang.Object
- implements HrefEvaluator
An HrefEvaluator which inspects the ConversionContextOutputType
in the ConversionContext and evaluates href
values appropriately for the output type targeted.
Method Summary |
java.lang.String |
createHref(ConversionContext context,
java.lang.Object entity,
java.lang.String anchor)
Create the appropriate href attribute value for the supplied ConversionContext. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OutputTypeAwareHrefEvaluator
public OutputTypeAwareHrefEvaluator(java.util.Map<java.lang.String,HrefEvaluator> outputTypeEvaluators,
HrefEvaluator defaultEvaluator)
- Parameters:
outputTypeEvaluators
- a Map where the key is a ConversionContextOutputType
and the value is the HrefEvaluator to use for that output typedefaultEvaluator
- the HrefEvaluator to use if no specific one is found
createHref
public java.lang.String createHref(ConversionContext context,
java.lang.Object entity,
java.lang.String anchor)
- Description copied from interface:
HrefEvaluator
- Create the appropriate href attribute value for the supplied ConversionContext.
- 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
Copyright © 2003-2014 Atlassian. All Rights Reserved.