Interface TenantOptionApi

All Known Implementing Classes:
TenantOptionApiImpl

public interface TenantOptionApi
API for creating, updating and retrieving options from the platform.
  • Method Details

    • getOption

      OptionRepresentation getOption(OptionPK optionPK) throws SDKException
      Gets an option by id Requires role ROLE_OPTION_MANAGEMENT_READ
      Parameters:
      optionPK - id of the option to search for
      Returns:
      the option with the given id
      Throws:
      SDKException - if the option is not found or if the query failed
    • getOptions

      Gets all options from the platform Requires role ROLE_OPTION_MANAGEMENT_READ
      Returns:
      collection of options with paging functionality
      Throws:
      SDKException - if the query failed
    • save

      Creates or updates an option in the platform. Requires role ROLE_OPTION_MANAGEMENT_ADMIN
      Parameters:
      option - option to be created
      Returns:
      the created option with the generated id
      Throws:
      SDKException - if the option could not be created
    • saveAsync

      Future saveAsync(OptionRepresentation option) throws SDKException
      Creates or updates an option in the platform. Immediate response is available through the Future object. In case of lost connection, buffers data in persistence provider. Requires role ROLE_OPTION_MANAGEMENT_ADMIN
      Parameters:
      option - option to be created
      Returns:
      the created option with the generated id
      Throws:
      SDKException - if the option could not be created
    • delete

      void delete(OptionPK optionPK) throws SDKException
      Deletes option from the platform. Requires role ROLE_OPTION_MANAGEMENT_ADMIN
      Parameters:
      optionPK - to be deleted
      Throws:
      SDKException - if the measurement could not be deleted
    • getAllOptionsForCategory

      List<OptionRepresentation> getAllOptionsForCategory(String category) throws SDKException
      Gets all options from the platform for the specific category Requires role ROLE_OPTION_MANAGEMENT_READ
      Parameters:
      category - tenant options category
      Returns:
      collection of options
      Throws:
      SDKException - if the query failed