Class HyperlinkUtil
- java.lang.Object
-
- net.sf.jasperreports.engine.export.HyperlinkUtil
-
public final class HyperlinkUtil extends java.lang.Object- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description protected static intLINK_PARAM_NAME_GROUPprotected static java.util.regex.PatternLINK_PATTERN
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.BooleangetIgnoreHyperlink(java.lang.String propName, JRPrintHyperlink link)static java.lang.StringmakeLinkParameterName(JRPrintHyperlink hyperlink)Returns the name of the parameter to be used for a hyperlink, as used bymakeLinkPlaceholder(JRPrintHyperlink)andresolveLinks(String, JRGenericPrintElement, JRHyperlinkProducer, boolean).static java.lang.StringmakeLinkPlaceholder(java.lang.String linkId)Returns a placeholder to be used in a Flash variable for a hyperlink.static java.lang.StringmakeLinkPlaceholder(JRPrintHyperlink hyperlink)Returns a placeholder to be used in a Flash variable for a hyperlink.static java.lang.StringresolveLinks(java.lang.String text, JRGenericPrintElement element, JRHyperlinkProducer linkProducer, boolean prepareForSerialization)Resolves hyperlink placeholders to URLs in a Flash variable.
-
-
-
Field Detail
-
LINK_PATTERN
protected static final java.util.regex.Pattern LINK_PATTERN
-
LINK_PARAM_NAME_GROUP
protected static final int LINK_PARAM_NAME_GROUP
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIgnoreHyperlink
public static java.lang.Boolean getIgnoreHyperlink(java.lang.String propName, JRPrintHyperlink link)
-
makeLinkParameterName
public static java.lang.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).- Parameters:
hyperlink- the hyperlink- Returns:
- the hyperlink parameter name
- See Also:
makeLinkPlaceholder(JRPrintHyperlink)
-
makeLinkPlaceholder
public static java.lang.String makeLinkPlaceholder(JRPrintHyperlink hyperlink)
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(String)
-
makeLinkPlaceholder
public static java.lang.String makeLinkPlaceholder(java.lang.String linkId)
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 java.lang.String resolveLinks(java.lang.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:
makeLinkPlaceholder(String)
-
-