Class ContextSearchTerms


  • public class ContextSearchTerms
    extends java.lang.Object
    Current search terms.

    A object does not define any search progress or request, yet some additional conditions and state of search.

    Search conditions may vary between two different branches of search tree and is used for comparison, if a node is particular search is already executed and may be only referenced.

    • Constructor Summary

      Constructors 
      Constructor Description
      ContextSearchTerms​(java.util.Map<java.lang.String,​java.util.List<java.lang.String>> resetState, java.util.Map<java.lang.String,​java.lang.Integer> resetRelevance)  
    • Constructor Detail

      • ContextSearchTerms

        public ContextSearchTerms​(java.util.Map<java.lang.String,​java.util.List<java.lang.String>> resetState,
                                  java.util.Map<java.lang.String,​java.lang.Integer> resetRelevance)
    • Method Detail

      • getResetState

        public java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getResetState()
        State to which attributes should be reset if needed.

        Some attributes may be reset on merge. This is defined by CockpitConfigurationContextStrategy.isResettable(). If a strategy allows to reset attribute, then whenever a match is found that defines some merge-by, then children are searched with strategy's attributed reset (if not pointed by merge-by).

        Returns:
        map of attributes and their values to which a search should be reset
      • getResetRelevance

        public java.util.Map<java.lang.String,​java.lang.Integer> getResetRelevance()
        Relevance to which attributes should reset if needed.

        Some attributes may be reset on merge. This is defined by CockpitConfigurationContextStrategy.isResettable(). If a strategy allows to reset attribute, then whenever a match is found that defines some merge-by, then children are searched with strategy's attributed reset (if not pointed by merge-by).

        Returns:
        map of attributes and their relevance to which a search should be reset
      • getHighestMatchingRelevance

        public NodeRelevance getHighestMatchingRelevance()
        Gets highest relevance of from all children with matches of the closest parent.
        Returns:
        highest relevance or null if no matches yet
      • setHighestMatchingRelevance

        public void setHighestMatchingRelevance​(NodeRelevance highestRelevance)
        Sets highest relevance of from all children with matches of the closest parent.
        Parameters:
        highestRelevance - highest relevance or null if no matches yet
      • getExclusions

        public ConfigurationSearchFilter getExclusions()
        Gets an object able to decide which queries should be excluded from search.
        Returns:
        exclusions or null if all queries should be applied
      • setExclusions

        public void setExclusions​(ConfigurationSearchFilter exclusions)
        Sets an object able to decide which queries should be excluded from search.
        Parameters:
        exclusions - new exclusions or null if all queries should be applied
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object