How do I add a new flight channel in Travel

5 months ago by
add commentfollow this post modified 4 months ago by Graham Trott   • written 5 months ago by Craig Handley  

2 Answers

5 months ago by

OK so I want to add a new flight channel to Travel.

We need to know the credentials we'll be using, EZY (code) for this example and the credentials string also - SFS will be able to provide these. N.B. test / prod credentials may be different, if so the relevant file entries will be different also

You need to add this new credentials string to all relevant files




prod (you may want the new creds commented out in prod until we're ready to use therm)

e.g. for EZY

Next we need Travel to handle the new credentials

DomainServiceRuntimeConfiguration.sfsFlightsChannelOptions() will need the new credentials adding

new method arg 

@Value("${}") final String ezyCreds

handling of new attribute

        if (!ezyCreds.isEmpty()) {

            tmpChannelOptions.put("EZY", ezyCreds);


BookingChannel enum needs updating

EZY("easyJet", TravelType.FLIGHT)

As well as the unit test for BookingChannel enum

Once these changes have been made you should test locally that flights are now being returned via the new channel



add comment modified 4 months ago by Graham Trott   • written 5 months ago by Craig Handley  

The alterations to the property files are in up to 3 parts. First there's an entry to define the flight channel; for example as above:

Next you may want to disable access to the channel and then re-enable it selectively for certain organisations only. Do this in 2 parts. Here's a global disable for the EZY channel:{"channels":["EZY"]}

and then a selective enable for the organisation whose ID is given:{"b3b93815-7b82-4ef2-876d-c68530f5bf6c":["EZY"]}

Instead of globally disabling you can just comment out the channel definition, but then the selective enable won't work.


modified 4 months ago by Graham Trott   • written 4 months ago by Graham Trott  
5 months ago by

NB: You may wonder why the code needs to be updated to define the new property in the system, this is because Spring has no way to support obtaining properties using wildcards i.e. it'd be much easier if travel could just use something like:

@Value("${*:}") final Map<String,String> creds

and then populate the tmpChannelOptions map from there... this is not possible though.

add comment written 5 months ago by Andrew Fitzpatrick  
Please log in to add an answer/comment or follow this question.

Similar posts:
Search »