Class ReferenceApi

java.lang.Object
africa.absa.inception.api.SecureApi
africa.absa.inception.reference.ReferenceApi

@RestController @RequestMapping("/api/reference") @CrossOrigin public class ReferenceApi extends SecureApi
The ReferenceApi class.
Author:
Marcus Portmann
  • Constructor Details

    • ReferenceApi

      public ReferenceApi(org.springframework.context.ApplicationContext applicationContext, IReferenceService referenceService)
      Constructs a new ReferenceRestController.
      Parameters:
      applicationContext - the Spring application context
      referenceService - the Reference Service
  • Method Details

    • getCountries

      @RequestMapping(value="/countries", method=GET, produces="application/json") @ResponseStatus(OK) @PreAuthorize("isSecurityDisabled() or isAuthenticated()") public List<Country> getCountries(@RequestParam(value="localeId",required=false,defaultValue="en-US") String localeId) throws africa.absa.inception.core.service.InvalidArgumentException, africa.absa.inception.core.service.ServiceUnavailableException
      Retrieve the country reference data for a specific locale.
      Parameters:
      localeId - the Unicode locale identifier for the locale to retrieve the country reference data for
      Returns:
      the country reference data
      Throws:
      africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
      africa.absa.inception.core.service.ServiceUnavailableException - if the country reference data could not be retrieved
    • getLanguages

      @RequestMapping(value="/languages", method=GET, produces="application/json") @ResponseStatus(OK) @PreAuthorize("isSecurityDisabled() or isAuthenticated()") public List<Language> getLanguages(@RequestParam(value="localeId",required=false,defaultValue="en-US") String localeId) throws africa.absa.inception.core.service.InvalidArgumentException, africa.absa.inception.core.service.ServiceUnavailableException
      Retrieve the language reference data for a specific locale.
      Parameters:
      localeId - the Unicode locale identifier for the locale to retrieve the language reference data for
      Returns:
      the language reference data
      Throws:
      africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
      africa.absa.inception.core.service.ServiceUnavailableException - if the language reference data could not be retrieved
    • getMeasurementSystems

      @RequestMapping(value="/measurement-systems", method=GET, produces="application/json") @ResponseStatus(OK) @PreAuthorize("isSecurityDisabled() or isAuthenticated()") public List<MeasurementSystem> getMeasurementSystems(@RequestParam(value="localeId",required=false,defaultValue="en-US") String localeId) throws africa.absa.inception.core.service.InvalidArgumentException, africa.absa.inception.core.service.ServiceUnavailableException
      Retrieve the measurement system reference data for a specific locale.
      Parameters:
      localeId - the Unicode locale identifier for the locale to retrieve the measurement system reference data for
      Returns:
      the measurement system reference data
      Throws:
      africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
      africa.absa.inception.core.service.ServiceUnavailableException - if the measurement system reference data could not be retrieved
    • getMeasurementUnitTypes

      @RequestMapping(value="/measurement-unit-types", method=GET, produces="application/json") @ResponseStatus(OK) @PreAuthorize("isSecurityDisabled() or isAuthenticated()") public List<MeasurementUnitType> getMeasurementUnitTypes(@RequestParam(value="localeId",required=false,defaultValue="en-US") String localeId) throws africa.absa.inception.core.service.InvalidArgumentException, africa.absa.inception.core.service.ServiceUnavailableException
      Retrieve the measurement unit type reference data for a specific locale.
      Parameters:
      localeId - the Unicode locale identifier for the locale to retrieve the measurement unit type reference data for
      Returns:
      the measurement unit type reference data
      Throws:
      africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
      africa.absa.inception.core.service.ServiceUnavailableException - if the measurement unit type reference data could not be retrieved
    • getMeasurementUnits

      @RequestMapping(value="/measurement-units", method=GET, produces="application/json") @ResponseStatus(OK) @PreAuthorize("isSecurityDisabled() or isAuthenticated()") public List<MeasurementUnit> getMeasurementUnits(@RequestParam(value="localeId",required=false,defaultValue="en-US") String localeId) throws africa.absa.inception.core.service.InvalidArgumentException, africa.absa.inception.core.service.ServiceUnavailableException
      Retrieve the measurement unit reference data for a specific locale.
      Parameters:
      localeId - the Unicode locale identifier for the locale to retrieve the measurement unit reference data
      Returns:
      the measurement unit reference data
      Throws:
      africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
      africa.absa.inception.core.service.ServiceUnavailableException - if the measurement unit reference data could not be retrieved
    • getRegions

      @RequestMapping(value="/regions", method=GET, produces="application/json") @ResponseStatus(OK) @PreAuthorize("isSecurityDisabled() or isAuthenticated()") public List<Region> getRegions(@RequestParam(value="localeId",required=false,defaultValue="en-US") String localeId) throws africa.absa.inception.core.service.InvalidArgumentException, africa.absa.inception.core.service.ServiceUnavailableException
      Retrieve the region reference data for a specific locale.
      Parameters:
      localeId - the Unicode locale identifier for the locale to retrieve the region reference data for
      Returns:
      the region reference data
      Throws:
      africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
      africa.absa.inception.core.service.ServiceUnavailableException - if the region reference data could not be retrieved
    • getTimeZones

      @RequestMapping(value="/time-zones", method=GET, produces="application/json") @ResponseStatus(OK) @PreAuthorize("isSecurityDisabled() or isAuthenticated()") public List<TimeZone> getTimeZones(@RequestParam(value="localeId",required=false,defaultValue="en-US") String localeId) throws africa.absa.inception.core.service.InvalidArgumentException, africa.absa.inception.core.service.ServiceUnavailableException
      Retrieve the time zone reference data for a specific locale.
      Parameters:
      localeId - the Unicode locale identifier for the locale to retrieve the time zone reference data for
      Returns:
      the time zone reference data
      Throws:
      africa.absa.inception.core.service.InvalidArgumentException - if an argument is invalid
      africa.absa.inception.core.service.ServiceUnavailableException - if the time zones reference data could not be retrieved