Package com.cumulocity.me.lang

Examples of com.cumulocity.me.lang.Map


    }

    @Test
    public void shouldBuildUrlForOptionalParametersInBetweenMandatory() throws Exception {
        // given
        Map filters = new HashMap();
        filters.put("a", "b");
        filters.put("e", "f");

        List uriTemplates = new ArrayList();
        uriTemplates.add("http://something?a={a}&c={c}&e={e}");

        String[] optionalParameters = new String[] { "c" };
View Full Code Here


    }

    @Test
    public void shouldBuildUrlForOptionalParametersAsFirstInUri() throws Exception {
        // given
        Map filters = new HashMap();
        filters.put("a", "b");
        filters.put("e", "f");

        List uriTemplates = new ArrayList();
        uriTemplates.add("http://something?c={c}&a={a}&e={e}");

        String[] optionalParameters = new String[] { "c" };
View Full Code Here

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

    private PagedCollectionResource getMeasurementsBySource(ManagedObjectRepresentation source)
            throws SDKException {
        Map filter = new HashMap();
        filter.put(SOURCE, source.getId().getValue());
        String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForSource();
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

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

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

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

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

        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }

    private PagedCollectionResource getMeasurementsByType(String type) throws SDKException {
        Map filter = new HashMap();
        filter.put(TYPE, type);
        String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForType();
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

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

    private PagedCollectionResource getMeasurementsBySourceAndDate(ManagedObjectRepresentation source,
            Date dateFrom, Date dateTo) 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));
        String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForSourceAndDate();
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

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

    private PagedCollectionResource getMeasurementsBySourceAndFragmentType(
            ManagedObjectRepresentation source, Class fragmentType) throws SDKException {
        Map filter = new HashMap();
        filter.put(SOURCE, source.getId().getValue());
        filter.put(FRAGMENT_TYPE, ExtensibilityConverter.classToStringRepresentation(fragmentType));
        String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForSourceAndFragmentType();
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

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

    private PagedCollectionResource getMeasurementsBySourceAndType(ManagedObjectRepresentation source,
            String type) throws SDKException {
        Map filter = new HashMap();
        filter.put(SOURCE, source.getId().getValue());
        filter.put(TYPE, type);
        String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForSourceAndType();
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

        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

TOP

Related Classes of com.cumulocity.me.lang.Map

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.