Class TravelRestrictionStrategy

java.lang.Object
de.hybris.platform.travelfacades.strategies.impl.TravelRestrictionStrategy

public class TravelRestrictionStrategy extends Object
Strategy to validate a quantity against the TravelRestriction.
  • Constructor Details

    • TravelRestrictionStrategy

      public TravelRestrictionStrategy()
  • Method Details

    • checkQuantityForTravelRestriction

      public boolean checkQuantityForTravelRestriction(TravelRestrictionModel travelRestrictionModel, long quantity)
      This method performs a validation on the quantity against the TravelRestriction. The quantity can be 0 or it has to fulfil the TravelRestriction.
      Parameters:
      travelRestrictionModel - as the travelRestriction that should be fulfilled by the quantity
      quantity - as the quantity to validate
      Returns:
      true if the quantity to be added/removed is 0 or fulfils the TravelRestriction, false otherwise
    • checkQuantityForMandatoryTravelRestriction

      public boolean checkQuantityForMandatoryTravelRestriction(TravelRestrictionModel travelRestrictionModel, long quantity)
      This method performs a validation on the quantity against the TravelRestriction. The quantity has to fulfil the TravelRestriction.
      Parameters:
      travelRestrictionModel - as the travelRestriction that should be fulfilled by the quantity
      quantity - as the quantity to validate
      Returns:
      true if the quantity to be added/removed or fulfils the TravelRestriction, false otherwise
    • checkRestrictions

      protected boolean checkRestrictions(TravelRestrictionModel travelRestrictionModel, long quantity)
      Check restrictions validity.
      Parameters:
      travelRestrictionModel - the travel restriction model
      quantity - the quantity
      Returns:
      the boolean