Class TravelRestrictionStrategy
java.lang.Object
de.hybris.platform.travelfacades.strategies.impl.TravelRestrictionStrategy
Strategy to validate a quantity against the TravelRestriction.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckQuantityForMandatoryTravelRestriction(TravelRestrictionModel travelRestrictionModel, long quantity) This method performs a validation on the quantity against the TravelRestriction.booleancheckQuantityForTravelRestriction(TravelRestrictionModel travelRestrictionModel, long quantity) This method performs a validation on the quantity against the TravelRestriction.protected booleancheckRestrictions(TravelRestrictionModel travelRestrictionModel, long quantity) Check restrictions validity.
-
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 quantityquantity- 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 quantityquantity- as the quantity to validate- Returns:
- true if the quantity to be added/removed or fulfils the TravelRestriction, false otherwise
-
checkRestrictions
Check restrictions validity.- Parameters:
travelRestrictionModel- the travel restriction modelquantity- the quantity- Returns:
- the boolean
-