Package com.cumulocity.me.rest.representation.inventory

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


    }

    @Test
    public void bulkQuery() throws Exception {
        // Given
        ManagedObjectRepresentation mo1 = inventory.create(aSampleMo().withName("MO1").build());
        ManagedObjectRepresentation mo3 = inventory.create(aSampleMo().withName("MO3").build());
        inventory.create(aSampleMo().withName("MO2").build());

        // When
        List gidsList = new ArrayList();
        gidsList.add(mo3.getId());
        gidsList.add(mo1.getId());
        ManagedObjectCollectionRepresentation moCollection = (ManagedObjectCollectionRepresentation) inventory.getManagedObjectsByListOfIds(gidsList).get();

        // Then
        List mos = moCollection.getManagedObjects();
View Full Code Here


    }

    private void deleteMOs(List mosOn1stPage) throws SDKException {
        Iterator iterator = mosOn1stPage.iterator();
        while (iterator.hasNext()) {
        ManagedObjectRepresentation mo  = (ManagedObjectRepresentation) iterator.next();
            inventory.getManagedObject(mo.getId()).delete();
        }
    }
View Full Code Here

    public PagedCollectionResource getEventsByFilter(EventFilter filter) throws SDKException {
        String type = filter.getType();
        Date dateFrom = filter.getFromDate();
        Date dateTo = filter.getToDate();
        Class fragmentType = filter.getFragmentType();
        ManagedObjectRepresentation source = filter.getSource();

        Map filterMap = new HashMap();
        if (null != source) {
            filterMap.put(SOURCE, source.getId().getValue());
        }
        if (null != dateFrom) {
            filterMap.put(DATE_FROM, DateUtils.format(dateFrom));
        }
        if (null != dateTo) {
View Full Code Here

TOP

Related Classes of com.cumulocity.me.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.