Class HyperlinkUtil
java.lang.Object
net.sf.jasperreports.engine.export.HyperlinkUtil
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Boolean
getIgnoreHyperlink
(String propName, JRPrintHyperlink link) static String
makeLinkParameterName
(JRPrintHyperlink hyperlink) Returns the name of the parameter to be used for a hyperlink, as used bymakeLinkPlaceholder(JRPrintHyperlink)
andresolveLinks(String, JRGenericPrintElement, JRHyperlinkProducer, boolean)
.static String
makeLinkPlaceholder
(String linkId) Returns a placeholder to be used in a Flash variable for a hyperlink.static String
makeLinkPlaceholder
(JRPrintHyperlink hyperlink) Returns a placeholder to be used in a Flash variable for a hyperlink.static String
resolveLinks
(String text, JRGenericPrintElement element, JRHyperlinkProducer linkProducer, boolean prepareForSerialization) Resolves hyperlink placeholders to URLs in a Flash variable.
-
Field Details
-
LINK_PATTERN
-
LINK_PARAM_NAME_GROUP
protected static final int LINK_PARAM_NAME_GROUP- See Also:
-
-
Method Details
-
getIgnoreHyperlink
-
makeLinkParameterName
Returns the name of the parameter to be used for a hyperlink, as used bymakeLinkPlaceholder(JRPrintHyperlink)
andresolveLinks(String, JRGenericPrintElement, JRHyperlinkProducer, boolean)
.- Parameters:
hyperlink
- the hyperlink- Returns:
- the hyperlink parameter name
- See Also:
-
makeLinkPlaceholder
Returns a placeholder to be used in a Flash variable for a hyperlink.This method uses
System.identityHashCode(hyperlink)
as link Id.- Parameters:
hyperlink
- the hyperlink- Returns:
- the link placeholder
- See Also:
-
makeLinkPlaceholder
Returns a placeholder to be used in a Flash variable for a hyperlink.The placeholders will be resolved to links at export time by
resolveLinks(String, JRGenericPrintElement, JRHyperlinkProducer, boolean)
.- Parameters:
linkId
- the Id of the link, which needs to be used as hyperlink parameter name- Returns:
- the link placeholder
-
resolveLinks
public static String resolveLinks(String text, JRGenericPrintElement element, JRHyperlinkProducer linkProducer, boolean prepareForSerialization) Resolves hyperlink placeholders to URLs in a Flash variable.- Parameters:
text
- the text in which hyperlink placeholders are to be replacedelement
- the print element where hyperlink parameters will be looked forlinkProducer
- the hyperlink producer which transforms hyperlink objects to String URLs- Returns:
- the text with hyperlink placeholders replaced by URLs
- See Also:
-