Class ProfileController

java.lang.Object
org.springframework.data.rest.webmvc.ProfileController

@BasePathAwareController public class ProfileController extends Object
Profile-based controller exposing multiple forms of metadata.
Since:
2.4
Author:
Greg Turnquist, Oliver Gierke
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProfileController(org.springframework.data.rest.core.config.RepositoryRestConfiguration configuration, org.springframework.data.rest.core.mapping.RepositoryResourceMappings mappings, Repositories repositories)
    Wire up the controller with a copy of RepositoryRestConfiguration.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    getPath(org.springframework.data.rest.core.config.RepositoryRestConfiguration configuration, org.springframework.data.rest.core.mapping.ResourceMapping mapping)
    Return the href for the profile link of a given baseUri and domain type mapping.
    static String
    getRootPath(org.springframework.data.rest.core.config.RepositoryRestConfiguration configuration)
    Return the href for the profile root link of a given baseUri.
    List the OPTIONS for this controller.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ProfileController

      @Autowired public ProfileController(org.springframework.data.rest.core.config.RepositoryRestConfiguration configuration, org.springframework.data.rest.core.mapping.RepositoryResourceMappings mappings, Repositories repositories)
      Wire up the controller with a copy of RepositoryRestConfiguration.
      Parameters:
      configuration - must not be null.
      mappings - must not be null.
      repositories - must not be null.
  • Method Details

    • profileOptions

      @RequestMapping(value="/profile", method=OPTIONS) public HttpEntity<?> profileOptions()
      List the OPTIONS for this controller.
      Returns:
    • getRootPath

      public static String getRootPath(org.springframework.data.rest.core.config.RepositoryRestConfiguration configuration)
      Return the href for the profile root link of a given baseUri.
      Parameters:
      configuration - is the source of the app's baseUri.
      Returns:
    • getPath

      public static String getPath(org.springframework.data.rest.core.config.RepositoryRestConfiguration configuration, org.springframework.data.rest.core.mapping.ResourceMapping mapping)
      Return the href for the profile link of a given baseUri and domain type mapping.
      Parameters:
      configuration - is the source of the app's baseUri.
      mapping - provides the resource's path.
      Returns: