Package org.springframework.hateoas

Examples of org.springframework.hateoas.Links


    PersistentProperty<?> property = association.getInverse();

    if (associationLinks.isLinkableAssociation(property)) {

      Links existingLinks = new Links(links);

      for (Link link : associationLinks.getLinksFor(association, basePath)) {
        if (existingLinks.hasLink(link.getRel())) {
          throw new MappingException(String.format(AMBIGUOUS_ASSOCIATIONS, property.toString()));
        } else {
          links.add(link);
        }
      }
View Full Code Here


  @RequestMapping(value = BASE_MAPPING, method = RequestMethod.GET)
  public ResourceSupport listSearches(RootResourceInformation resourceInformation) {

    verifySearchesExposed(resourceInformation);

    Links queryMethodLinks = getSearchLinks(resourceInformation.getDomainType());

    if (queryMethodLinks.isEmpty()) {
      throw new ResourceNotFoundException();
    }

    ResourceSupport result = new ResourceSupport();
    result.add(queryMethodLinks);
View Full Code Here

      }

      links.add(link);
    }

    return new Links(links);
  }
View Full Code Here

      }

      if (prefixingRequired && curiedLinkPresent) {

        ArrayList<Object> curies = new ArrayList<Object>();
        curies.add(curieProvider.getCurieInformation(new Links(links)));

        sortedLinks.put("curies", curies);
      }

      TypeFactory typeFactory = provider.getConfig().getTypeFactory();
View Full Code Here

    List<Link> links = entity.getBody().getLinks();

    HttpHeaders httpHeaders = new HttpHeaders();
    httpHeaders.putAll(entity.getHeaders());
    httpHeaders.add("Link", new Links(links).toString());

    return httpHeaders;
  }
View Full Code Here

TOP

Related Classes of org.springframework.hateoas.Links

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.