Package org.apache.isis.viewer.json.viewer.resources.domainobjects

Examples of org.apache.isis.viewer.json.viewer.resources.domainobjects.DomainObjectReprRenderer$Factory


        final String url = "domainTypes/" + domainTypeSpec.getFullIdentifier() + "/typeactions/newTransientInstance/invoke";
        final LinkBuilder linkBuilder = LinkBuilder.newBuilder(getResourceContext(), Rel.SELF, RepresentationType.TYPE_ACTION_RESULT, url);
        final JsonRepresentation selfLink = linkBuilder.build();

        final RendererFactory domainObjectRendererFactory = rendererFactoryRegistry.find(RepresentationType.DOMAIN_OBJECT);
        final DomainObjectReprRenderer domainObjectRenderer = (DomainObjectReprRenderer) domainObjectRendererFactory.newRenderer(getResourceContext(), null, JsonRepresentation.newMap());
        final ObjectAdapter transientInstance = getResourceContext().getPersistenceSession().createInstance(domainTypeSpec);
        domainObjectRenderer.with(transientInstance).includesSelf();

        renderer.with(domainTypeSpec).withSelf(selfLink).withValue(domainObjectRenderer.render());

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

TOP

Related Classes of org.apache.isis.viewer.json.viewer.resources.domainobjects.DomainObjectReprRenderer$Factory

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.