Package org.ametys.cms.search.cocoon
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
-
-
Field Summary
Fields Modifier and Type Field Description private List<Content>
_contents
private String
_fieldPath
private String
_groupName
private List<GroupSearchContent>
_subList
-
Constructor Summary
Constructors Constructor Description GroupSearchContent()
Create a new empty group, only used for rootGroupSearchContent(String fieldPath, String groupName)
Create a group, named after a metadataPath/name
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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 groupList<Content>
getContents()
Get the list of contents in this groupString
getGroupFieldPath()
Get the metadataPath that was used to create this groupString
getGroupName()
Get the value of the metadata (as a String) used to create this groupList<GroupSearchContent>
getSubList()
Get the sub groups in this group
-
-
-
Field Detail
-
_subList
private List<GroupSearchContent> _subList
-
_groupName
private String _groupName
-
_fieldPath
private String _fieldPath
-
-
Constructor Detail
-
GroupSearchContent
public 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 siblingsgroupName
- value of the field for this group
-
-
Method Detail
-
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
public List<GroupSearchContent> getSubList()
Get the sub groups in this group- Returns:
- list of groups
-
getContents
public List<Content> 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
public String getGroupFieldPath()
Get the metadataPath that was used to create this group- Returns:
- metadataPath
-
-