Interface IPlaceholder

All Superinterfaces:
Serializable
All Known Implementing Classes:
GenericTextFragment, PlaceHolder

public interface IPlaceholder extends Serializable
Common interface for placeholders.
Since:
8.4.0
Author:
XIMA MEDIA GmbH
  • Field Details

  • Method Details

    • getAlias

      String getAlias()
      Returns:
      Only for form field placeholders: The alias of the form field.
    • getDetailedDescription

      String getDetailedDescription(Locale locale)
      Parameters:
      locale - The locale to get the description for.
      Returns:
      Detailed description of this placeholder, explaining what it does and how it works.
    • getDisplayName

      String getDisplayName(Locale locale)
      Parameters:
      locale - The locale to get the display name for.
      Returns:
      Display name of the placeholder, e.g. Client ID. Usually shown in the list of available placeholders
    • getIcon

      IGuiIcon getIcon()
      Returns:
      Icon for this placeholder. Depending on the placeholder type, may overwrite the default icon of that type.
    • getKind

      @Deprecated String getKind()
      Deprecated.
      Returns:
      The type or kind of the placeholder. May be used by certain IPlaceholderTypes for a more detailed description etc.
    • getName

      @Deprecated String getName()
      Deprecated.
      Returns:
      Name of the placeholder, e.g. CLIENT_ID. Usually shown in the list of available placeholders
    • getPlaceholder

      String getPlaceholder()
      Gets the full placeholder name with the brackets, e.g. [%$CLIENT_ID%]. Used when inserting the placeholder in an input field
      Returns:
      The full placeholder name including brackets.
    • getShortDescription

      @Deprecated String getShortDescription(Locale locale)
      Deprecated.
      Parameters:
      locale - The locale to get the description for.
      Returns:
      Short description of this placeholder, explaining what it does.
    • getSortKey

      Comparable<?> getSortKey()
      Returns:
      The sort key of this placeholder. Used for sorting placeholders in the list of available placeholders.
    • getText

      String getText()
      Returns:
      Content of this placeholder, eg. the HTML string for HTML template placeholders.
    • getType

      @NotNull @NotNull IPlaceholderType getType()
      Returns:
      Type of this placeholder (e.g. system, template, form field, etc.)
    • getInsertHint

      default EPlaceholderInsertHint getInsertHint()
      The preferred way for this text fragment to be inserted into input elements, although this might not be supported by all target components.

      The default implementation behaves as follows: If the placeholder starts with "LINK_", ends with "_LINK", or contains "_LINK_" or "_LINK." returns LINK. Otherwise, returns TEXT.

      Returns:
      The preferred insert mode for this text fragment.
      Since:
      8.4.1