com.cumulocity.sdk.client.inventory
Interface ManagedObject

All Known Implementing Classes:
ManagedObjectImpl

public interface ManagedObject

Java Interface to call the Cumulocity Inventory Rest API.


Method Summary
 ManagedObjectReferenceRepresentation addChildAssets(ManagedObjectReferenceRepresentation refrenceReprsentation)
          Adds a child device to the ManagedObject.
 ManagedObjectReferenceRepresentation addChildDevice(ManagedObjectReferenceRepresentation refrenceReprsentation)
          Adds a child device to the ManagedObject.
 void delete()
          Deletes the Managed Object from the Cumulocity Server.
 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.
 ManagedObjectRepresentation get()
          Returns the Managed Object of the Resource.
 ManagedObjectReferenceCollectionRepresentation getAllChildAssets()
          Deprecated. 
 ManagedObjectReferenceCollectionRepresentation getAllChildDevices()
          Deprecated. 
 ManagedObjectReferenceRepresentation getChildAsset(GId assetId)
          Returns the child Asset with the given id.
 PagedCollectionResource<ManagedObjectReferenceCollectionRepresentation> getChildAssets()
          Returns all the child Assets for the Managed Object in paged collection form
 ManagedObjectReferenceRepresentation getChildDevice(GId deviceId)
          Returns the child device with the given id.
 PagedCollectionResource<ManagedObjectReferenceCollectionRepresentation> getChildDevices()
          Returns all the child Devices for the Managed Object in paged collection form.
 ManagedObjectRepresentation update(ManagedObjectRepresentation managedObjectRepresentation)
          This update the ManagedObject for the operationCollection.
 

Method Detail

get

ManagedObjectRepresentation get()
                                throws SDKException
Returns the Managed Object of the Resource.

Returns:
ManagedObjectRepresentation
Throws:
SDKException

delete

void delete()
            throws SDKException
Deletes the Managed Object from the Cumulocity Server.

Throws:
SDKException

update

ManagedObjectRepresentation update(ManagedObjectRepresentation managedObjectRepresentation)
                                   throws SDKException
This update the ManagedObject for the operationCollection. Cannot update the ID.

Parameters:
managedObjectRepresentation -
Returns:
ManagedObjectRepresentation updated ManagedObject.
Throws:
SDKException

addChildDevice

ManagedObjectReferenceRepresentation addChildDevice(ManagedObjectReferenceRepresentation refrenceReprsentation)
                                                    throws SDKException
Adds a child device to the ManagedObject.

Parameters:
refrenceReprsentation -
Returns:
ManagedObjectReferenceRepresentation with the id of th child device.
Throws:
SDKException

getChildDevices

PagedCollectionResource<ManagedObjectReferenceCollectionRepresentation> getChildDevices()
                                                                                        throws SDKException
Returns all the child Devices for the Managed Object in paged collection form.

Returns:
ManagedObjectReferenceCollectionRepresentation which contains all the child devices.
Throws:
SDKException

getAllChildDevices

@Deprecated
ManagedObjectReferenceCollectionRepresentation getAllChildDevices()
                                                                  throws SDKException
Deprecated. 

Returns all the child devices for the Managed Object. Max number of child devices limited to Short.MAX_VALUE = 32767 This method is deprecated. Please use PagedCollectionResource getChildDevices() throws SDKException;

Returns:
ManagedObjectReferenceCollectionRepresentation which contains all the child devices.
Throws:
SDKException

getChildDevice

ManagedObjectReferenceRepresentation getChildDevice(GId deviceId)
                                                    throws SDKException
Returns the child device with the given id. If it belongs to the ManagedObject.

Parameters:
deviceId -
Returns:
ManagedObjectReferenceRepresentation of the child device.
Throws:
SDKException

deleteChildDevice

void deleteChildDevice(GId deviceId)
                       throws SDKException
Deletes the child device and its relation to the managed object.

Parameters:
deviceId -
Throws:
SDKException

addChildAssets

ManagedObjectReferenceRepresentation addChildAssets(ManagedObjectReferenceRepresentation refrenceReprsentation)
                                                    throws SDKException
Adds a child device to the ManagedObject.

Parameters:
refrenceReprsentation -
Returns:
ManagedObjectReferenceRepresentation with the id of th child device.
Throws:
SDKException

getAllChildAssets

@Deprecated
ManagedObjectReferenceCollectionRepresentation getAllChildAssets()
                                                                 throws SDKException
Deprecated. 

Returns all the child Assets for the Managed Object. Max number of child devices limited to Short.MAX_VALUE = 32767 This method is deprecated. Please use PagedCollectionResource getChildAssets() throws SDKException;

Returns:
ManagedObjectReferenceCollectionRepresentation which contains all the child devices.
Throws:
SDKException

getChildAssets

PagedCollectionResource<ManagedObjectReferenceCollectionRepresentation> getChildAssets()
                                                                                       throws SDKException
Returns all the child Assets for the Managed Object in paged collection form

Returns:
ManagedObjectReferenceCollectionRepresentation which contains all the child devices.
Throws:
SDKException

getChildAsset

ManagedObjectReferenceRepresentation getChildAsset(GId assetId)
                                                   throws SDKException
Returns the child Asset with the given id. If it belongs to the ManagedObject.

Parameters:
assetId -
Returns:
ManagedObjectReferenceRepresentation of the child device.
Throws:
SDKException

deleteChildAsset

void deleteChildAsset(GId assetId)
                      throws SDKException
Deletes the child Asset and its relation to the managed object.

Parameters:
assetId -
Throws:
SDKException


Copyright © 2013 (C) Cumulocity GmbH. All Rights Reserved.