Examples of mapPut()


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

        final String s = "New string";
       
        argRepr.mapPut("localDateProperty.value", "2013-05-01");
        argRepr.mapPut("localDateTimeProperty.value", "2013-02-01T14:15:00Z");
        argRepr.mapPut("dateTimeProperty.value", asIso(dt.toDate()));
        argRepr.mapPut("stringProperty.value", s);

        final RestfulResponse<JsonRepresentation> result = client.follow(updateLink, argRepr);
        assertThat(result.getStatus(), is(HttpStatusCode.OK));
       
        final DomainObjectRepresentation afterResp = result.getEntity().as(DomainObjectRepresentation.class);
View Full Code Here

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

                RestfulResponse.ofT(objectResource.actionPrompt("PRNT", "53", "removeChild"));
        final ObjectActionRepresentation removeChildRepr = removeChildRestfulResponse.getEntity();
       
        LinkRepresentation invokeLinkRepr = removeChildRepr.getLinkWithRel(Rel.INVOKE);
        JsonRepresentation args = invokeLinkRepr.getArguments();
        args.mapPut("childEntity.value", firstChildRepr);
        RestfulResponse<JsonRepresentation> invokeResp = client.follow(invokeLinkRepr, args);
       
        @SuppressWarnings("unused")
        JsonRepresentation invokeRepr = invokeResp.getEntity();
        final HttpStatusCode status = invokeResp.getStatus();
View Full Code Here

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

    @Test
    public void usingResourceProxy() throws Exception {

        // given, when
        final JsonRepresentation args = JsonRepresentation.newMap();
        args.mapPut("str1.value", "abc+def");
        args.mapPut("str2.value", "HOORAY");

        final Response response = serviceResource.invokeActionIdempotent("ActionsEntities", "concatenate", JsonNodeUtils.asInputStream(args));
        final RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
       
View Full Code Here

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

    public void usingResourceProxy() throws Exception {

        // given, when
        final JsonRepresentation args = JsonRepresentation.newMap();
        args.mapPut("str1.value", "abc+def");
        args.mapPut("str2.value", "HOORAY");

        final Response response = serviceResource.invokeActionIdempotent("ActionsEntities", "concatenate", JsonNodeUtils.asInputStream(args));
        final RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
       
        // then
View Full Code Here

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

       
        final LinkRepresentation invokeLink = containsActionRepr.getInvoke();
        final JsonRepresentation args = invokeLink.getArguments();
       
        // when query the 'contains' action passing in the reference to the non-existent entity
        args.mapPut("searchFor.value", nonExistentEntityLink);
        args.mapPut("from.value", 0);
        args.mapPut("to.value", 1);
       
        RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
View Full Code Here

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

        final LinkRepresentation invokeLink = containsActionRepr.getInvoke();
        final JsonRepresentation args = invokeLink.getArguments();
       
        // when query the 'contains' action passing in the reference to the non-existent entity
        args.mapPut("searchFor.value", nonExistentEntityLink);
        args.mapPut("from.value", 0);
        args.mapPut("to.value", 1);
       
        RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);

        // then
View Full Code Here

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

        final JsonRepresentation args = invokeLink.getArguments();
       
        // when query the 'contains' action passing in the reference to the non-existent entity
        args.mapPut("searchFor.value", nonExistentEntityLink);
        args.mapPut("from.value", 0);
        args.mapPut("to.value", 1);
       
        RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);

        // then
        then(args, restfulResponse);
View Full Code Here

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

        LinkRepresentation nonExistentEntityLink = new LinkRepresentation()
            .withHref("http://localhost:39393/objects/NONEXISTENT/123");

        // when query the 'contains' action passing in the reference to the non-existent entity
        JsonRepresentation args = JsonRepresentation.newMap();
        args.mapPut("searchFor.value", nonExistentEntityLink);
        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

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

            .withHref("http://localhost:39393/objects/NONEXISTENT/123");

        // when query the 'contains' action passing in the reference to the non-existent entity
        JsonRepresentation args = JsonRepresentation.newMap();
        args.mapPut("searchFor.value", nonExistentEntityLink);
        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

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

        // when query the 'contains' action passing in the reference to the non-existent entity
        JsonRepresentation args = JsonRepresentation.newMap();
        args.mapPut("searchFor.value", nonExistentEntityLink);
        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
        then(args, 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.