Class ReservationAdditionalSecurityHandler
java.lang.Object
de.hybris.platform.travelfacades.reservation.handlers.impl.ReservationAdditionalSecurityHandler
- All Implemented Interfaces:
ReservationHandler
The type Reservation additional security handler.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.servicelayer.session.SessionServiceGets session service.voidhandle(AbstractOrderModel abstractOrderModel, ReservationData reservationData) Handle method.protected booleanisFilterForAdditionalSecurityRequired(AbstractOrderModel abstractOrderModel) Returns true if 1) the additional security is active, 2) the passenger open the reservation using the manage booking component, 3) the current user is not the one who place the booking and 4) the booking was placed with guest checkout no filter needs to be displayedprotected booleanisOrderPlacedWithGuestUser(AbstractOrderModel abstractOrderModel) Returns true if the provided order (or the one related toAbstractOrderModelcart) was placed through a guest checkout.protected booleansameCustomer(AbstractOrderModel abstractOrderModel) Returns true if the UIDs of the passenger associated to the provided order matches with the one currently stored in sessionvoidsetSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService) Sets session service.
-
Constructor Details
-
ReservationAdditionalSecurityHandler
public ReservationAdditionalSecurityHandler()
-
-
Method Details
-
handle
Description copied from interface:ReservationHandlerHandle method.- Specified by:
handlein interfaceReservationHandler- Parameters:
abstractOrderModel- the abstract order modelreservationData- the reservation data
-
isFilterForAdditionalSecurityRequired
Returns true if 1) the additional security is active, 2) the passenger open the reservation using the manage booking component, 3) the current user is not the one who place the booking and 4) the booking was placed with guest checkout no filter needs to be displayed- Parameters:
abstractOrderModel- the abstract order model- Returns:
- boolean
-
isOrderPlacedWithGuestUser
Returns true if the provided order (or the one related toAbstractOrderModelcart) was placed through a guest checkout. The control on instanceof is done to prevent misbehaviour during the amendment journey. This because, during the amendment, a new user is created for a non registered traveller that is performing an amendment.- Parameters:
abstractOrderModel- the abstract order model- Returns:
- boolean
-
sameCustomer
Returns true if the UIDs of the passenger associated to the provided order matches with the one currently stored in session- Parameters:
abstractOrderModel- the abstract order model- Returns:
- boolean
-
getSessionService
protected de.hybris.platform.servicelayer.session.SessionService getSessionService()Gets session service.- Returns:
- the session service
-
setSessionService
public void setSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService) Sets session service.- Parameters:
sessionService- the session service
-