Class ManagedObjectImpl
- java.lang.Object
-
- com.cumulocity.sdk.client.inventory.ManagedObjectImpl
-
- All Implemented Interfaces:
ManagedObject
public class ManagedObjectImpl extends Object implements ManagedObject
-
-
Constructor Summary
Constructors Constructor Description ManagedObjectImpl(RestConnector restConnector, UrlProcessor urlProcessor, String url, int pageSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ManagedObjectRepresentationaddChildAddition(ManagedObjectRepresentation representation)Create ManagedObject and adds as child addition to the parent ManagedObject.ManagedObjectReferenceRepresentationaddChildAdditions(GId childId)Adds a child addition to the ManagedObject.ManagedObjectReferenceRepresentationaddChildAdditions(ManagedObjectReferenceRepresentation refrenceReprsentation)Adds a child addition to the ManagedObject.ManagedObjectRepresentationaddChildAsset(ManagedObjectRepresentation representation)Create ManagedObject and adds as child asset to the parent ManagedObject.ManagedObjectReferenceRepresentationaddChildAssets(GId childId)Adds a child asset to the ManagedObject.ManagedObjectReferenceRepresentationaddChildAssets(ManagedObjectReferenceRepresentation refrenceReprsentation)Adds a child asset to the ManagedObject.ManagedObjectReferenceRepresentationaddChildDevice(GId childId)Adds a child device to the ManagedObject.ManagedObjectReferenceRepresentationaddChildDevice(ManagedObjectReferenceRepresentation refrenceReprsentation)Adds a child device to the ManagedObject.ManagedObjectRepresentationaddChildDevice(ManagedObjectRepresentation representation)Create ManagedObject and adds as child device to the parent ManagedObject.voiddelete()Deprecated.voiddeleteChildAddition(GId additionId)Deletes the child addition and its relation to the managed object.voiddeleteChildAsset(GId assetId)Deletes the child Asset and its relation to the managed object.voiddeleteChildDevice(GId deviceId)Deletes the child device and its relation to the managed object.ManagedObjectRepresentationget()Deprecated.ManagedObjectReferenceRepresentationgetChildAddition(GId additionId)Returns the child additions with the given id.ManagedObjectReferenceCollectiongetChildAdditions()Returns all the child additions for the Managed Object in paged collection formManagedObjectReferenceRepresentationgetChildAsset(GId assetId)Returns the child Asset with the given id.ManagedObjectReferenceCollectiongetChildAssets()Returns all the child Assets for the Managed Object in paged collection formManagedObjectReferenceRepresentationgetChildDevice(GId deviceId)Returns the child device with the given id.ManagedObjectReferenceCollectiongetChildDevices()Returns all the child Devices for the Managed Object in paged collection form.ManagedObjectRepresentationupdate(ManagedObjectRepresentation managedObjectRepresentation)Deprecated.
-
-
-
Constructor Detail
-
ManagedObjectImpl
public ManagedObjectImpl(RestConnector restConnector, UrlProcessor urlProcessor, String url, int pageSize)
-
-
Method Detail
-
get
@Deprecated public ManagedObjectRepresentation get() throws SDKException
Deprecated.Description copied from interface:ManagedObjectReturns the Managed Object of the Resource.- Specified by:
getin interfaceManagedObject- Returns:
- ManagedObjectRepresentation
- Throws:
SDKException- if Managed Object cannot be retrieved
-
delete
@Deprecated public void delete() throws SDKException
Deprecated.Description copied from interface:ManagedObjectDeletes the Managed Object from the Cumulocity Server.- Specified by:
deletein interfaceManagedObject- Throws:
SDKException- when deletion of Managed Object fail
-
update
@Deprecated public ManagedObjectRepresentation update(ManagedObjectRepresentation managedObjectRepresentation) throws SDKException
Deprecated.Description copied from interface:ManagedObjectThis update the ManagedObject for the operationCollection. Cannot update the ID.- Specified by:
updatein interfaceManagedObject- Parameters:
managedObjectRepresentation- ManagedObject that will be updated- Returns:
- ManagedObjectRepresentation updated ManagedObject.
- Throws:
SDKException- when update of Managed Object fail
-
getChildDevices
public ManagedObjectReferenceCollection getChildDevices() throws SDKException
Description copied from interface:ManagedObjectReturns all the child Devices for the Managed Object in paged collection form.- Specified by:
getChildDevicesin 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:ManagedObjectAdds a child device to the ManagedObject.- Specified by:
addChildDevicein interfaceManagedObject- Parameters:
refrenceReprsentation- ManagedObject reference representation- Returns:
- ManagedObjectReferenceRepresentation with the id of th child device.
- Throws:
SDKException- when child references update fail
-
addChildDevice
public ManagedObjectReferenceRepresentation addChildDevice(GId childId) throws SDKException
Description copied from interface:ManagedObjectAdds a child device to the ManagedObject.- Specified by:
addChildDevicein 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:ManagedObjectCreate ManagedObject and adds as child device to the parent ManagedObject.- Specified by:
addChildDevicein interfaceManagedObject- Parameters:
representation- ManagedObject representation- Returns:
- ManagedObjectRepresentation with the managed object.
- Throws:
SDKException- when child references update fail
-
getChildDevice
public ManagedObjectReferenceRepresentation getChildDevice(GId deviceId) throws SDKException
Description copied from interface:ManagedObjectReturns the child device with the given id. If it belongs to the ManagedObject.- Specified by:
getChildDevicein interfaceManagedObject- Parameters:
deviceId- device ManagedObject general identifier- Returns:
- ManagedObjectReferenceRepresentation of the child device.
- Throws:
SDKException- when fetching child device fail
-
deleteChildDevice
public void deleteChildDevice(GId deviceId) throws SDKException
Description copied from interface:ManagedObjectDeletes the child device and its relation to the managed object.- Specified by:
deleteChildDevicein 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:ManagedObjectAdds a child asset to the ManagedObject.- Specified by:
addChildAssetsin interfaceManagedObject- Parameters:
refrenceReprsentation- ManagedObject reference representation- Returns:
- ManagedObjectReferenceRepresentation with the id of th child device.
- Throws:
SDKException- when child references update fail
-
addChildAssets
public ManagedObjectReferenceRepresentation addChildAssets(GId childId) throws SDKException
Description copied from interface:ManagedObjectAdds a child asset to the ManagedObject.- Specified by:
addChildAssetsin 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:ManagedObjectCreate ManagedObject and adds as child asset to the parent ManagedObject.- Specified by:
addChildAssetin interfaceManagedObject- Parameters:
representation- ManagedObject representation- Returns:
- ManagedObjectRepresentation with the managed object.
- Throws:
SDKException- when child references update fail
-
getChildAssets
public ManagedObjectReferenceCollection getChildAssets() throws SDKException
Description copied from interface:ManagedObjectReturns all the child Assets for the Managed Object in paged collection form- Specified by:
getChildAssetsin interfaceManagedObject- Returns:
- ManagedObjectReferenceCollectionRepresentation which contains all the child devices.
- Throws:
SDKException- when fetching child assets fail
-
getChildAsset
public ManagedObjectReferenceRepresentation getChildAsset(GId assetId) throws SDKException
Description copied from interface:ManagedObjectReturns the child Asset with the given id. If it belongs to the ManagedObject.- Specified by:
getChildAssetin interfaceManagedObject- Parameters:
assetId- asset ManagedObject general identifier- Returns:
- ManagedObjectReferenceRepresentation of the child device.
- Throws:
SDKException- when fetching child asset fail
-
deleteChildAsset
public void deleteChildAsset(GId assetId) throws SDKException
Description copied from interface:ManagedObjectDeletes the child Asset and its relation to the managed object.- Specified by:
deleteChildAssetin 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:ManagedObjectAdds a child addition to the ManagedObject.- Specified by:
addChildAdditionsin interfaceManagedObject- Parameters:
refrenceReprsentation- ManagedObject reference representation- Returns:
- ManagedObjectReferenceRepresentation with the id of th child addition.
- Throws:
SDKException- when child references update fail
-
addChildAdditions
public ManagedObjectReferenceRepresentation addChildAdditions(GId childId) throws SDKException
Description copied from interface:ManagedObjectAdds a child addition to the ManagedObject.- Specified by:
addChildAdditionsin 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:ManagedObjectCreate ManagedObject and adds as child addition to the parent ManagedObject.- Specified by:
addChildAdditionin interfaceManagedObject- Parameters:
representation- ManagedObject representation- Returns:
- ManagedObjectRepresentation with the managed object.
- Throws:
SDKException- when child references update fail
-
getChildAdditions
public ManagedObjectReferenceCollection getChildAdditions() throws SDKException
Description copied from interface:ManagedObjectReturns all the child additions for the Managed Object in paged collection form- Specified by:
getChildAdditionsin interfaceManagedObject- Returns:
- ManagedObjectReferenceCollectionRepresentation which contains all the child additions.
- Throws:
SDKException- when fetching child additions fail
-
getChildAddition
public ManagedObjectReferenceRepresentation getChildAddition(GId additionId) throws SDKException
Description copied from interface:ManagedObjectReturns the child additions with the given id. If it belongs to the ManagedObject.- Specified by:
getChildAdditionin interfaceManagedObject- Parameters:
additionId- ManagedObject addition general identifier- Returns:
- ManagedObjectReferenceRepresentation of the child additions.
- Throws:
SDKException- when fetching child addition fail
-
deleteChildAddition
public void deleteChildAddition(GId additionId) throws SDKException
Description copied from interface:ManagedObjectDeletes the child addition and its relation to the managed object.- Specified by:
deleteChildAdditionin interfaceManagedObject- Parameters:
additionId- ManagedObject addition general identifier- Throws:
SDKException- when child addition reference delete faile
-
-