Package org.apache.isis.viewer.restfulobjects.rendering.domainobjects

Examples of org.apache.isis.viewer.restfulobjects.rendering.domainobjects.DomainServiceLinkTo


        init(RepresentationType.LIST, Where.STANDALONE_TABLES);

        final List<ObjectAdapter> serviceAdapters = getResourceContext().getServiceAdapters();

        final DomainServicesListReprRenderer renderer = new DomainServicesListReprRenderer(getResourceContext(), null, JsonRepresentation.newMap());
        renderer.usingLinkToBuilder(new DomainServiceLinkTo())
            .includesSelf()
            .with(serviceAdapters);

        return responseOfOk(renderer, Caching.ONE_DAY).build();
    }
View Full Code Here


        init(RepresentationType.DOMAIN_OBJECT, Where.OBJECT_FORMS);

        final ObjectAdapter serviceAdapter = getServiceAdapter(serviceId);

        final DomainObjectReprRenderer renderer = new DomainObjectReprRenderer(getResourceContext(), null, JsonRepresentation.newMap());
        renderer.usingLinkToBuilder(new DomainServiceLinkTo())
            .with(serviceAdapter)
            .includesSelf();

        return responseOfOk(renderer, Caching.ONE_DAY).build();
    }
View Full Code Here

    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_OBJECT_PROPERTY, RestfulMediaType.APPLICATION_JSON_ERROR })
    public Response propertyDetails(@PathParam("serviceId") final String serviceId, @PathParam("propertyId") final String propertyId) {
        init(RepresentationType.OBJECT_PROPERTY, Where.OBJECT_FORMS);

        final ObjectAdapter serviceAdapter = getServiceAdapter(serviceId);
        final DomainResourceHelper helper = new DomainResourceHelper(getResourceContext(), serviceAdapter).using(new DomainServiceLinkTo());

        return helper.propertyDetails(propertyId, MemberMode.NOT_MUTATING, Caching.ONE_DAY, getResourceContext().getWhere());
    }
View Full Code Here

    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_OBJECT_ACTION, RestfulMediaType.APPLICATION_JSON_ERROR })
    public Response actionPrompt(@PathParam("serviceId") final String serviceId, @PathParam("actionId") final String actionId) {
        init(RepresentationType.OBJECT_ACTION, Where.OBJECT_FORMS);

        final ObjectAdapter serviceAdapter = getServiceAdapter(serviceId);
        final DomainResourceHelper helper = new DomainResourceHelper(getResourceContext(), serviceAdapter).using(new DomainServiceLinkTo());

        return helper.actionPrompt(actionId, getResourceContext().getWhere());
    }
View Full Code Here

        init(RepresentationType.ACTION_RESULT, Where.STANDALONE_TABLES, xIsisQueryString);

        final JsonRepresentation arguments = getResourceContext().getQueryStringAsJsonRepr();
       
        final ObjectAdapter serviceAdapter = getServiceAdapter(serviceId);
        final DomainResourceHelper helper = new DomainResourceHelper(getResourceContext(), serviceAdapter).using(new DomainServiceLinkTo());

        return helper.invokeActionQueryOnly(actionId, arguments, getResourceContext().getWhere());
    }
View Full Code Here

        init(RepresentationType.ACTION_RESULT, Where.STANDALONE_TABLES, body);

        final JsonRepresentation arguments = getResourceContext().getQueryStringAsJsonRepr();
       
        final ObjectAdapter serviceAdapter = getServiceAdapter(serviceId);
        final DomainResourceHelper helper = new DomainResourceHelper(getResourceContext(), serviceAdapter).using(new DomainServiceLinkTo());

        return helper.invokeActionIdempotent(actionId, arguments, getResourceContext().getWhere());
    }
View Full Code Here

        init(RepresentationType.ACTION_RESULT, Where.STANDALONE_TABLES, body);

        final JsonRepresentation arguments = getResourceContext().getQueryStringAsJsonRepr();
       
        final ObjectAdapter serviceAdapter = getServiceAdapter(serviceId);
        final DomainResourceHelper helper = new DomainResourceHelper(getResourceContext(), serviceAdapter).using(new DomainServiceLinkTo());

        return helper.invokeAction(actionId, arguments, getResourceContext().getWhere());
    }
View Full Code Here

        final LinkFollowSpecs linkFollowSpecs = getLinkFollowSpecs().follow("links");
        if (linkFollowSpecs.matches(link)) {

            final ListReprRenderer renderer = new ListReprRenderer(getRendererContext(), linkFollowSpecs, JsonRepresentation.newMap());
            renderer.usingLinkToBuilder(new DomainServiceLinkTo()).withLink(Rel.SELF, "services").with(serviceAdapters);

            link.mapPut("value", renderer.render());
        }

        getLinks().arrayAdd(link);
View Full Code Here

        init(RepresentationType.LIST, Where.STANDALONE_TABLES);

        final List<ObjectAdapter> serviceAdapters = getResourceContext().getServiceAdapters();

        final DomainServicesListReprRenderer renderer = new DomainServicesListReprRenderer(getResourceContext(), null, JsonRepresentation.newMap());
        renderer.usingLinkToBuilder(new DomainServiceLinkTo())
            .includesSelf()
            .with(serviceAdapters);

        return Responses.ofOk(renderer, Caching.ONE_DAY).build();
    }
View Full Code Here

        init(RepresentationType.DOMAIN_OBJECT, Where.OBJECT_FORMS);

        final ObjectAdapter serviceAdapter = getServiceAdapter(serviceId);

        final DomainObjectReprRenderer renderer = new DomainObjectReprRenderer(getResourceContext(), null, JsonRepresentation.newMap());
        renderer.usingLinkToBuilder(new DomainServiceLinkTo())
            .with(serviceAdapter)
            .includesSelf();

        return Responses.ofOk(renderer, Caching.ONE_DAY).build();
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.restfulobjects.rendering.domainobjects.DomainServiceLinkTo

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.