public class InventoryApiImpl extends Object implements InventoryApi
Constructor and Description |
---|
InventoryApiImpl(RestConnector restConnector,
UrlProcessor urlProcessor,
InventoryRepresentation inventoryRepresentation,
int pageSize) |
Modifier and Type | Method and Description |
---|---|
ManagedObjectRepresentation |
create(ManagedObjectRepresentation representation)
Creates managed object in the platform.
|
void |
delete(com.cumulocity.model.idtype.GId id)
Deletes the Managed Object from the Cumulocity Server.
|
void |
deleteCascade(com.cumulocity.model.idtype.GId id)
Deletes the Managed Object and all child devices and child assets recursively from the Cumulocity Server.
|
ManagedObjectRepresentation |
get(com.cumulocity.model.idtype.GId id)
Returns the Managed Object of the Resource.
|
ManagedObjectRepresentation |
get(com.cumulocity.model.idtype.GId id,
QueryParam... params)
Returns the Managed Object of the Resource.
|
ManagedObject |
getManagedObject(com.cumulocity.model.idtype.GId globalId)
Gets managed object resource by id.
|
ManagedObject |
getManagedObjectApi(com.cumulocity.model.idtype.GId globalId)
Gets managed object resource by id.
|
ManagedObjectCollection |
getManagedObjects()
Gets the all the managed object in the platform
|
ManagedObjectCollection |
getManagedObjectsByFilter(InventoryFilter filter)
Gets the managed objects from the platform based on specified filter.
|
ManagedObjectCollection |
getManagedObjectsByListOfIds(List<com.cumulocity.model.idtype.GId> ids)
Deprecated.
|
protected String |
getMOCollectionUrl() |
SupportedMeasurementsRepresentation |
getSupportedMeasurements(com.cumulocity.model.idtype.GId sourceId)
Returns supported measurements of the Managed Object specified by its id
|
SupportedSeriesRepresentation |
getSupportedSeries(com.cumulocity.model.idtype.GId sourceId)
Returns supported series of the Managed Object specified by its id
|
ManagedObjectRepresentation |
update(ManagedObjectRepresentation managedObjectRepresentation)
This update the ManagedObject for the operationCollection.
|
public InventoryApiImpl(RestConnector restConnector, UrlProcessor urlProcessor, InventoryRepresentation inventoryRepresentation, int pageSize)
public ManagedObjectRepresentation create(ManagedObjectRepresentation representation) throws SDKException
InventoryApi
create
in interface InventoryApi
representation
- the managed object to be createdSDKException
- if the managed object could not be createdpublic ManagedObjectRepresentation get(com.cumulocity.model.idtype.GId id) throws SDKException
InventoryApi
get
in interface InventoryApi
id
- Managed Object General IdentifierSDKException
- if query failedpublic ManagedObjectRepresentation get(com.cumulocity.model.idtype.GId id, QueryParam... params) throws SDKException
InventoryApi
get
in interface InventoryApi
id
- Managed Object General Identifierparams
- query parametersSDKException
- if query failedpublic void delete(com.cumulocity.model.idtype.GId id) throws SDKException
InventoryApi
delete
in interface InventoryApi
id
- Managed Object General IdentifierSDKException
- if the managed object could not be deletedpublic void deleteCascade(com.cumulocity.model.idtype.GId id) throws SDKException
InventoryApi
deleteCascade
in interface InventoryApi
id
- Managed Object General IdentifierSDKException
- if the managed object could not be deletedpublic ManagedObjectRepresentation update(ManagedObjectRepresentation managedObjectRepresentation) throws SDKException
InventoryApi
update
in interface InventoryApi
managedObjectRepresentation
- managed object representationSDKException
- if the managed object could not be updatedpublic ManagedObject getManagedObject(com.cumulocity.model.idtype.GId globalId) throws SDKException
InventoryApi
get()
on the returned resource.getManagedObject
in interface InventoryApi
globalId
- id of the managed object to search forSDKException
- if the query failedpublic ManagedObject getManagedObjectApi(com.cumulocity.model.idtype.GId globalId) throws SDKException
InventoryApi
get()
on the returned resource.getManagedObjectApi
in interface InventoryApi
globalId
- id of the managed object to search forSDKException
- if the query failedpublic ManagedObjectCollection getManagedObjects() throws SDKException
InventoryApi
getManagedObjects
in interface InventoryApi
SDKException
- if the query failedpublic ManagedObjectCollection getManagedObjectsByFilter(InventoryFilter filter) throws SDKException
InventoryApi
type
and fragmentType
is
not supported.getManagedObjectsByFilter
in interface InventoryApi
filter
- the filter criteria(s)SDKException
- if the query failedpublic SupportedMeasurementsRepresentation getSupportedMeasurements(com.cumulocity.model.idtype.GId sourceId) throws SDKException
InventoryApi
getSupportedMeasurements
in interface InventoryApi
sourceId
- id of the managed object to search forSDKException
- if managed object does not existspublic SupportedSeriesRepresentation getSupportedSeries(com.cumulocity.model.idtype.GId sourceId) throws SDKException
InventoryApi
getSupportedSeries
in interface InventoryApi
sourceId
- id of the managed object to search forSDKException
- if managed object does not exists@Deprecated public ManagedObjectCollection getManagedObjectsByListOfIds(List<com.cumulocity.model.idtype.GId> ids) throws SDKException
InventoryApi
getManagedObjectsByListOfIds
in interface InventoryApi
ids
- the list of ids of the managed objects to search forSDKException
- if the query failedprotected String getMOCollectionUrl() throws SDKException
SDKException
Copyright © 2020 (C) Cumulocity GmbH. All rights reserved.