Interface WebHyperLink


  • public interface WebHyperLink
    The WebHyperLink interface represents the Hyperlink associated with grid report cell or RWD text field.
    Since:
    MicroStrategy Web 8.1.2
    • Field Detail

      • LINK_TYPE_URL

        static final int LINK_TYPE_URL
        This value represents a URL link.
        See Also:
        Constant Field Values
      • LINK_TYPE_EXECUTE

        static final int LINK_TYPE_EXECUTE
        This value represents an executable report/RWD link.
        See Also:
        Constant Field Values
      • LINK_TYPE_MOBILE_URL

        static final int LINK_TYPE_MOBILE_URL
        This value represents an mobile action link. Actually it works the same with url link.
        See Also:
        Constant Field Values
    • Method Detail

      • getLinkType

        int getLinkType()
        Returns the type of link, the return value comes from LINK_TYPE_URL and LINK_TYPE_EXECUTE
        Returns:
        a int representing the type of this link.
      • isDefault

        boolean isDefault()
        Indicates whether this is the default Hyperlink
        Returns:
        true is the Hyperlink is the default link of the report cell or RWD text field.
      • setDefault

        void setDefault​(boolean def)
        Sets/Unsets the Hyperlink as default If there are more than one Hyperlink associated with a report cell or RWD text field, only one Hyperlink can be set as default
        Parameters:
        def - If this is true, then Hyperlink will be set as default link of the report cell or RWD text field.
      • getDisplayText

        java.lang.String getDisplayText()
        Returns link's display text. The link's display text represents the link.
        Returns:
        link's display text.
      • setDisplayText

        void setDisplayText​(java.lang.String text)
        Sets link's display text. The link's display text represents the link.
        Parameters:
        text - the link's display text
      • getTargetObject

        WebObjectInfo getTargetObject()
        Returns link's target - a report or a document, this method is only applicable for LINK_TYPE_EXECUTE.
        Returns:
        A WebObjectInfo object corresponding to the target report or document
      • setTargetObject

        void setTargetObject​(WebObjectInfo obj)
        Sets link's target - a report or a document, this method is only applicable for LINK_TYPE_EXECUTE.
        Parameters:
        obj - WebObjectInfo report or document which will be set as this Hyperlink's target.
      • getURL

        java.lang.String getURL()
        Returns the target URL link If the link type is LINK_TYPE_URL or LINK_TYPE_MOBILE_URL this method returns this Hyperlink's URL, otherwise it returns null.
        Returns:
        a string representing link's URL
      • getDefaultAnswerMode

        int getDefaultAnswerMode()
        Returns a default answer mode that shall be used for target report's or document's prompts. This method is only applicable for LINK_TYPE_EXECUTE
        Returns:
        A value from EnumLinkAnswerMode which will be used for target report's or document's prompts
      • setDefaultAnswerMode

        void setDefaultAnswerMode​(int value)
        Sets default answer mode for this Hyperlink This method is only applicable for LINK_TYPE_EXECUTE
        Parameters:
        value - the value for different answer modes, which refers to EnumLinkAnswerMode
        Since:
        MicroStrategy Web 9.0.0
      • getAnswerXML

        java.lang.String getAnswerXML()
        Return a string that shall be used for answering the target report's or docuemt's prompts. This method is only applicable for LINK_TYPE_EXECUTE
        Returns:
        a string that shall be used for answering the target prompts.
        Since:
        MicroStrategy Web 9.0.0
      • getSelectorOptions

        java.lang.String getSelectorOptions()
        Indicates whether to copy the selector's selections when link drilling from one document to another.
        The options are:
        - 0 - Do not pass selector values
        - 1 - Pass selector values - match selectors by ID
        - 2 - Pass selector values - match selectors by name
      • setSelectorOptions

        void setSelectorOptions​(java.lang.String selectorOptions)
        Indicates whether to copy the selector's selections when link drilling from one document to another.
        The options are:
        - 0 - Do not pass selector values
        - 1 - Pass selector values - match selectors by ID
        - 2 - Pass selector values - match selectors by name