Class ContextSearchRequest
- java.lang.Object
-
- com.hybris.cockpitng.core.config.impl.model.ContextSearchRequest
-
public class ContextSearchRequest extends java.lang.ObjectModel class that defines all conditions that context needs to meet
-
-
Constructor Summary
Constructors Constructor Description ContextSearchRequest(Config contextStack, java.util.Map<java.lang.String,java.util.List<java.lang.String>> attributesNeedle, ContextSearchRestriction restriction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContextSearchRequestcreateAlternative(java.util.Map<java.lang.String,java.util.List<java.lang.String>> newNeedle)Creates new request on basis of this one with other attributes needle.ContextSearchRequestcreateAlternative(java.util.Map<java.lang.String,java.util.List<java.lang.String>> newNeedle, ContextSearchRestriction restriction)Creates new request on basis of this one with other attributes needle.java.util.Map<java.lang.String,java.util.List<java.lang.String>>getAttributesNeedle()Map of possible attribute values, that needs to match context attribute for it to returned as a search resultConfiggetContextStack()Configuration model, which contexts will be searched throughContextSearchRestrictiongetParentRestriction()Gets a restriction for searching parents.booleanisNotEmpty()Checks whether only not empty configurations are requestedvoidsetNotEmpty(boolean notEmpty)Informs if only not empty configurations are requested
-
-
-
Constructor Detail
-
ContextSearchRequest
public ContextSearchRequest(Config contextStack, java.util.Map<java.lang.String,java.util.List<java.lang.String>> attributesNeedle, ContextSearchRestriction restriction)
-
-
Method Detail
-
isNotEmpty
public boolean isNotEmpty()
Checks whether only not empty configurations are requested- Returns:
trueif only not empty configurations should be returned by search
-
setNotEmpty
public void setNotEmpty(boolean notEmpty)
Informs if only not empty configurations are requested- Parameters:
notEmpty-trueif only not empty configurations should be returned by search
-
getContextStack
public Config getContextStack()
Configuration model, which contexts will be searched through- Returns:
- configuration model
-
getAttributesNeedle
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAttributesNeedle()
Map of possible attribute values, that needs to match context attribute for it to returned as a search result- Returns:
- map of attributes in form <name, list of possible values>
-
getParentRestriction
public ContextSearchRestriction getParentRestriction()
Gets a restriction for searching parents.Search process, if no exact match can be found, looks for any matching contexts for parent values of current attributes search needle. A restriction stops the process from looking for parents of specified attributes.
- Returns:
- parents search restriction
-
createAlternative
public ContextSearchRequest createAlternative(java.util.Map<java.lang.String,java.util.List<java.lang.String>> newNeedle)
Creates new request on basis of this one with other attributes needle.- Parameters:
newNeedle- new attributes needle- Returns:
- new reequest
-
createAlternative
public ContextSearchRequest createAlternative(java.util.Map<java.lang.String,java.util.List<java.lang.String>> newNeedle, ContextSearchRestriction restriction)
Creates new request on basis of this one with other attributes needle.- Parameters:
newNeedle- new attributes needle- Returns:
- new request
-
-