Interface Link

All Superinterfaces:
Dict<String,Object>

public interface Link extends Dict<String,Object>
The form can be retrieved via getTemplate(). getGomProvider().
Since:
2.3.17
  • Field Details

  • Method Details

    • getData

      @Deprecated @NotNull @NotNull Data getData()
      Deprecated.
      since 4.2.440 - use getFormData() instead
      Get the data container for this link.
      Since:
      4.2.2
      See Also:
    • setData

      @Deprecated void setData(@NotNull @NotNull Data data)
      Deprecated.
      Set the data container for this link.
      Parameters:
      data - the new data container for this link, must be not null
      Since:
      4.2.2
    • getFormData

      @ApiDoc(comment="Gets the formdata container for this link.", since="4.2.440") @NotNull @NotNull FormData getFormData()
      Gets the formdata container for this link.
      Returns:
      the form data container for this link.
      Since:
      4.2.440
    • setFormData

      @ApiDoc(comment="Sets the given formdata container for this link.", since="4.2.440") void setFormData(@NotNull @NotNull FormData formData)
      Sets the given formdata container for this link.
      Parameters:
      formData - the form data container to be set for this link.
      Since:
      4.2.440
    • getNode

      @Deprecated Element getNode()
      Deprecated.
      since 5.2.21 - use getFormData() and setFormData(FormData) instead.
      For backward compatibility with FirstSpirit 4.1.
      Since:
      2.3.17
    • getTemplate

      @ApiDoc(comment="Returns the link template this link is based on.", since="2.3.17") @Nullable @Nullable LinkTemplate getTemplate()
      Returns the link template this link is based on. May return null if the template does not exist.
      Since:
      2.3.17
    • setTemplate

      @ApiDoc(comment="Switch the template - use with caution.", since="2.3.17") void setTemplate(LinkTemplate linkTemplate)
      Switch the template - use with caution. The stored data will be discarded andparsed again on next access corresponding to the form of the providedtemplate.
      Since:
      2.3.17
    • getText

      @ApiDoc(comment="The display text.", since="2.3.17") String getText()
      The display text. See LinkTemplate.getTextEditorName().
      Since:
      2.3.17
    • setText

      @ApiDoc(comment="Sets the text for this link.", since="2.3.17") void setText(String text)
      Sets the text for this link. If this link is a generic link thegiven text will be stored in the text editor definedin the belonging link template.
      This call may not result in a change and getText() may return the old value, e.g. if the providedvalue is not valid or if getTemplate(). getTextEditorName()delivers null. You may use this code instead:
       final LinkTemplate linkTemplate = link.getTemplate(); final String editorName = linkTemplate.getTextEditorName(); if (editorName != null) { link.getFormData().get(link.getLanguage(), editorName).set(text); } 
      Since:
      2.3.17
    • getLinkLanguage

      @ApiDoc(comment="Provides the language the link is created for.", since="4.2.400") Language getLinkLanguage()
      Provides the language the link is created for.
      Returns:
      The link's language.
      Since:
      4.2.400