Class DefaultTravelKeyGeneratorService

java.lang.Object
de.hybris.platform.servicelayer.keygenerator.impl.PersistentKeyGenerator
de.hybris.platform.travelservices.service.keygenerator.impl.DefaultTravelKeyGeneratorService
All Implemented Interfaces:
de.hybris.platform.servicelayer.keygenerator.KeyGenerator, TravelKeyGeneratorService

public class DefaultTravelKeyGeneratorService extends de.hybris.platform.servicelayer.keygenerator.impl.PersistentKeyGenerator implements TravelKeyGeneratorService
Default implementation of the TravelKeyGeneratorService interface. The DefaultTravelKeyGeneratorService implementation also extends the PersistentKeyGenerator.
  • Constructor Details

    • DefaultTravelKeyGeneratorService

      public DefaultTravelKeyGeneratorService()
  • Method Details

    • generateTravellerUid

      public String generateTravellerUid(String prefix, String passengerNumber)
      Description copied from interface: TravelKeyGeneratorService

      Method responsible for generating a unique Traveller Id. The key is made up of the following:

      key = prefix _ passengerNumber _ random generated alphanumeric

      • prefix - only included in key if provided
      • passengerNumber - only included in key if provided
      • random generated alphanumeric - This is configurable which can be set using setCount(). Default is 8.

      If no prefix or passengerNumber is provided then the keygen will return the random generated alphanumeric

      Specified by:
      generateTravellerUid in interface TravelKeyGeneratorService
      Parameters:
      prefix - the prefix
      passengerNumber - the passenger number
      Returns:
      traveller uid
    • generateAccommodationRequestCode

      public String generateAccommodationRequestCode(int roomStayRefNumber, String bookingReference)
      Description copied from interface: TravelKeyGeneratorService
      This method generates an unique code for an accommodation request
      Specified by:
      generateAccommodationRequestCode in interface TravelKeyGeneratorService
      Parameters:
      roomStayRefNumber - the room stay ref number
      bookingReference - the booking reference
      Returns:
      string
    • generateTransportOfferingCode

      public String generateTransportOfferingCode(TransportOfferingModel transportOffering)
      Description copied from interface: TravelKeyGeneratorService
      Generates an unique code for the given TransportOfferingModel
      Specified by:
      generateTransportOfferingCode in interface TravelKeyGeneratorService
      Returns:
    • generateBoundId

      public String generateBoundId(List<TransportOfferingModel> transportOfferingModels)
      Description copied from interface: TravelKeyGeneratorService
      Generates an unique code for a bound
      Specified by:
      generateBoundId in interface TravelKeyGeneratorService
      Parameters:
      transportOfferingModels - the transport offering list
      Returns:
    • getConfigurationService

      protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()
      Gets configuration service.
      Returns:
      the configuration service
    • setConfigurationService

      public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)
      Sets configuration service.
      Parameters:
      configurationService - the configuration service