Interface ComplexDataItemController<D extends DataItem, V extends DataItemValue<D>>

All Superinterfaces:
PartialController<D>, ProcessingStep
All Known Subinterfaces:
LevellingProfileController, NumericalDataItemController<D,V>

public interface ComplexDataItemController<D extends DataItem, V extends DataItemValue<D>> extends PartialController<D>
  • Method Details

    • getAvailable

      List<D> getAvailable()
      Get all no yet selected items - either even with those whose requirements are not met, or without them-
      Parameters:
      ignoreRequirements - Also return items whose requirements are not met
      Returns:
    • getSelected

      List<V> getSelected()
      Get a list of all currently selected items
    • getRecommendationState

      RecommendationState getRecommendationState(D value)
    • getRecommendationState

      RecommendationState getRecommendationState(V value)
    • getChoicesToDecide

      default List<Choice> getChoicesToDecide(D value)
      Get the choices to be made should the user want to select the item
      Parameters:
      value - Item to select
      Returns:
      List of choices to make
    • canBeSelected

      Possible canBeSelected(D value, Decision... decisions)
      Check if the user is allowed to select the item
      Parameters:
      value - Item to select
      decisions - Decisions made
      Returns:
      Selection allowed or not
      Throws:
      IllegalArgumentException - Thrown if a decision is missing or invalid
    • select

      OperationResult<V> select(D value, Decision... decisions)
      Add/Select the item using the given decisions
      Parameters:
      value - Item to select
      decisions - Decisions made
      Returns:
      value instance of selected item
      Throws:
      IllegalArgumentException - Thrown if a decision is missing or invalid
    • canBeDeselected

      Possible canBeDeselected(V value)
      Check if the user is allowed to deselect the item
      Parameters:
      value - ItemValue to deselect
      Returns:
      Deselection allowed or not
    • deselect

      boolean deselect(V value)
      Remove/Deselect the item (UNDO mode)
      Parameters:
      value - Item to select
      Returns:
      TRUE if item has been deselected
      Throws:
      IllegalArgumentException - Thrown if a decision is missing or invalid
    • deselect

      default boolean deselect(V value, ComplexDataItemController.RemoveMode mode)
    • getSelectionCost

      float getSelectionCost(D data, Decision... decisions)
    • getSelectionCostString

      default String getSelectionCostString(D data)