Class ReservationAdditionalSecurityHandler

java.lang.Object
de.hybris.platform.travelfacades.reservation.handlers.impl.ReservationAdditionalSecurityHandler
All Implemented Interfaces:
ReservationHandler

public class ReservationAdditionalSecurityHandler extends Object implements ReservationHandler
The type Reservation additional security handler.
  • Constructor Details

    • ReservationAdditionalSecurityHandler

      public ReservationAdditionalSecurityHandler()
  • Method Details

    • handle

      public void handle(AbstractOrderModel abstractOrderModel, ReservationData reservationData)
      Description copied from interface: ReservationHandler
      Handle method.
      Specified by:
      handle in interface ReservationHandler
      Parameters:
      abstractOrderModel - the abstract order model
      reservationData - the reservation data
    • isFilterForAdditionalSecurityRequired

      protected boolean isFilterForAdditionalSecurityRequired(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 displayed
      Parameters:
      abstractOrderModel - the abstract order model
      Returns:
      boolean
    • isOrderPlacedWithGuestUser

      protected boolean isOrderPlacedWithGuestUser(AbstractOrderModel abstractOrderModel)
      Returns true if the provided order (or the one related to AbstractOrderModel cart) 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

      protected boolean sameCustomer(AbstractOrderModel abstractOrderModel)
      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