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

Examples of org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource


    private Util() {
    }

    public static String givenLinkToService(RestfulClient restfulClient, String serviceId) throws JsonParseException, JsonMappingException, IOException {

        final DomainServiceResource resource = restfulClient.getDomainServiceResource();
        final Response response = resource.services();
        final ListRepresentation services = RestfulResponse.<ListRepresentation> ofT(response).getEntity();

        final String href = services.getRepresentation("value[rel=" + Rel.SERVICE.getName() + ";serviceId=\"" + serviceId + "\"]").asLink().getHref();
        return href;
    }
View Full Code Here


        final String href = services.getRepresentation("value[rel=" + Rel.SERVICE.getName() + ";serviceId=\"" + serviceId + "\"]").asLink().getHref();
        return href;
    }

    public static String givenHrefToService(RestfulClient client, final String serviceId) throws JsonParseException, JsonMappingException, IOException {
        final DomainServiceResource resource = client.getDomainServiceResource();
        final Response response = resource.services();
        final ListRepresentation services = RestfulResponse.<ListRepresentation> ofT(response).getEntity();

        return services.getRepresentation("value[rel=urn:org.restfulobjects:rels/service;serviceId=\"%s\"]", serviceId).asLink().getHref();
    }
View Full Code Here

    /**
     * For clientFollow tests; returns a link to the Nth entity in the list returned by invoking the specified repo and action
     */
    public static LinkRepresentation serviceActionListInvokeFirstReference(RestfulClient client, String repoName, String actionName, int idx) throws Exception {

        final DomainServiceResource serviceResource = client.getDomainServiceResource();

        Response response = serviceResource.invokeActionQueryOnly(repoName, actionName, null);
        RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);

        assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
        final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();

View Full Code Here

    private Util() {
    }

    public static String givenLinkToService(RestfulClient restfulClient, String serviceId) throws JsonParseException, JsonMappingException, IOException {

        final DomainServiceResource resource = restfulClient.getDomainServiceResource();
        final Response response = resource.services();
        final ListRepresentation services = RestfulResponse.<ListRepresentation> ofT(response).getEntity();

        final String href = services.getRepresentation("value[rel=" + Rel.SERVICE.getName() + ";serviceId=\"" + serviceId + "\"]").asLink().getHref();
        return href;
    }
View Full Code Here

        final String href = services.getRepresentation("value[rel=" + Rel.SERVICE.getName() + ";serviceId=\"" + serviceId + "\"]").asLink().getHref();
        return href;
    }

    public static String givenHrefToService(RestfulClient client, final String serviceId) throws JsonParseException, JsonMappingException, IOException {
        final DomainServiceResource resource = client.getDomainServiceResource();
        final Response response = resource.services();
        final ListRepresentation services = RestfulResponse.<ListRepresentation> ofT(response).getEntity();

        return services.getRepresentation("value[rel=urn:org.restfulobjects:rels/service;serviceId=\"%s\"]", serviceId).asLink().getHref();
    }
View Full Code Here

    /**
     * For clientFollow tests; returns a link to the Nth entity in the list returned by invoking the specified repo and action
     */
    public static LinkRepresentation domainObjectLink(RestfulClient client, String repoName, String actionName, int idx) throws Exception {

        final DomainServiceResource serviceResource = client.getDomainServiceResource();

        Response response = serviceResource.invokeActionQueryOnly(repoName, actionName, null);
        RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);

        assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
        final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();

View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource

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.