Package org.apache.isis.viewer.restfulobjects.applib

Examples of org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation.mapPut()


       
        // and when query the 'contains' action for a different range which does not
        // contain the entity
        args.mapPut("searchFor.value", firstEntityLink);
        args.mapPut("from.value", 3);
        args.mapPut("to.values", 5);
       
        restfulResponse = client.followT(invokeLink, args);

        // then
        thenResponseIsScalarValueOf(restfulResponse, false);
View Full Code Here


        LinkRepresentation firstEntityLink = subListRepr.getValue().arrayGet(0).asLink();

        // when query the 'contains' action passing in the entity
        // (for a range where the entity is contained in the range)
        JsonRepresentation args = JsonRepresentation.newMap();
        args.mapPut("searchFor.value", firstEntityLink);
        args.mapPut("from.value", 0);
        args.mapPut("to.value", 3);
        Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "contains", UrlEncodingUtils.urlEncode(args));
        RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
       
View Full Code Here

        // when query the 'contains' action passing in the entity
        // (for a range where the entity is contained in the range)
        JsonRepresentation args = JsonRepresentation.newMap();
        args.mapPut("searchFor.value", firstEntityLink);
        args.mapPut("from.value", 0);
        args.mapPut("to.value", 3);
        Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "contains", UrlEncodingUtils.urlEncode(args));
        RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
       
        // then
View Full Code Here

        // when query the 'contains' action passing in the entity
        // (for a range where the entity is contained in the range)
        JsonRepresentation args = JsonRepresentation.newMap();
        args.mapPut("searchFor.value", firstEntityLink);
        args.mapPut("from.value", 0);
        args.mapPut("to.value", 3);
        Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "contains", UrlEncodingUtils.urlEncode(args));
        RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
       
        // then
        thenResponseIsScalarValueOf(restfulResponse, true);
View Full Code Here

       
        final LinkRepresentation invokeLink = actionRepr.getInvoke();
        final JsonRepresentation args = invokeLink.getArguments();
       
        // when
        args.mapPut("from.value", from);
        args.mapPut("to.value", to);
       
        final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
       
        final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
View Full Code Here

        final LinkRepresentation invokeLink = actionRepr.getInvoke();
        final JsonRepresentation args = invokeLink.getArguments();
       
        // when
        args.mapPut("from.value", from);
        args.mapPut("to.value", to);
       
        final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
       
        final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
        return actionResultRepr.getResult().as(ListRepresentation.class);
View Full Code Here

        assertThat(args.size(), is(2));
        assertThat(args, RestfulMatchers.mapHas("from"));
        assertThat(args, RestfulMatchers.mapHas("to"));
       
        // when
        args.mapPut("from.value", (Integer)null);
        args.mapPut("to.value", (Integer)null);

        final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
       
        then(restfulResponse);
View Full Code Here

        assertThat(args, RestfulMatchers.mapHas("from"));
        assertThat(args, RestfulMatchers.mapHas("to"));
       
        // when
        args.mapPut("from.value", (Integer)null);
        args.mapPut("to.value", (Integer)null);

        final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
       
        then(restfulResponse);
    }
View Full Code Here

    @Test
    public void usingResourceProxy_whenExplicitlySetToNull() throws Exception {

        // given, when
        JsonRepresentation args = JsonRepresentation.newMap();
        args.mapPut("from.value", (Integer)null);
        args.mapPut("to.value", (Integer)null);
        Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subListWithOptionalRange", UrlEncodingUtils.urlEncode(args));
        RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
       
        // then
View Full Code Here

    public void usingResourceProxy_whenExplicitlySetToNull() throws Exception {

        // given, when
        JsonRepresentation args = JsonRepresentation.newMap();
        args.mapPut("from.value", (Integer)null);
        args.mapPut("to.value", (Integer)null);
        Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subListWithOptionalRange", UrlEncodingUtils.urlEncode(args));
        RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
       
        // then
        then(restfulResponse);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.