Package org.apache.isis.viewer.json.applib

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


        assertThat(args.size(), is(2));
        assertThat(args.mapHas("name"), is(true));
        assertThat(args.mapHas("flag"), is(true));

        // when
        args.mapPut("name", "New Name");
        args.mapPut("flag", true);
        final RestfulResponse<DomainObjectRepresentation> restfulResponse = client.followT(invokeLink, args);

        // then
        final DomainObjectRepresentation objectRepr = restfulResponse.getEntity();
View Full Code Here


        assertThat(args.mapHas("name"), is(true));
        assertThat(args.mapHas("flag"), is(true));

        // when
        args.mapPut("name", "New Name");
        args.mapPut("flag", true);
        final RestfulResponse<DomainObjectRepresentation> restfulResponse = client.followT(invokeLink, args);

        // then
        final DomainObjectRepresentation objectRepr = restfulResponse.getEntity();
View Full Code Here

        final JsonRepresentation args = invokeLink.getArguments();
        assertThat(args.size(), is(1));
        assertThat(args.mapHas("object"), is(true));

        // when
        args.mapPut("object", linkToSimpleEntity);
        final RestfulResponse<JsonRepresentation> restfulResponse = client.followT(invokeLink, args);

        // then
        assertThat(restfulResponse.getStatus(), is(HttpStatusCode.NO_CONTENT));
View Full Code Here

        assertThat(args.mapHas("double2"), is(true));
        assertThat(args.mapHas("bigInteger"), is(true));
        assertThat(args.mapHas("bigDecimal"), is(true));

        // when
        args.mapPut("name", "New Name");
        args.mapPut("flag", true);
        final RestfulResponse<DomainObjectRepresentation> restfulResponse = client.followT(invokeLink, args);

        // then
        final DomainObjectRepresentation objectRepr = restfulResponse.getEntity();
View Full Code Here

        assertThat(args.mapHas("bigInteger"), is(true));
        assertThat(args.mapHas("bigDecimal"), is(true));

        // when
        args.mapPut("name", "New Name");
        args.mapPut("flag", true);
        final RestfulResponse<DomainObjectRepresentation> restfulResponse = client.followT(invokeLink, args);

        // then
        final DomainObjectRepresentation objectRepr = restfulResponse.getEntity();
View Full Code Here

    @Override
    protected JsonRepresentation mutatorArgs(final MutatorSpec mutatorSpec) {
        final JsonRepresentation argMap = JsonRepresentation.newMap();
        final List<ObjectActionParameter> parameters = objectMember.getParameters();
        for (int i = 0; i < objectMember.getParameterCount(); i++) {
            argMap.mapPut(parameters.get(i).getId(), argValueFor(i));
        }
        return argMap;
    }

    private Object argValueFor(final int i) {
View Full Code Here

        return this;
    }

    private Object paramDetails(final ObjectActionParameter param) {
        final JsonRepresentation paramRep = JsonRepresentation.newMap();
        paramRep.mapPut("num", param.getNumber());
        paramRep.mapPut("id", param.getId());
        paramRep.mapPut("name", param.getName());
        paramRep.mapPut("description", param.getDescription());
        final Object paramChoices = choicesFor(param);
        if (paramChoices != null) {
View Full Code Here

    }

    private Object paramDetails(final ObjectActionParameter param) {
        final JsonRepresentation paramRep = JsonRepresentation.newMap();
        paramRep.mapPut("num", param.getNumber());
        paramRep.mapPut("id", param.getId());
        paramRep.mapPut("name", param.getName());
        paramRep.mapPut("description", param.getDescription());
        final Object paramChoices = choicesFor(param);
        if (paramChoices != null) {
            paramRep.mapPut("choices", paramChoices);
View Full Code Here

    private Object paramDetails(final ObjectActionParameter param) {
        final JsonRepresentation paramRep = JsonRepresentation.newMap();
        paramRep.mapPut("num", param.getNumber());
        paramRep.mapPut("id", param.getId());
        paramRep.mapPut("name", param.getName());
        paramRep.mapPut("description", param.getDescription());
        final Object paramChoices = choicesFor(param);
        if (paramChoices != null) {
            paramRep.mapPut("choices", paramChoices);
        }
View Full Code Here

    private Object paramDetails(final ObjectActionParameter param) {
        final JsonRepresentation paramRep = JsonRepresentation.newMap();
        paramRep.mapPut("num", param.getNumber());
        paramRep.mapPut("id", param.getId());
        paramRep.mapPut("name", param.getName());
        paramRep.mapPut("description", param.getDescription());
        final Object paramChoices = choicesFor(param);
        if (paramChoices != null) {
            paramRep.mapPut("choices", paramChoices);
        }
        final Object paramDefault = defaultFor(param);
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.