Package org.ametys.cms.search.cocoon
Class SearchGeneratorHelper
java.lang.Object
org.ametys.cms.search.cocoon.SearchGeneratorHelper
Helper for search generator
-
Method Summary
Modifier and TypeMethodDescriptionstatic ViewItemAccessor
copyAndFilterViewItemAccessor
(ViewItemAccessor viewItemAccessor, List<String> itemPathsToKeep) Copy the items of the given accessor, keeping only the items with the given pathsstatic void
removeResultItems
(ViewItemAccessor viewItemAccessor, List<String> itemPathsToRemove) Removes the items with the given paths from the given accessor
-
Method Details
-
copyAndFilterViewItemAccessor
public static ViewItemAccessor copyAndFilterViewItemAccessor(ViewItemAccessor viewItemAccessor, List<String> itemPathsToKeep) Copy the items of the given accessor, keeping only the items with the given paths- Parameters:
viewItemAccessor
- the view item accessor to copyitemPathsToKeep
- the paths of the items to keep. If the list is empty, copy the accessor and keep all items- Returns:
- the view items accessor's copy
-
removeResultItems
public static void removeResultItems(ViewItemAccessor viewItemAccessor, List<String> itemPathsToRemove) Removes the items with the given paths from the given accessor- Parameters:
viewItemAccessor
- the view item accessoritemPathsToRemove
- the paths of the items to remove
-