Class GroupSearchContent

java.lang.Object
org.ametys.cms.search.cocoon.GroupSearchContent

public class GroupSearchContent extends Object
Object created to group content, according to a metadata
  • Constructor Details

    • GroupSearchContent

      Create a new empty group, only used for root
    • GroupSearchContent

      public GroupSearchContent(String fieldPath, String groupName)
      Create a group, named after a metadataPath/name
      Parameters:
      fieldPath - path of the field used to create this group and siblings
      groupName - value of the field for this group
  • Method Details

    • addToSubList

      public void addToSubList(GroupSearchContent subList)
      Add a sub group in this group
      Parameters:
      subList - sub-group
    • addContents

      public void addContents(List<Content> contents)
      Add contents in this group
      Parameters:
      contents - contents to add
    • addContent

      public void addContent(Content content)
      Add a content in this group
      Parameters:
      content - content to add
    • getSubList

      Get the sub groups in this group
      Returns:
      list of groups
    • getContents

      Get the list of contents in this group
      Returns:
      list of contents in this group
    • getGroupName

      public String getGroupName()
      Get the value of the metadata (as a String) used to create this group
      Returns:
      Metadata value as a string
    • getGroupFieldPath

      Get the metadataPath that was used to create this group
      Returns:
      metadataPath