Class SearchResourceMappings

java.lang.Object
org.springframework.data.rest.core.mapping.SearchResourceMappings
All Implemented Interfaces:
Iterable<MethodResourceMapping>, ResourceMapping

public class SearchResourceMappings extends Object implements Iterable<MethodResourceMapping>, ResourceMapping
ResourceMapping for all search resources.
Author:
Oliver Gierke
  • Constructor Details

  • Method Details

    • getMappedMethod

      public Method getMappedMethod(String path)
      Returns the method mapped to the given path.
      Parameters:
      path - must not be null or empty.
      Returns:
    • getExportedMappings

      public Stream<MethodResourceMapping> getExportedMappings()
      Returns the mappings for all exported query methods.
      Returns:
      Since:
      2.3
    • getExportedMethodMappingForRel

      public MethodResourceMapping getExportedMethodMappingForRel(org.springframework.hateoas.LinkRelation rel)
      Returns the MappingResourceMetadata for the given relation name.
      Parameters:
      rel - must not be null.
      Returns:
      Since:
      2.3
    • getExportedMethodMappingForPath

      public MethodResourceMapping getExportedMethodMappingForPath(String path)
      Returns the MethodResourceMapping for the given path.
      Parameters:
      path - must not be null or empty.
      Returns:
      Since:
      2.4
    • getPath

      public Path getPath()
      Description copied from interface: ResourceMapping
      Returns the path the resource is exposed under.
      Specified by:
      getPath in interface ResourceMapping
      Returns:
      will never be null.
    • getRel

      public org.springframework.hateoas.LinkRelation getRel()
      Description copied from interface: ResourceMapping
      Returns the relation for the resource exported.
      Specified by:
      getRel in interface ResourceMapping
      Returns:
      will never be null.
    • isExported

      public boolean isExported()
      Description copied from interface: ResourceMapping
      Returns whether the component shall be exported at all.
      Specified by:
      isExported in interface ResourceMapping
      Returns:
      will never be null.
    • isPagingResource

      public boolean isPagingResource()
      Description copied from interface: ResourceMapping
      Returns whether the resource is paging one.
      Specified by:
      isPagingResource in interface ResourceMapping
      Returns:
    • getDescription

      public ResourceDescription getDescription()
      Description copied from interface: ResourceMapping
      Returns the resource's description.
      Specified by:
      getDescription in interface ResourceMapping
      Returns:
    • iterator

      public Iterator<MethodResourceMapping> iterator()
      Specified by:
      iterator in interface Iterable<MethodResourceMapping>