public class TenantOptionApiImpl extends Object implements TenantOptionApi
Constructor and Description |
---|
TenantOptionApiImpl(RestConnector restConnector,
TenantApiRepresentation tenantApiRepresentation,
int pageSize) |
Modifier and Type | Method and Description |
---|---|
void |
delete(com.cumulocity.model.option.OptionPK optionPK)
Deletes option from the platform.
|
List<OptionRepresentation> |
getAllOptionsForCategory(String category)
Gets all options from the platform for the specific category
Requires role ROLE_OPTION_MANAGEMENT_READ
|
OptionRepresentation |
getOption(com.cumulocity.model.option.OptionPK optionPK)
Gets an option by id
Requires role ROLE_OPTION_MANAGEMENT_READ
|
TenantOptionCollection |
getOptions()
Gets all options from the platform
Requires role ROLE_OPTION_MANAGEMENT_READ
|
OptionRepresentation |
save(OptionRepresentation representation)
Creates or updates an option in the platform.
|
Future |
saveAsync(OptionRepresentation representation)
Creates or updates an option in the platform.
|
public TenantOptionApiImpl(RestConnector restConnector, TenantApiRepresentation tenantApiRepresentation, int pageSize)
public OptionRepresentation getOption(com.cumulocity.model.option.OptionPK optionPK) throws SDKException
TenantOptionApi
getOption
in interface TenantOptionApi
optionPK
- id of the option to search forSDKException
- if the option is not found or if the query failedpublic TenantOptionCollection getOptions() throws SDKException
TenantOptionApi
getOptions
in interface TenantOptionApi
SDKException
- if the query failedpublic OptionRepresentation save(OptionRepresentation representation) throws SDKException
TenantOptionApi
save
in interface TenantOptionApi
representation
- option to be createdSDKException
- if the option could not be createdpublic Future saveAsync(OptionRepresentation representation) throws SDKException
TenantOptionApi
saveAsync
in interface TenantOptionApi
representation
- option to be createdSDKException
- if the option could not be createdpublic void delete(com.cumulocity.model.option.OptionPK optionPK) throws SDKException
TenantOptionApi
delete
in interface TenantOptionApi
optionPK
- to be deletedSDKException
- if the measurement could not be deletedpublic List<OptionRepresentation> getAllOptionsForCategory(String category) throws SDKException
TenantOptionApi
getAllOptionsForCategory
in interface TenantOptionApi
category
- tenant options categorySDKException
- if the query failedCopyright © 2020 (C) Cumulocity GmbH. All rights reserved.