Class CMSTag

    • Constructor Detail

      • CMSTag

        public CMSTag​(String id,
                      String name,
                      CMSTag parent,
                      I18nizableText title,
                      I18nizableText description,
                      TagTargetType target)
        Constructor
        Parameters:
        id - The id of the tag. The id must be unique.
        name - The name of the tag. The name must be unique. The name is the same as the id except for JCR tag.
        parent - The parent tag (can be null if the tag has no parent)
        title - the tag title
        description - the tag description
        target - the type of target
      • CMSTag

        public CMSTag​(String id,
                      String name,
                      CMSTag parent,
                      I18nizableText title,
                      I18nizableText description,
                      CMSTag.TagVisibility visibility,
                      TagTargetType target)
        Constructor
        Parameters:
        id - The id of the tag. The id must be unique.
        name - The name of the tag. The name must be unique. The name is the same as the id except for JCR tag.
        parent - The parent tag (can be null if the tag has no parent)
        title - the tag title
        description - the tag description
        visibility - the tag visibility.
        target - The type of target
    • Method Detail

      • getId

        public String getId()
        Description copied from interface: Tag
        Get the tag unique id.
        Specified by:
        getId in interface Tag
        Returns:
        The unique id
      • getName

        public String getName()
        Description copied from interface: Tag
        Get the tag name.
        Specified by:
        getName in interface Tag
        Returns:
        The tag name
      • getParent

        public CMSTag getParent()
        Description copied from interface: Tag
        Get the parent tag
        Specified by:
        getParent in interface Tag
        Returns:
        The parent tag or null if the tag has no parent.
      • addTag

        public void addTag​(Tag tag)
        Description copied from interface: Tag
        Add a new child tag.
        Specified by:
        addTag in interface Tag
        Parameters:
        tag - The tag to add
      • getTags

        public Map<String,​CMSTaggetTags()
        Description copied from interface: Tag
        Retrieves the Set of child tags
        Specified by:
        getTags in interface Tag
        Returns:
        The child tags in a Map
      • getTag

        public CMSTag getTag​(String tagId)
        Description copied from interface: Tag
        Try to get a child tag by its id
        Specified by:
        getTag in interface Tag
        Parameters:
        tagId - The id of the child tag
        Returns:
        The child tag or null if not existing
      • hasTag

        public boolean hasTag​(String tagId)
        Description copied from interface: Tag
        Determines if a tag exists
        Specified by:
        hasTag in interface Tag
        Parameters:
        tagId - The tag id
        Returns:
        true if the tag exists
      • setTarget

        public void setTarget​(TagTargetType target)
        Set the target type.
        Parameters:
        target - the target to set.
      • setTags

        public void setTags​(Map<String,​? extends Tag> tags)
        Description copied from interface: Tag
        Set the child tags
        Specified by:
        setTags in interface Tag
        Parameters:
        tags - The Map of Tag to set