Package org.springframework.data.rest.core.mapping

Examples of org.springframework.data.rest.core.mapping.SearchResourceMappings


    } else {
      results = invoker.invokeFindAll(sort);
    }

    ResourceMetadata metadata = resourceInformation.getResourceMetadata();
    SearchResourceMappings searchMappings = metadata.getSearchResourceMappings();
    List<Link> links = new ArrayList<Link>();

    if (searchMappings.isExported()) {
      links.add(entityLinks.linkFor(metadata.getDomainType()).slash(searchMappings.getPath())
          .withRel(searchMappings.getRel()));
    }

    Link baseLink = entityLinks.linkToPagedResource(resourceInformation.getDomainType(), pageable.isDefault() ? null
        : pageable.getPageable());
View Full Code Here


   * @param searchName
   * @return
   */
  private Method checkExecutability(RootResourceInformation resourceInformation, String searchName) {

    SearchResourceMappings searchMapping = verifySearchesExposed(resourceInformation);

    Method method = searchMapping.getMappedMethod(searchName);

    if (method == null) {
      throw new ResourceNotFoundException();
    }

View Full Code Here

   */
  private Links getSearchLinks(Class<?> domainType) {

    List<Link> links = new ArrayList<Link>();

    SearchResourceMappings searchMappings = mappings.getSearchResourceMappings(domainType);
    LinkBuilder builder = entityLinks.linkFor(domainType).slash(searchMappings.getPath());

    for (MethodResourceMapping mapping : searchMappings) {

      if (!mapping.isExported()) {
        continue;
View Full Code Here

   *
   * @param resourceInformation
   */
  private SearchResourceMappings verifySearchesExposed(RootResourceInformation resourceInformation) {

    SearchResourceMappings resourceMappings = resourceInformation.getSearchMappings();

    if (!resourceMappings.isExported()) {
      throw new ResourceNotFoundException();
    }

    return resourceMappings;
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.rest.core.mapping.SearchResourceMappings

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.