Skip Navigation

About Encode/Decode Service

The Encode/Decode service encodes or decodes text for a specified category. The service returns a list of entries that match the input in text format with a single call. This OSGi service is based on a public API, and includes the following Encode categories for IATA codes:

  • Airline name

  • Airport

  • Bus company name

  • Car equipment

  • Car type

  • Car vendor

  • Country

  • City

  • Credit card vendor

  • Cruise line

  • Currency

  • Equipment

  • Hotel vendor

  • Room type

  • SSR

  • US state

A category and the argument to either encode or decode must be specified for each call.

  • Encode: To retrieve a code, provide the name as a string and the category.

  • Decode: To retrieve the name, provide the code as a string and the category.

An error is returned if a matching record is not found in the Encode/Decode database.

The Category enumeration represents the categories of pre-defined values. To obtain a list of all categories, use the Category.values() method.

Dependencies and Classes

Both Eclipse and Sabre Red 360 have defined some dependencies and classes that are required to add this service to a plug-in. These requirements follow.

Minimal Required Dependency

com.sabre.edge.platform.optional.encodedecode

Classes

Category class in the com.sabre.edge.platform.optional.encodedecode.domain

An Activator class is required. Either inherit from the AbstractEdgeBaseNonUIPlugin or AbstractEdgeBasePlugin super classes, or obtain a service reference in the standard OSGi way.