Class ManagedObjectImpl
java.lang.Object
com.cumulocity.sdk.client.inventory.ManagedObjectImpl
- All Implemented Interfaces:
ManagedObject
-
Constructor Summary
ConstructorDescriptionManagedObjectImpl
(RestConnector restConnector, UrlProcessor urlProcessor, String url, int pageSize) -
Method Summary
Modifier and TypeMethodDescriptionaddChildAddition
(ManagedObjectRepresentation representation) Create ManagedObject and adds as child addition to the parent ManagedObject.addChildAdditions
(GId childId) Adds a child addition to the ManagedObject.addChildAdditions
(ManagedObjectReferenceRepresentation refrenceReprsentation) Adds a child addition to the ManagedObject.addChildAsset
(ManagedObjectRepresentation representation) Create ManagedObject and adds as child asset to the parent ManagedObject.addChildAssets
(GId childId) Adds a child asset to the ManagedObject.addChildAssets
(ManagedObjectReferenceRepresentation refrenceReprsentation) Adds a child asset to the ManagedObject.addChildDevice
(GId childId) Adds a child device to the ManagedObject.addChildDevice
(ManagedObjectReferenceRepresentation refrenceReprsentation) Adds a child device to the ManagedObject.addChildDevice
(ManagedObjectRepresentation representation) Create ManagedObject and adds as child device to the parent ManagedObject.void
delete()
Deprecated.void
deleteChildAddition
(GId additionId) Deletes the child addition and its relation to the managed object.void
deleteChildAsset
(GId assetId) Deletes the child Asset and its relation to the managed object.void
deleteChildDevice
(GId deviceId) Deletes the child device and its relation to the managed object.get()
Deprecated.getChildAddition
(GId additionId) Returns the child additions with the given id.Returns all the child additions for the Managed Object in paged collection formgetChildAsset
(GId assetId) Returns the child Asset with the given id.Returns all the child Assets for the Managed Object in paged collection formgetChildDevice
(GId deviceId) Returns the child device with the given id.Returns all the child Devices for the Managed Object in paged collection form.update
(ManagedObjectRepresentation managedObjectRepresentation) Deprecated.
-
Constructor Details
-
ManagedObjectImpl
public ManagedObjectImpl(RestConnector restConnector, UrlProcessor urlProcessor, String url, int pageSize)
-
-
Method Details
-
get
Deprecated.Description copied from interface:ManagedObject
Returns the Managed Object of the Resource.- Specified by:
get
in interfaceManagedObject
- Returns:
- ManagedObjectRepresentation
- Throws:
SDKException
- if Managed Object cannot be retrieved
-
delete
Deprecated.Description copied from interface:ManagedObject
Deletes the Managed Object from the Cumulocity Server.- Specified by:
delete
in interfaceManagedObject
- Throws:
SDKException
- when deletion of Managed Object fail
-
update
@Deprecated public ManagedObjectRepresentation update(ManagedObjectRepresentation managedObjectRepresentation) throws SDKException Deprecated.Description copied from interface:ManagedObject
This update the ManagedObject for the operationCollection. Cannot update the ID.- Specified by:
update
in interfaceManagedObject
- Parameters:
managedObjectRepresentation
- ManagedObject that will be updated- Returns:
- ManagedObjectRepresentation updated ManagedObject.
- Throws:
SDKException
- when update of Managed Object fail
-
getChildDevices
Description copied from interface:ManagedObject
Returns all the child Devices for the Managed Object in paged collection form.- Specified by:
getChildDevices
in interfaceManagedObject
- Returns:
- ManagedObjectReferenceCollectionRepresentation which contains all the child devices.
- Throws:
SDKException
- when fetching child devices fail
-
addChildDevice
public ManagedObjectReferenceRepresentation addChildDevice(ManagedObjectReferenceRepresentation refrenceReprsentation) throws SDKException Description copied from interface:ManagedObject
Adds a child device to the ManagedObject.- Specified by:
addChildDevice
in interfaceManagedObject
- Parameters:
refrenceReprsentation
- ManagedObject reference representation- Returns:
- ManagedObjectReferenceRepresentation with the id of th child device.
- Throws:
SDKException
- when child references update fail
-
addChildDevice
Description copied from interface:ManagedObject
Adds a child device to the ManagedObject.- Specified by:
addChildDevice
in interfaceManagedObject
- Parameters:
childId
- child ManagedObject general identifier- Returns:
- ManagedObjectReferenceRepresentation with the id of th child device.
- Throws:
SDKException
- when child references update fail
-
addChildDevice
public ManagedObjectRepresentation addChildDevice(ManagedObjectRepresentation representation) throws SDKException Description copied from interface:ManagedObject
Create ManagedObject and adds as child device to the parent ManagedObject.- Specified by:
addChildDevice
in interfaceManagedObject
- Parameters:
representation
- ManagedObject representation- Returns:
- ManagedObjectRepresentation with the managed object.
- Throws:
SDKException
- when child references update fail
-
getChildDevice
Description copied from interface:ManagedObject
Returns the child device with the given id. If it belongs to the ManagedObject.- Specified by:
getChildDevice
in interfaceManagedObject
- Parameters:
deviceId
- device ManagedObject general identifier- Returns:
- ManagedObjectReferenceRepresentation of the child device.
- Throws:
SDKException
- when fetching child device fail
-
deleteChildDevice
Description copied from interface:ManagedObject
Deletes the child device and its relation to the managed object.- Specified by:
deleteChildDevice
in interfaceManagedObject
- Parameters:
deviceId
- device ManagedObject general identifier- Throws:
SDKException
- when delete of child device fail
-
addChildAssets
public ManagedObjectReferenceRepresentation addChildAssets(ManagedObjectReferenceRepresentation refrenceReprsentation) throws SDKException Description copied from interface:ManagedObject
Adds a child asset to the ManagedObject.- Specified by:
addChildAssets
in interfaceManagedObject
- Parameters:
refrenceReprsentation
- ManagedObject reference representation- Returns:
- ManagedObjectReferenceRepresentation with the id of th child device.
- Throws:
SDKException
- when child references update fail
-
addChildAssets
Description copied from interface:ManagedObject
Adds a child asset to the ManagedObject.- Specified by:
addChildAssets
in interfaceManagedObject
- Parameters:
childId
- child ManagedObject general identifier- Returns:
- ManagedObjectReferenceRepresentation with the id of th child device.
- Throws:
SDKException
- when child references update fail
-
addChildAsset
public ManagedObjectRepresentation addChildAsset(ManagedObjectRepresentation representation) throws SDKException Description copied from interface:ManagedObject
Create ManagedObject and adds as child asset to the parent ManagedObject.- Specified by:
addChildAsset
in interfaceManagedObject
- Parameters:
representation
- ManagedObject representation- Returns:
- ManagedObjectRepresentation with the managed object.
- Throws:
SDKException
- when child references update fail
-
getChildAssets
Description copied from interface:ManagedObject
Returns all the child Assets for the Managed Object in paged collection form- Specified by:
getChildAssets
in interfaceManagedObject
- Returns:
- ManagedObjectReferenceCollectionRepresentation which contains all the child devices.
- Throws:
SDKException
- when fetching child assets fail
-
getChildAsset
Description copied from interface:ManagedObject
Returns the child Asset with the given id. If it belongs to the ManagedObject.- Specified by:
getChildAsset
in interfaceManagedObject
- Parameters:
assetId
- asset ManagedObject general identifier- Returns:
- ManagedObjectReferenceRepresentation of the child device.
- Throws:
SDKException
- when fetching child asset fail
-
deleteChildAsset
Description copied from interface:ManagedObject
Deletes the child Asset and its relation to the managed object.- Specified by:
deleteChildAsset
in interfaceManagedObject
- Parameters:
assetId
- asset ManagedObject general identifier- Throws:
SDKException
- when deleting child asset fail
-
addChildAdditions
public ManagedObjectReferenceRepresentation addChildAdditions(ManagedObjectReferenceRepresentation refrenceReprsentation) throws SDKException Description copied from interface:ManagedObject
Adds a child addition to the ManagedObject.- Specified by:
addChildAdditions
in interfaceManagedObject
- Parameters:
refrenceReprsentation
- ManagedObject reference representation- Returns:
- ManagedObjectReferenceRepresentation with the id of th child addition.
- Throws:
SDKException
- when child references update fail
-
addChildAdditions
Description copied from interface:ManagedObject
Adds a child addition to the ManagedObject.- Specified by:
addChildAdditions
in interfaceManagedObject
- Parameters:
childId
- child addition ManagedObject general identifier- Returns:
- ManagedObjectReferenceRepresentation with the id of th child addition.
- Throws:
SDKException
- when child references update fail
-
addChildAddition
public ManagedObjectRepresentation addChildAddition(ManagedObjectRepresentation representation) throws SDKException Description copied from interface:ManagedObject
Create ManagedObject and adds as child addition to the parent ManagedObject.- Specified by:
addChildAddition
in interfaceManagedObject
- Parameters:
representation
- ManagedObject representation- Returns:
- ManagedObjectRepresentation with the managed object.
- Throws:
SDKException
- when child references update fail
-
getChildAdditions
Description copied from interface:ManagedObject
Returns all the child additions for the Managed Object in paged collection form- Specified by:
getChildAdditions
in interfaceManagedObject
- Returns:
- ManagedObjectReferenceCollectionRepresentation which contains all the child additions.
- Throws:
SDKException
- when fetching child additions fail
-
getChildAddition
Description copied from interface:ManagedObject
Returns the child additions with the given id. If it belongs to the ManagedObject.- Specified by:
getChildAddition
in interfaceManagedObject
- Parameters:
additionId
- ManagedObject addition general identifier- Returns:
- ManagedObjectReferenceRepresentation of the child additions.
- Throws:
SDKException
- when fetching child addition fail
-
deleteChildAddition
Description copied from interface:ManagedObject
Deletes the child addition and its relation to the managed object.- Specified by:
deleteChildAddition
in interfaceManagedObject
- Parameters:
additionId
- ManagedObject addition general identifier- Throws:
SDKException
- when child addition reference delete faile
-