Class HyperlinkUtil


  • public final class HyperlinkUtil
    extends java.lang.Object
    Author:
    Teodor Danciu (teodord@users.sourceforge.net)
    • 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)
      • 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 replaced
        element - the print element where hyperlink parameters will be looked for
        linkProducer - the hyperlink producer which transforms hyperlink objects to String URLs
        Returns:
        the text with hyperlink placeholders replaced by URLs
        See Also:
        makeLinkPlaceholder(String)