Package org.ametys.cms.search.cocoon
Class GroupSearchContent
java.lang.Object
org.ametys.cms.search.cocoon.GroupSearchContent
Object created to group content, according to a metadata
-
Constructor Summary
ConstructorDescriptionCreate a new empty group, only used for rootGroupSearchContent
(String fieldPath, String groupName) Create a group, named after a metadataPath/name -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContent
(Content content) Add a content in this groupvoid
addContents
(List<Content> contents) Add contents in this groupvoid
addToSubList
(GroupSearchContent subList) Add a sub group in this groupGet the list of contents in this groupGet the metadataPath that was used to create this groupGet the value of the metadata (as a String) used to create this groupGet the sub groups in this group
-
Constructor Details
-
GroupSearchContent
public GroupSearchContent()Create a new empty group, only used for root -
GroupSearchContent
Create a group, named after a metadataPath/name- Parameters:
fieldPath
- path of the field used to create this group and siblingsgroupName
- value of the field for this group
-
-
Method Details
-
addToSubList
Add a sub group in this group- Parameters:
subList
- sub-group
-
addContents
Add contents in this group- Parameters:
contents
- contents to add
-
addContent
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
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
-