Class IngredientFilter

java.lang.Object
com.tccc.kos.ext.dispense.service.insertion.InsertionFilter<InsertionFilterConfig>
com.tccc.kos.ext.dispense.service.ingredient.IngredientFilter
All Implemented Interfaces:
com.tccc.kos.commons.core.service.config.ConfigAware<InsertionFilterConfig>, com.tccc.kos.commons.core.service.handle.HandleAware

public final class IngredientFilter extends InsertionFilter<InsertionFilterConfig>
Insertion filter that blocks insertions of unknown ingredients. Since insertion is global but ingredients can be as granular as per-holder, this filter needs to check the holders in the request and check each ingredient accordingly.
Since:
1.0
Version:
2023-02-06
  • Field Details

  • Constructor Details

    • IngredientFilter

      public IngredientFilter()
      Create a new filter.
  • Method Details

    • checkRequest

      public void checkRequest(InsertRequest request)
      Description copied from class: InsertionFilter
      Called to verify if an InsertRequest can be inserted. Use request.block() to prevent the request from proceeding. To attach a trouble to the request but still allow the request to move forward, use request.warn() .
      Specified by:
      checkRequest in class InsertionFilter<InsertionFilterConfig>
      Parameters:
      request - the request to operate on