Package com.cumulocity.sdk.client.option
Class TenantOptionApiImpl
java.lang.Object
com.cumulocity.sdk.client.option.TenantOptionApiImpl
- All Implemented Interfaces:
TenantOptionApi
-
Constructor Summary
ConstructorsConstructorDescriptionTenantOptionApiImpl(RestConnector restConnector, TenantApiRepresentation tenantApiRepresentation, int pageSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes 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 representation) Creates or updates an option in the platform.saveAsync(OptionRepresentation representation) Creates or updates an option in the platform.
-
Constructor Details
-
TenantOptionApiImpl
public TenantOptionApiImpl(RestConnector restConnector, TenantApiRepresentation tenantApiRepresentation, int pageSize)
-
-
Method Details
-
getOption
Description copied from interface:TenantOptionApiGets an option by id Requires role ROLE_OPTION_MANAGEMENT_READ- Specified by:
getOptionin interfaceTenantOptionApi- 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
Description copied from interface:TenantOptionApiGets all options from the platform Requires role ROLE_OPTION_MANAGEMENT_READ- Specified by:
getOptionsin interfaceTenantOptionApi- Returns:
- collection of options with paging functionality
- Throws:
SDKException- if the query failed
-
save
Description copied from interface:TenantOptionApiCreates or updates an option in the platform. Requires role ROLE_OPTION_MANAGEMENT_ADMIN- Specified by:
savein interfaceTenantOptionApi- Parameters:
representation- option to be created- Returns:
- the created option with the generated id
- Throws:
SDKException- if the option could not be created
-
saveAsync
Description copied from interface:TenantOptionApiCreates 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- Specified by:
saveAsyncin interfaceTenantOptionApi- Parameters:
representation- option to be created- Returns:
- the created option with the generated id
- Throws:
SDKException- if the option could not be created
-
delete
Description copied from interface:TenantOptionApiDeletes option from the platform. Requires role ROLE_OPTION_MANAGEMENT_ADMIN- Specified by:
deletein interfaceTenantOptionApi- Parameters:
optionPK- to be deleted- Throws:
SDKException- if the measurement could not be deleted
-
getAllOptionsForCategory
Description copied from interface:TenantOptionApiGets all options from the platform for the specific category Requires role ROLE_OPTION_MANAGEMENT_READ- Specified by:
getAllOptionsForCategoryin interfaceTenantOptionApi- Parameters:
category- tenant options category- Returns:
- collection of options
- Throws:
SDKException- if the query failed
-