Class BaseIngredient

java.lang.Object
com.tccc.kos.ext.dispense.service.ingredient.BaseIngredient

public class BaseIngredient extends Object
Basic abstraction of an ingredient. Ingredients are exposed to IngredientService using IngredientSource. When an IngredientSource is added to IngredientService all the ingredients in the source will be tagged with the source object. This means that ingredient instances can only be in a single source, and must be in the source at the time the source is added to the service.

This class is typically extended to include additional properties required by a given application.

Since:
1.0
Version:
2023-01-05
  • Constructor Details

    • BaseIngredient

      public BaseIngredient()
      Default constructor
  • Method Details

    • getSourceId

      public String getSourceId()
      Return the IngredientSource id of the ingredient.
    • getSource

      public IngredientSource getSource()
      Return the IngredientSource the ingredient is part of.
    • getId

      public String getId()
      Return the id of the ingredient.
    • setId

      public void setId(String id)
      Set the id of the ingredient.
    • getType

      public String getType()
      Return the optional compatibility type of the ingredient. This can be matched with Holder.getIngType() to help describe which ingredients are compatible with which holders. If this data is set in both holders and ingredients, the sdk and other internal services will make it easy to match ingredients to holders and perform additional validation during insertion.

      This is generally used to describe ingredient types like water / carb / syrup / flavor / micro / macro / etc...

    • setType

      public void setType(String type)
      Set the optional compatibility type of the ingredient. This can be matched with Holder.getIngType() to determine which ingredients are compatible with which holders. When used, additional validation will be performed and various sdk's will assist using this data.

      This is generally used to describe ingredient types like water / carb / syrup / flavor / micro / macro / etc...

    • getName

      public String getName()
    • setName

      public void setName(String name)