Package com.cumulocity.me.lang

Examples of com.cumulocity.me.lang.HashMap


    }

    @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 getMeasurementsBySourceAndFragmentTypeAndType(
            ManagedObjectRepresentation source, Class fragmentType, String type) throws SDKException {
        Map filter = new HashMap();
        filter.put(SOURCE, source.getId().getValue());
        filter.put(FRAGMENT_TYPE, ExtensibilityConverter.classToStringRepresentation(fragmentType));
        filter.put(TYPE, type);
        String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForSourceAndFragmentTypeAndType();
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

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

    private PagedCollectionResource getMeasurementsByDateAndFragmentTypeAndType(Date dateFrom,
            Date dateTo, Class fragmentType, String type) 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));
        filter.put(TYPE, type);
        String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForDateAndFragmentTypeAndType();
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

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

    private PagedCollectionResource getMeasurementsBySourceAndDateAndFragmentTypeAndType(
            ManagedObjectRepresentation source, Date dateFrom, Date dateTo, Class fragmentType, 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(FRAGMENT_TYPE, ExtensibilityConverter.classToStringRepresentation(fragmentType));
        filter.put(TYPE, type);
        String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForSourceAndDateAndFragmentTypeAndType();
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new MeasurementCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

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

    private PagedCollectionResource getAuditRecordsByType(String type) throws SDKException {
        String urlTemplate = getAuditRecordsRepresentation().getAuditRecordsForType();
        Map filter = new HashMap();
        filter.put(PARAMETER_TYPE, type);
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new AuditRecordCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

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

    private PagedCollectionResource getAuditRecordsByUser(String user) throws SDKException {
        String urlTemplate = getAuditRecordsRepresentation().getAuditRecordsForUser();
        Map filter = new HashMap();
        filter.put(PARAMETER_USER, user);
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new AuditRecordCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

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

    private PagedCollectionResource getAuditRecordsByApplication(String application) throws SDKException {
        String urlTemplate = getAuditRecordsRepresentation().getAuditRecordsForApplication();
        Map filter = new HashMap();
        filter.put(PARAMETER_APPLICATION, application);
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new AuditRecordCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

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

    private PagedCollectionResource getAuditRecordsByUserAndType(String user, String type) throws SDKException {
        String urlTemplate = getAuditRecordsRepresentation().getAuditRecordsForUserAndType();
        Map filter = new HashMap();
        filter.put(PARAMETER_USER, user);
        filter.put(PARAMETER_TYPE, type);
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new AuditRecordCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

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

    private PagedCollectionResource getAuditRecordsByUserAndApplication(String user, String application) throws SDKException {
        String urlTemplate = getAuditRecordsRepresentation().getAuditRecordsForUserAndApplication();
        Map filter = new HashMap();
        filter.put(PARAMETER_USER, user);
        filter.put(PARAMETER_APPLICATION, application);
        String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
        return new AuditRecordCollectionImpl(restConnector, url, pageSize);
    }
View Full Code Here

TOP

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

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.