Package com.cumulocity.rest.representation.inventory

Examples of com.cumulocity.rest.representation.inventory.ManagedObjectRepresentation


    }

    @Override
    public ManagedObjectReferenceCollection getChildDevices() throws SDKException {
        ManagedObjectRepresentation managedObjectRepresentation = get();
        String self = createChildDevicePath(managedObjectRepresentation);
        return new ManagedObjectReferenceCollectionImpl(restConnector,self, pageSize);
    }
View Full Code Here


    @Override
    public ManagedObjectReferenceRepresentation addChildDevice(ManagedObjectReferenceRepresentation refrenceReprsentation)
            throws SDKException {

        ManagedObjectRepresentation managedObjectRepresentation = get();
        return restConnector.post(this.createChildDevicePath(managedObjectRepresentation), InventoryMediaType.MANAGED_OBJECT_REFERENCE,
                refrenceReprsentation);
    }
View Full Code Here

    }
   
    @Override
    public ManagedObjectReferenceRepresentation addChildDevice(GId childId)
            throws SDKException {
        ManagedObjectRepresentation managedObjectRepresentation = get();
        return restConnector.post(this.createChildDevicePath(managedObjectRepresentation), InventoryMediaType.MANAGED_OBJECT_REFERENCE,
                createChildObject(childId));
    }
View Full Code Here

    }

    @Override
    public ManagedObjectReferenceRepresentation getChildDevice(GId deviceId) throws SDKException {

        ManagedObjectRepresentation managedObjectRepresentation = get();
        String path = createChildDevicePath(managedObjectRepresentation) + "/" + deviceId.getValue();
        return restConnector.get(path, InventoryMediaType.MANAGED_OBJECT_REFERENCE, ManagedObjectReferenceRepresentation.class);
    }
View Full Code Here

        return restConnector.get(path, InventoryMediaType.MANAGED_OBJECT_REFERENCE, ManagedObjectReferenceRepresentation.class);
    }

    @Override
    public void deleteChildDevice(GId deviceId) throws SDKException {
        ManagedObjectRepresentation managedObjectRepresentation = get();
        String path = createChildDevicePath(managedObjectRepresentation) + "/" + deviceId.getValue();
        restConnector.delete(path);
    }
View Full Code Here

    }

    @Override
    public ManagedObjectReferenceRepresentation addChildAssets(ManagedObjectReferenceRepresentation refrenceReprsentation)
            throws SDKException {
        ManagedObjectRepresentation managedObjectRepresentation = get();
        return restConnector.post(createChildAssetPath(managedObjectRepresentation), InventoryMediaType.MANAGED_OBJECT_REFERENCE,
                refrenceReprsentation);
    }
View Full Code Here

    }
   
    @Override
    public ManagedObjectReferenceRepresentation addChildAssets(GId childId)
            throws SDKException {
        ManagedObjectRepresentation managedObjectRepresentation = get();
        return restConnector.post(createChildAssetPath(managedObjectRepresentation), InventoryMediaType.MANAGED_OBJECT_REFERENCE,
                createChildObject(childId));
    }
View Full Code Here

                createChildObject(childId));
    }
   
    private ManagedObjectReferenceRepresentation createChildObject(GId childId) {
        ManagedObjectReferenceRepresentation morr = new ManagedObjectReferenceRepresentation();
        ManagedObjectRepresentation mor = new ManagedObjectRepresentation();
        mor.setId(childId);
        morr.setManagedObject(mor);
        return morr;
    }
View Full Code Here

        return managedObjectRepresentation.getChildAssets().getSelf();
    }

    @Override
    public ManagedObjectReferenceCollection getChildAssets() throws SDKException {
        ManagedObjectRepresentation managedObjectRepresentation = get();
        String self = createChildAssetPath(managedObjectRepresentation);
        return new ManagedObjectReferenceCollectionImpl(restConnector,self, pageSize);
    }
View Full Code Here

        return new ManagedObjectReferenceCollectionImpl(restConnector,self, pageSize);
    }

    @Override
    public ManagedObjectReferenceRepresentation getChildAsset(GId assetId) throws SDKException {
        ManagedObjectRepresentation managedObjectRepresentation = get();
        String path = createChildAssetPath(managedObjectRepresentation) + "/" + assetId.getValue();
        return restConnector.get(path, InventoryMediaType.MANAGED_OBJECT_REFERENCE, ManagedObjectReferenceRepresentation.class);
    }
View Full Code Here

TOP

Related Classes of com.cumulocity.rest.representation.inventory.ManagedObjectRepresentation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.