Package com.hybris.cockpitng.core.config
Interface CockpitConfigurationContextStrategy
-
- All Known Implementing Classes:
CockpitModuleConfigurationContextStrategy,DefaultAuthorityContextStrategy,DefaultAuthorityGroupContextStrategy,DefaultTreeCollectionContextStrategy,NotificationSourceContextStrategy
public interface CockpitConfigurationContextStrategyA strategy defining value matching and inheritance for a configuration context. For example: a user role based strategy could implement user name matching and user/group inheritance lookup for a context holding user name.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<java.lang.String>EMPTY_PARENT_CONTEXT
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ConfigContextgetConfigurationCacheKey(ConfigContext configContext)Wraps provided ConfigContext, adds some attributes to make the configuration context more specific and returns it.java.util.List<java.lang.String>getParentContexts(java.lang.String context)Gets parent values for provided one.default booleanisResettable()Checks if value of strategy's attribute should be reset up to original value after match.booleanvalueMatches(java.lang.String contextValue, java.lang.String value)Checks if provided value matches the one defined in configuration context.
-
-
-
Method Detail
-
getParentContexts
java.util.List<java.lang.String> getParentContexts(java.lang.String context)
Gets parent values for provided one.- Parameters:
context- value which parent is requested- Returns:
- list of parent values
-
isResettable
default boolean isResettable()
Checks if value of strategy's attribute should be reset up to original value after match.Search algorithm after a match looks for parent contexts. There is a possibility, that some of attributes should be reset to original value before looking for parents (i.e. module).
- Returns:
trueif value should be reset
-
valueMatches
boolean valueMatches(java.lang.String contextValue, java.lang.String value)Checks if provided value matches the one defined in configuration context.- Parameters:
contextValue- value defined in configuration contextvalue- value to be checked- Returns:
trueif provided value matches the one defined in configuration context
-
getConfigurationCacheKey
default ConfigContext getConfigurationCacheKey(ConfigContext configContext)
Wraps provided ConfigContext, adds some attributes to make the configuration context more specific and returns it.- Parameters:
configContext- source- Returns:
- wrapped configContext
-
-