Examples of DomainServiceResource


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

        assertThat(restfulResponse.getStatus(), is(HttpStatusCode.NOT_ACCEPTABLE));
    }

    private String givenLinkToService() throws JsonParseException, JsonMappingException, IOException {
        final DomainServiceResource resource = client.getDomainServiceResource();
        final Response response = resource.services();
        final ListRepresentation services = RestfulResponse.<ListRepresentation> ofT(response).getEntity();

        final String href = services.getRepresentation("values[id=%s]", "simples").asLink().getHref();
        return href;
    }
View Full Code Here

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

        assertThat(actionRepr.getRepresentation("links[rel=details].value"), is(nullValue())); // not
                                                                                               // followed
    }

    private String givenHrefToService(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("values[id=%s]", serviceId).asLink().getHref();
    }
View Full Code Here

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

        final JsonRepresentation actionLinkRepr = repr.getAction(actionId);
        return actionLinkRepr.getRepresentation("links[rel=details].value");
    }

    private String givenHrefToService(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("values[id=%s]", serviceId).asLink().getHref();
    }
View Full Code Here

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

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

        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

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

    /**
     * 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

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

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

        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

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

    /**
     * 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
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.