Package com.cumulocity.sdk.client.option
Interface TenantOptionApi
- All Known Implementing Classes:
TenantOptionApiImpl
public interface TenantOptionApi
API for creating, updating and retrieving options from the platform.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deletes option from the platform.getAllOptionsForCategory
(String category) Gets all options from the platform for the specific category Requires role ROLE_OPTION_MANAGEMENT_READGets an option by id Requires role ROLE_OPTION_MANAGEMENT_READGets all options from the platform Requires role ROLE_OPTION_MANAGEMENT_READsave
(OptionRepresentation option) Creates or updates an option in the platform.saveAsync
(OptionRepresentation option) Creates or updates an option in the platform.
-
Method Details
-
getOption
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
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
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
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
-