Interface LinkTemplate

All Superinterfaces:
ChannelSourceProvider, Comparable<StoreElement>, GomSourceProvider, HistoryProvider, IDProvider, PackagePoolItem, PreviewImageProvider, Referenceable, RulesetContainer, RulesetContainer, SnippetContainer, StoreElement, Template, TemplateContentProvider, TemplateStoreElement, Workflowable

public interface LinkTemplate extends Template, RulesetContainer
A link template is a container for the rendering template for links.

Since FirstSpirit 4.2 a link template is also a container for the form presented to the editor for this link (GomSourceProvider).

Since:
3.0
  • Field Details

  • Method Details

    • getName

      @NotNull @Deprecated @NotNull String getName()
      Deprecated.
      since 4.1.10 - use IDProvider.getUid()
      Specified by:
      getName in interface StoreElement
      Returns:
      The template's uid.
      Since:
      3.0
    • getEditorName

      @Deprecated String getEditorName()
      Deprecated.
      since 4.2.24 - Since 4.2 this is retained for backward compatibility, all instances which provide a different value than Link.GENERIC_LINK are considered legacy. - no replacement
      Get the LinkEditor-name of the current LinkTemplate (e.g. internalLink, externalLink, contentLink, relatedprojectLink)
      Returns:
      LinkEditor-name (e.g. internalLink, externalLink, contentLink, relatedprojectLink)
      Since:
      3.0
    • getGomProvider

      Get this template's GOM provider containing the hierarchical definition of the templates GUI including structure and input elements.
      Specified by:
      getGomProvider in interface GomSourceProvider
      Returns:
      The GuiXML provider.
      Throws:
      ParsingError - If the current template's XML failed to be parsed.
      GomValidationError - If the current template is invalid.
      Since:
      4.2
    • getTextEditorName

      @Nullable @Nullable String getTextEditorName()
      Provides the name of the text editor component, used for storing the link description (e.g., for DOM).
      Returns:
      The text editor's name.
      Since:
      4.2
      See Also:
    • setTextEditorName

      void setTextEditorName(@Nullable @Nullable String value)
      Set the variable name from the form which is used to get the display text from link instances created with this template. This is used in input components like CMS_INPUT_LINK, CMS_INPUT_DOMEDITOR and others to give the user a visual feedback of the link content.
      Since:
      4.2
      See Also:
    • getPictureEditorName

      @Nullable @Nullable String getPictureEditorName()
      Provides the name of the picture editor component, used for storing a graphical description.
      Returns:
      The picture editor's name.
      Since:
      4.2
      See Also:
    • setPictureEditorName

      void setPictureEditorName(@Nullable @Nullable String value)
      Set the variable name from the form which is used to get an image to display from link instances created with this template. This is used in input components like CMS_INPUT_LINK, CMS_INPUT_DOMEDITOR and others to give the user a visual feedback of the link content.
      Since:
      4.2
      See Also:
    • getExternalUrlEditorName

      @Nullable @Nullable String getExternalUrlEditorName()
      The name of the editor which will contain the textual representation of an external "url". This is used to track external references in the reference graph. External references could be categorized.
      Since:
      4.2
    • setExternalUrlEditorName

      void setExternalUrlEditorName(@Nullable @Nullable String value)
      Defines the name of the editor component used for external urls.
      Parameters:
      value - The url editor name.
      Since:
      4.2
      See Also:
    • getReferenceCategory

      String getReferenceCategory()
      Default value is "url".
      Returns:
      The reference category.
      Since:
      4.2
      See Also:
    • setReferenceCategory

      void setReferenceCategory(String value)
      Set the reference category which is used to categorize "external" links. Changing this value will not change existing external references to the provided category and will only affect new or changed links based on this template.
      Throws:
      IllegalArgumentException - If the provided category string is empty.
      Since:
      4.2
      See Also:
    • getDropEditorName

      @Nullable @Nullable String getDropEditorName()
      Get the name of the editor that should be used as a drop target.
      Returns:
      name of drop editor
      Since:
      5.1.19
    • setDropEditorName

      void setDropEditorName(@Nullable @Nullable String value)
      Set the name of the editor that should be used as a drop target.
      Parameters:
      value - name of drop editor
      Since:
      5.1.19
    • setHidden

      void setHidden(boolean hidden)
      Set if the template should be hidden.
      Specified by:
      setHidden in interface Template
      Since:
      4.2
    • isHidden

      boolean isHidden()
      State if the template is hidden in the selection-list.
      Specified by:
      isHidden in interface Template
      Since:
      4.2
    • createLink

      Link createLink(Language language)
      Create a new link instance for this template. Only the default values are set. The template of the link points to this link template.
      The instance can be used to put it into an editor value instance of type Link or List<Link>.
      Parameters:
      language -
      Returns:
      a new link instance
      Since:
      4.2
      See Also: