Package com.cumulocity.me.lang

Examples of com.cumulocity.me.lang.ArrayList


    public BaseRepresentationConverter getManagedObjectConverter() {
        return converter;
    }
   
    private List getListOfReferences() {
        List list = new ArrayList();
        list.add(getMinimalManagedObjectReferenceRepresentation());
        list.add(getMinimalManagedObjectReferenceRepresentation());
        return list;
    }
View Full Code Here


    public void shouldBuildUrlForOptionalParametersWithoutValue() throws Exception {
        // given
        Map filters = new HashMap();
        filters.put("a", "b");

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

        String[] optionalParameters = new String[] { "c" };

        QueryURLBuilder urlBuilder = new QueryURLBuilder(new TemplateUrlParser(), filters, uriTemplates, optionalParameters);
View Full Code Here

        // 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" };

        QueryURLBuilder urlBuilder = new QueryURLBuilder(new TemplateUrlParser(), filters, uriTemplates, optionalParameters);
View Full Code Here

        // 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" };

        QueryURLBuilder urlBuilder = new QueryURLBuilder(new TemplateUrlParser(), filters, uriTemplates, optionalParameters);
View Full Code Here

                .withPropertyBuilder(getSampleJsonManagedObjectRepresentation()).build();
        return jsonArray;
    }

    private List getListOfManagedObjects() {
        List list = new ArrayList();
        list.add(getSampleManagedObjectRepresentation());
        list.add(getSampleManagedObjectRepresentation());
        return list;
    }
View Full Code Here

    }

    @Before
    public void setup() {
        eventApi = platform.getEventApi();
        input = new ArrayList();
        result = new ArrayList();
        result1 = new ArrayList();
        status = OK;
    }
View Full Code Here

        }
        return converters;
    }

    private void initConverters() {
        converters = new ArrayList();

        converters.add(new PageStatisticsRepresentationConverter());
        converters.add(new PlatformApiRepresentationConverter());

        converters.add(new InventoryRepresentationConverter());
View Full Code Here

    }
   
    private final Stack parseContext = new Stack();
   
    protected void basePropertiesFromJson(JSONObject json, BaseResourceRepresentation representation) {
        ArrayList parsed = new ArrayList();
        parsed.add(PROP_SELF);
        parseContext.push(parsed);
       
        super.basePropertiesFromJson(json, representation);
    }
View Full Code Here

    protected List getList(JSONObject json, String propertyName, Class propertyElementType) {
        JSONArray jsonArray = json.optJSONArray(propertyName);
        if (jsonArray == null) {
            return null;
        }
        List list = new ArrayList();
        for (int i = 0; i < jsonArray.length(); i++) {
            list.add(conversionService.fromJson(jsonArray.getJSONObject(i), propertyElementType));
        }
        return list;
    }
View Full Code Here

        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();
        assertThat(mos.size()).isEqualTo(2);
View Full Code Here

TOP

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

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.