Interface RelatedLink

    • Method Detail

      • getCode

        String getCode()
        Returns the link code.
        Returns:
        the link code.
      • setCode

        void setCode​(String code)
        Sets the code for the RelatedLink.
        Parameters:
        code - the code.
      • getSuffix

        String getSuffix()
        Returns the suffix.
        Returns:
      • setSuffix

        void setSuffix​(String suffix)
        Sets the suffix for the RelatedLink.
        Parameters:
        suffix - sets the suffix code
      • getLink

        Link getLink()
        Returns the Link object for this RelatedLink.
        Returns:
        a Link object for this RelatedLink
      • getEditLink

        Link getEditLink()
        Returns the link object to be used in the Edit environment. Returns the same result as getLink when the target object is 'published', but returns a valid link instead of null when the target object is 'planned'.
        Returns:
        A Link object, even when the target object is planned. Null if the link object has been deleted.
      • getLink

        Link getLink​(String linkText,
                     String className)
        Returns a Link object with an alternative linkText and className.
        Parameters:
        linkText - description
        className - css class
        Returns:
        a Link object with an alternative linkText and className.
      • getLink

        Link getLink​(String innerHTML,
                     String linkText,
                     String className)
        Returns a Link object with value of the innerHTML parameter as its inner HTML, an alternative linkText and className.
        Parameters:
        innerHTML - the inner HTML for the link
        linkText - description
        className - css class
        Returns:
        a Link object with value of the innerHTML parameter as its inner HTML, an alternative linkText and className
      • getLink

        Link getLink​(String innerHTML,
                     String linkText,
                     String className,
                     String suffix)
        Returns a Link object with value of the innerHTML parameter as its inner HTML, an alternative linkText, className and a suffix.
        Parameters:
        innerHTML -
        linkText -
        className -
        suffix -
        Returns:
        a Link object with value of the innerHTML parameter as its inner HTML, an alternative linkText and className
      • getLink

        Link getLink​(String innerHTML,
                     String linkText,
                     String className,
                     String suffix,
                     LinkModel overruleLinkModel)
        Returns a Link object with value of the innerHTML parameter as its inner HTML, an alternative linkText, className, suffix and link model.
        Parameters:
        innerHTML -
        linkText -
        className -
        suffix -
        overruleLinkModel -
        Returns:
        a Link object with value of the innerHTML parameter as its inner HTML, an alternative linkText, className, suffix and link model
      • getPopUpProperties

        String getPopUpProperties()
        Returns onClick javascript to open a popup.
        Returns:
        onClick javascript to open a popup.
      • getPopUpProperties

        String getPopUpProperties​(LinkModel overruleLinkModel)
        Returns onClick javascript to open a popup, taking the given link model into account.
        Parameters:
        overruleLinkModel - The overrule link model
        Returns:
        onClick javascript to open a popup.
      • getTarget

        String getTarget()
        Returns value for the target attribute in the <a> tag. For example, target="_blank".
        Returns:
        value for target attribute.
      • getTarget

        String getTarget​(LinkModel overruleLinkModel)
        Returns value for the target attribute in the <a> tag. For example, target="_blank", taking the given link model into account.
        Parameters:
        overruleLinkModel - The overrule link model
        Returns:
        value for target attribute.
      • getLinkModel

        LinkModel getLinkModel()
        Gets the link model for this link.
        Returns:
        The link model
      • setLinkModel

        void setLinkModel​(LinkModel linkModel)
        Sets the link model to be used when generating the link.
        Parameters:
        linkModel - The link model
      • getTitle

        String getTitle()
        Returns the effective title of the link. The returned title depends on the selected title option but also on the link type: DEFAULT: returns the title of the linked content item for internal links, the URL for external links, the filename of the download for download media items or the name of the database page in case of resource links. CUSTOM: returns the custom title set by the editor (see getCustomTitle) NONE: returns null, meaning that the link should not contain a title attribute
        Returns:
        The effective title attribute value of the link or null to indicate that the link should not contain a title attribute
      • getCustomTitle

        String getCustomTitle()
        Returns the custom title attribute to be used when constructing the link. This value is only applicable if the title option CUSTOM has been selected.
        Returns:
        custom title attribute of a link.
      • setCustomTitle

        void setCustomTitle​(String customTitle)
        Sets the custom link title attribute to be used when constructing the link. This title is only used when the CUSTOM title option has been selected.
        Parameters:
        customTitle - The custom title to set
      • getTitleOption

        RelatedLinkTitleOption getTitleOption()
        Returns the option to use for the title attribute of the link. See RelatedLinkTitleOption for more information on the possible options.
        Returns:
        the option to use for the title attribute of the link
      • setTitleOption

        void setTitleOption​(RelatedLinkTitleOption titleOption)
        Sets the option to use for the title attribute of the link. See RelatedLinkTitleOption for more information on the possible options.
        Parameters:
        titleOption - the option to use for the title attribute of the link