Package com.cumulocity.me.lang

Examples of com.cumulocity.me.lang.HashMap$EntrySet


        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }

    private PagedCollectionResource getMeasurementsByDateAndFragmentType(Date dateFrom, Date dateTo,
            Class fragmentType) throws SDKException {
        Map filter = new HashMap();
        filter.put(DATE_FROM, DateUtils.format(dateFrom));
        filter.put(DATE_TO, DateUtils.format(dateTo));
        filter.put(FRAGMENT_TYPE, ExtensibilityConverter.classToStringRepresentation(fragmentType));
        String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForDateAndFragmentType();
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here


        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }

    private PagedCollectionResource getMeasurementsByDateAndType(Date dateFrom, Date dateTo,
            String type) throws SDKException {
        Map filter = new HashMap();
        filter.put(DATE_FROM, DateUtils.format(dateFrom));
        filter.put(DATE_TO, DateUtils.format(dateTo));
        filter.put(TYPE, type);
        String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForDateAndType();
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }

    private PagedCollectionResource getMeasurementsByFragmentTypeAndType(Class fragmentType,
            String type) throws SDKException {
        Map filter = new HashMap();
        filter.put(FRAGMENT_TYPE, ExtensibilityConverter.classToStringRepresentation(fragmentType));
        filter.put(TYPE, type);
        String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForFragmentTypeAndType();
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }

    private PagedCollectionResource getMeasurementsBySourceAndDateAndFragmentType(
            ManagedObjectRepresentation source, Date dateFrom, Date dateTo, Class fragmentType) throws SDKException {
        Map filter = new HashMap();
        filter.put(SOURCE, source.getId().getValue());
        filter.put(DATE_FROM, DateUtils.format(dateFrom));
        filter.put(DATE_TO, DateUtils.format(dateTo));
        filter.put(FRAGMENT_TYPE, ExtensibilityConverter.classToStringRepresentation(fragmentType));
        String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForSourceAndDateAndFragmentType();
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }

    private PagedCollectionResource getMeasurementsBySourceAndDateAndType(
            ManagedObjectRepresentation source, Date dateFrom, Date dateTo, String type) throws SDKException {
        Map filter = new HashMap();
        filter.put(SOURCE, source.getId().getValue());
        filter.put(DATE_FROM, DateUtils.format(dateFrom));
        filter.put(DATE_TO, DateUtils.format(dateTo));
        filter.put(TYPE, type);
        String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForSourceAndDateAndType();
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

    @Then("I should I get all the measurements")
    public void shouldGetAllMeasurements() {
        assertThat(collection1.getMeasurements().size(), is(equalTo(result1.size())));

        Map map = new HashMap();

        for (MeasurementRepresentation rep : result1) {
            map.put(rep.getId(), rep);
        }

        Iterator iterator = collection1.getMeasurements().iterator();
        while (iterator.hasNext()) {
            MeasurementRepresentation orig = (MeasurementRepresentation) map.get(((MeasurementRepresentation) iterator.next()).getId());
            assertThat(orig, is(notNullValue()));
        }
    }
View Full Code Here

    @Then("I should I get all the audit records$")
    public void shouldGetAllMeasurements() {
        assertThat(collection1.getAuditRecords().size(), is(equalTo(result1.size())));

        Map map = new HashMap();

        Iterator iterator = result1.iterator();
        while (iterator.hasNext()) {
            AuditRecordRepresentation rep = (AuditRecordRepresentation) iterator.next();
            map.put(rep.getId(), rep);
        }

        iterator = collection1.getAuditRecords().iterator();
        while (iterator.hasNext()) {
            AuditRecordRepresentation orig = (AuditRecordRepresentation) map.get(((AuditRecordRepresentation) iterator.next()).getId());
            assertThat(orig, is(notNullValue()));
        }
    }
View Full Code Here

    @Then("I should get back all the external ids")
    public void shouldGetBackAllTheIds() throws SDKException {
        collection1 = (ExternalIDCollectionRepresentation) identity.getExternalIdsOfGlobalId(((ExternalIDRepresentation) input.get(0)).getManagedObject().getId()).get();
        assertEquals(input.size(), collection1.getExternalIds().size());

        Map result = new HashMap();

        for (int index = 0; index < input.size(); index++) {
            result.put(((ExternalIDRepresentation) collection1.getExternalIds().get(index)).getExternalId(), collection1.getExternalIds().get(index));
        }

        for (int index = 0; index < input.size(); index++) {
            ExternalIDRepresentation rep = (ExternalIDRepresentation) result.get(((ExternalIDRepresentation) input.get(index)).getExternalId());
            assertNotNull(rep);
            assertEquals(((ExternalIDRepresentation) input.get(index)).getType(), rep.getType());
            assertEquals(((ExternalIDRepresentation) input.get(index)).getManagedObject().getId().getValue(), rep.getManagedObject().getId().getValue());
        }
View Full Code Here

    public WebRequestBuilderImpl(WebClient client, WebRequestWriter writer, String path) {
        this.client = client;
        this.writer = writer;
        this.path = path;
        this.headers = new HashMap();
    }
View Full Code Here

    public byte[] getData() {
        return data;
    }
   
    private Map readHeaders(HttpConnection connection) throws IOException {
        Map headers = new HashMap();
        String key = null;
        int i = 0;
        while ((key = connection.getHeaderFieldKey(i)) != null) {
            headers.put(key, connection.getHeaderField(i));
            i++;
        }
        return headers;
    }
View Full Code Here

TOP

Related Classes of com.cumulocity.me.lang.HashMap$EntrySet

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.