Class OrderChangeDataListsFieldValidator

java.lang.Object
de.hybris.platform.ndc182webservices.validators.impl.AbstractOrderValidator
de.hybris.platform.ndc182webservices.validators.impl.OrderChangeDataListsFieldValidator
All Implemented Interfaces:
NDCFieldValidator<IATAOrderChangeRQ,List<ErrorType>>

public class OrderChangeDataListsFieldValidator extends AbstractOrderValidator implements NDCFieldValidator<IATAOrderChangeRQ,List<ErrorType>>
The ndc 18.2 Order Change DataLists fields validator.
  • Constructor Details

    • OrderChangeDataListsFieldValidator

      public OrderChangeDataListsFieldValidator()
  • Method Details

    • validate

      public void validate(IATAOrderChangeRQ orderChangeRQ, List<ErrorType> errors)
      Description copied from interface: NDCFieldValidator
      Validate.
      Specified by:
      validate in interface NDCFieldValidator<IATAOrderChangeRQ,List<ErrorType>>
      Parameters:
      orderChangeRQ - the request
      errors - the errors
    • validatePaxSegmentList

      protected void validatePaxSegmentList(IATAOrderChangeRQ orderChangeRQ, List<ErrorType> errors, List<SelectedOfferType> selectedOffers)
      Validates pax segment list. 1) Checks if the paxSegment field is present in the datalists. 2) Retrieves all the distinct paxSegmentIds from those flightAssociations having a reference to a paxSegment (note that a flightAssociation is a choice between paxSegment and paxJourney).
      Parameters:
      orderChangeRQ - the order change rq
      errors - the errors
      selectedOffers - the selected offers
    • validatePaxSegment

      protected void validatePaxSegment(PaxSegmentType paxSegment, List<ErrorType> errors)
      Validates the pax segment.
      Parameters:
      paxSegment - the pax segment
      errors - the errors
    • findPaxSegmentById

      protected PaxSegmentType findPaxSegmentById(PaxSegmentListType paxSegmentList, String paxSegmentId)
      Validates pax segment id either referenced in a flightAssociation or referenced in a paxJourney.
      Parameters:
      paxSegmentList - the pax segment list
      paxSegmentId - the paxSegmentId
    • validatePaxList

      protected void validatePaxList(PaxListType paxList, List<ErrorType> errors)
      Validates pax list. Checks if one of the passenger has invalid ndcCode or Id/Ptc empty.
      Parameters:
      paxList - the pax list type
      errors - the errors
    • getNdcPassengerTypeService

      protected NDCPassengerTypeService getNdcPassengerTypeService()
      Gets ndc passenger type service.
      Returns:
      the ndc passenger type service
    • setNdcPassengerTypeService

      public void setNdcPassengerTypeService(NDCPassengerTypeService ndcPassengerTypeService)
      Sets ndc passenger type service.
      Parameters:
      ndcPassengerTypeService - the ndc passenger type service