Class ContextSearchProgress
- java.lang.Object
-
- com.hybris.cockpitng.core.config.impl.model.DefaultContextSearchNode
-
- com.hybris.cockpitng.core.config.impl.model.ContextSearchTree
-
- com.hybris.cockpitng.core.config.impl.model.ContextSearchProgress
-
- All Implemented Interfaces:
ContextSearchNode
public class ContextSearchProgress extends ContextSearchTree
Model class that contains current state of search process.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classContextSearchProgress.NodeIterator
-
Field Summary
-
Fields inherited from interface com.hybris.cockpitng.core.config.impl.model.ContextSearchNode
DEC_RELEVANCE_COMPARATOR, INC_RELEVANCE_COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description ContextSearchProgress(java.util.Collection<java.lang.String> relevanceZones)Relevance zones for this search
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancollapse()Moves a level up in search tree.java.util.Iterator<ContextSearchNode>expand(ContextSearchRequest request, ContextSearchTerms terms, NodeRelevance relevance)Expands current node with provided search needle.ContextSearchNodegetCurrentNode()Gets search node that is currently processed.voidselectNode(ContextSearchNode node)Marks provided search node as one that is currently processed.-
Methods inherited from class com.hybris.cockpitng.core.config.impl.model.ContextSearchTree
setParentImmediately
-
Methods inherited from class com.hybris.cockpitng.core.config.impl.model.DefaultContextSearchNode
addChild, addChildImmediately, addNodeResult, commit, countNotEmptyRelevance, getChildren, getLevel, getNodeResult, getNotEmptyRelevance, getParent, getRelevance, getResult, getResultChildren, getResultChildren, getSearchNeedle, isCommitted, isEgalitarian, removeChild, removeChildImmediately, setEgalitarian, setParent, toString, toTreeElement, toTreeElementAttribute, toTreeElementAttributes, toTreeElementEnd, toXML
-
-
-
-
Method Detail
-
expand
public java.util.Iterator<ContextSearchNode> expand(ContextSearchRequest request, ContextSearchTerms terms, NodeRelevance relevance)
Expands current node with provided search needle.Method checks whether provided child searches were already performed in current tree. If so then relevance level is checked and updated if needed (a node is moved from lower relevance node to current node).
- Parameters:
request- children request- Returns:
- search nodes that was not executed yet
-
collapse
public boolean collapse()
Moves a level up in search tree. A parent node of currently processed is selected as current.- Returns:
trueif parent node is available and was successfully selected
-
selectNode
public void selectNode(ContextSearchNode node)
Marks provided search node as one that is currently processed.- Parameters:
node- node to be selected
-
getCurrentNode
public ContextSearchNode getCurrentNode()
Gets search node that is currently processed.- Returns:
- a node that is currently processed or
nullif nothing is being processed
-
-