Package org.springframework.data.rest.webmvc.mapping

Examples of org.springframework.data.rest.webmvc.mapping.LinkCollectingAssociationHandler


      }
    });

    Link link = entityLinks.linkToCollectionResource(persistentEntity.getType()).expand();

    LinkCollectingAssociationHandler associationHandler = new LinkCollectingAssociationHandler(repositories, new Path(
        link.getHref()), new AssociationLinks(mappings));
    persistentEntity.doWithAssociations(associationHandler);

    jsonSchema.add(associationHandler.getLinks());

    return jsonSchema;
  }
View Full Code Here


      List<Link> links = new ArrayList<Link>();
      links.addAll(resource.getLinks());

      Path basePath = new Path(id.expand().getHref());
      LinkCollectingAssociationHandler associationHandler = new LinkCollectingAssociationHandler(entities, basePath,
          associationLinks);
      resource.getPersistentEntity().doWithAssociations(associationHandler);

      for (Link link : associationHandler.getLinks()) {
        if (resource.shouldRenderLink(link)) {
          links.add(link);
        }
      }
View Full Code Here

TOP

Related Classes of org.springframework.data.rest.webmvc.mapping.LinkCollectingAssociationHandler

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.