Interface Tag

All Known Implementing Classes:
Category, CategoryCMSTag, CMSTag, DefaultTag, KeywordCMSTag, ProjectCMSTag

public interface Tag
This class represent a Tag
  • Field Details

  • Method Details

    • getId

      Get the tag unique id.
      Returns:
      The unique id
    • getName

      Get the tag name.
      Returns:
      The tag name
    • getParentName

      Get the parent name.
      Returns:
      The parent name.
    • getParent

      <T extends Tag> T getParent()
      Get the parent tag
      Type Parameters:
      T - the tag class
      Returns:
      The parent tag or null if the tag has no parent.
    • getTitle

      Retrieves the title.
      Returns:
      the title.
      Throws:
      AmetysRepositoryException - if an error occurs.
    • getDescription

      Retrieves the description.
      Returns:
      the description.
    • addTag

      void addTag(Tag tag)
      Add a new child tag.
      Parameters:
      tag - The tag to add
    • setTags

      void setTags(Map<String,? extends Tag> tags)
      Set the child tags
      Parameters:
      tags - The Map of Tag to set
    • getTags

      Map<String,? extends Tag> getTags()
      Retrieves the Set of child tags
      Returns:
      The child tags in a Map
    • getTag

      <T extends Tag> T getTag(String tagId)
      Try to get a child tag by its id
      Type Parameters:
      T - the tag class
      Parameters:
      tagId - The id of the child tag
      Returns:
      The child tag or null if not existing
    • hasTag

      boolean hasTag(String tagId)
      Determines if a tag exists
      Parameters:
      tagId - The tag id
      Returns:
      true if the tag exists