Class SpringAffordanceBuilder

java.lang.Object
org.springframework.hateoas.server.core.SpringAffordanceBuilder

public class SpringAffordanceBuilder extends Object
Extract information needed to assemble an Affordance from a Spring MVC web method.
Author:
Greg Turnquist, Oliver Drotbohm
  • Field Details

  • Constructor Details

    • SpringAffordanceBuilder

      public SpringAffordanceBuilder()
  • Method Details

    • getAffordances

      public static List<Affordance> getAffordances(Class<?> type, Method method, String href)
      Returns all Affordances for the given type's method and base URI.
      Parameters:
      type - must not be null.
      method - must not be null.
      href - must not be null or empty.
      Returns:
    • getMapping

      @Nullable @Deprecated public static String getMapping(Class<?> type, Method method)
      Deprecated.
      since 2.0, use getUriMapping(Class, Method) instead.
      Returns the mapping for the given type's method.
      Parameters:
      type - must not be null.
      method - must not be null.
      Returns:
    • getUriMapping

      public static UriMapping getUriMapping(Class<?> type, Method method)
      Returns the mapping for the given type's method.
      Parameters:
      type - must not be null.
      method - must not be null.
      Returns:
      Since:
      2.0