Interface ManagedObject

  • All Known Implementing Classes:
    ManagedObjectImpl

    public interface ManagedObject
    Java Interface to call the Cumulocity Inventory Rest API.
    • Method Detail

      • delete

        @Deprecated
        void delete()
             throws SDKException
        Deprecated.
        Deletes the Managed Object from the Cumulocity Server.
        Throws:
        SDKException - when deletion of Managed Object fail
      • addChildDevice

        ManagedObjectReferenceRepresentation addChildDevice​(GId childId)
                                                     throws SDKException
        Adds a child device to the ManagedObject.
        Parameters:
        childId - child ManagedObject general identifier
        Returns:
        ManagedObjectReferenceRepresentation with the id of th child device.
        Throws:
        SDKException - when child references update fail
      • getChildDevices

        ManagedObjectReferenceCollection 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 - when fetching child devices fail
      • getChildDevice

        ManagedObjectReferenceRepresentation getChildDevice​(GId deviceId)
                                                     throws SDKException
        Returns the child device with the given id. If it belongs to the ManagedObject.
        Parameters:
        deviceId - device ManagedObject general identifier
        Returns:
        ManagedObjectReferenceRepresentation of the child device.
        Throws:
        SDKException - when fetching child device fail
      • deleteChildDevice

        void deleteChildDevice​(GId deviceId)
                        throws SDKException
        Deletes the child device and its relation to the managed object.
        Parameters:
        deviceId - device ManagedObject general identifier
        Throws:
        SDKException - when delete of child device fail
      • addChildAssets

        ManagedObjectReferenceRepresentation addChildAssets​(GId childId)
                                                     throws SDKException
        Adds a child asset to the ManagedObject.
        Parameters:
        childId - child ManagedObject general identifier
        Returns:
        ManagedObjectReferenceRepresentation with the id of th child device.
        Throws:
        SDKException - when child references update fail
      • getChildAssets

        ManagedObjectReferenceCollection 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 - when fetching child assets fail
      • getChildAsset

        ManagedObjectReferenceRepresentation getChildAsset​(GId assetId)
                                                    throws SDKException
        Returns the child Asset with the given id. If it belongs to the ManagedObject.
        Parameters:
        assetId - asset ManagedObject general identifier
        Returns:
        ManagedObjectReferenceRepresentation of the child device.
        Throws:
        SDKException - when fetching child asset fail
      • deleteChildAsset

        void deleteChildAsset​(GId assetId)
                       throws SDKException
        Deletes the child Asset and its relation to the managed object.
        Parameters:
        assetId - asset ManagedObject general identifier
        Throws:
        SDKException - when deleting child asset fail
      • addChildAdditions

        ManagedObjectReferenceRepresentation addChildAdditions​(GId childId)
                                                        throws SDKException
        Adds a child addition to the ManagedObject.
        Parameters:
        childId - child addition ManagedObject general identifier
        Returns:
        ManagedObjectReferenceRepresentation with the id of th child addition.
        Throws:
        SDKException - when child references update fail
      • getChildAdditions

        ManagedObjectReferenceCollection getChildAdditions()
                                                    throws SDKException
        Returns all the child additions for the Managed Object in paged collection form
        Returns:
        ManagedObjectReferenceCollectionRepresentation which contains all the child additions.
        Throws:
        SDKException - when fetching child additions fail
      • getChildAddition

        ManagedObjectReferenceRepresentation getChildAddition​(GId additionId)
                                                       throws SDKException
        Returns the child additions with the given id. If it belongs to the ManagedObject.
        Parameters:
        additionId - ManagedObject addition general identifier
        Returns:
        ManagedObjectReferenceRepresentation of the child additions.
        Throws:
        SDKException - when fetching child addition fail
      • deleteChildAddition

        void deleteChildAddition​(GId additionId)
                          throws SDKException
        Deletes the child addition and its relation to the managed object.
        Parameters:
        additionId - ManagedObject addition general identifier
        Throws:
        SDKException - when child addition reference delete faile