Package org.apache.isis.viewer.json.applib.links

Examples of org.apache.isis.viewer.json.applib.links.LinkRepresentation


        final JsonRepresentation objectRepr = DomainResourceHelper.readAsMap(objectStr);
        if (!objectRepr.isMap()) {
            throw JsonApplicationException.create(HttpStatusCode.BAD_REQUEST, "Body is not a map; got %s", objectRepr);
        }

        final LinkRepresentation describedByLink = objectRepr.getLink("links[rel=describedby]");
        if (!describedByLink.isLink()) {
            throw JsonApplicationException.create(HttpStatusCode.BAD_REQUEST, "Could not determine type of domain object to persist (no links[rel=describedby] link); got %s", objectRepr);
        }

        final String domainTypeStr = UrlParserUtils.domainTypeFrom(describedByLink);
        if (domainTypeStr == null) {
View Full Code Here


    public boolean isLink(final JsonNode node) {
        if (representsNull(node) || isArray(node) || node.isValueNode()) {
            return false;
        }

        final LinkRepresentation link = new LinkRepresentation(node);
        if (link.getHref() == null) {
            return false;
        }
        return true;
    }
View Full Code Here

        }
        if (node.isValueNode()) {
            throw new IllegalArgumentException(formatExMsg(path, "is a value that does not represent a link"));
        }

        final LinkRepresentation link = new LinkRepresentation(node);
        if (link.getHref() == null) {
            throw new IllegalArgumentException(formatExMsg(path, "is a map that does not fully represent a link"));
        }
        return link;
    }
View Full Code Here

        } catch (final Exception e) {
            addStep(path, null, null, null, "exception: " + e.getMessage(), e);
            return;
        }

        LinkRepresentation link;
        try {
            link = entity.getLink(path);
        } catch (final Exception e) {
            addStep(path, null, null, null, "exception: " + e.getMessage(), e);
            return;
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.json.applib.links.LinkRepresentation

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.