Package org.apache.isis.core.metamodel.adapter

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter


    @Path("/{serviceId}/properties/{propertyId}")
    @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


    @Path("/{serviceId}/collections/{collectionId}")
    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_OBJECT_COLLECTION, RestfulMediaType.APPLICATION_JSON_ERROR })
    public Response accessCollection(@PathParam("serviceId") final String serviceId, @PathParam("collectionId") String collectionId) {
        init(RepresentationType.OBJECT_COLLECTION, Where.PARENTED_TABLES);

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

        return helper.collectionDetails(collectionId, MemberMode.NOT_MUTATING, Caching.NONE, getResourceContext().getWhere());
    }
View Full Code Here

    @Path("/{serviceId}/actions/{actionId}")
    @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

    public Response invokeActionQueryOnly(@PathParam("serviceId") final String serviceId, @PathParam("actionId") final String actionId, @QueryParam("x-isis-querystring") final String xIsisQueryString) {
        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

    public Response invokeActionIdempotent(@PathParam("serviceId") final String serviceId, @PathParam("actionId") final String actionId, final InputStream body) {
        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

    public Response invokeAction(@PathParam("serviceId") final String serviceId, @PathParam("actionId") final String actionId, final InputStream body) {
        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

                will(returnValue(objectAdapter));
            }
        });

        // when
        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);

        // then
        assertSame(objectAdapter, adapter);
    }
View Full Code Here

                will(returnValue(objectAdapter));
            }
        });

        // when
        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);

        // then
        assertSame(objectAdapter, adapter);
    }
View Full Code Here

                will(returnValue(objectAdapter));
            }
        });

        // when
        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);

        // then
        assertSame(objectAdapter, adapter);
    }
View Full Code Here

                will(returnValue(objectAdapter));
            }
        });

        // when
        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);

        // then
        assertSame(objectAdapter, adapter);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.adapter.ObjectAdapter

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.