Interface CockpitConfigurationContextStrategy

    • 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 ConfigContext getConfigurationCacheKey​(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 boolean isResettable()
      Checks if value of strategy's attribute should be reset up to original value after match.
      boolean valueMatches​(java.lang.String contextValue, java.lang.String value)
      Checks if provided value matches the one defined in configuration context.
    • Field Detail

      • EMPTY_PARENT_CONTEXT

        static final java.util.List<java.lang.String> EMPTY_PARENT_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:
        true if 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 context
        value - value to be checked
        Returns:
        true if 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