Class RootResourceInformation
java.lang.Object
org.springframework.data.rest.webmvc.RootResourceInformation
Meta-information about the root repository resource.
- Author:
- Jon Brisbin, Oliver Gierke
-
Constructor Summary
ConstructorsConstructorDescriptionRootResourceInformation(ResourceMetadata metadata, org.springframework.data.mapping.PersistentEntity<?, ?> entity, org.springframework.data.repository.support.RepositoryInvoker invoker) -
Method Summary
Modifier and TypeMethodDescriptionClass<?>org.springframework.data.repository.support.RepositoryInvokerorg.springframework.data.mapping.PersistentEntity<?,?> org.springframework.hateoas.LinkresourceLink(org.springframework.hateoas.EntityModel<?> resource) voidvoidverifySupportedMethod(org.springframework.http.HttpMethod httpMethod, org.springframework.data.mapping.PersistentProperty<?> property) Verifies that the givenHttpMethodis supported for the givenPersistentProperty.voidverifySupportedMethod(org.springframework.http.HttpMethod httpMethod, ResourceType resourceType) Verifies that the givenHttpMethodis supported for the givenResourceType.
-
Constructor Details
-
RootResourceInformation
public RootResourceInformation(ResourceMetadata metadata, org.springframework.data.mapping.PersistentEntity<?, ?> entity, org.springframework.data.repository.support.RepositoryInvoker invoker)
-
-
Method Details
-
getDomainType
-
getResourceMetadata
-
getSearchMappings
-
getInvoker
public org.springframework.data.repository.support.RepositoryInvoker getInvoker() -
getPersistentEntity
public org.springframework.data.mapping.PersistentEntity<?,?> getPersistentEntity() -
getSupportedMethods
-
verifySupportedMethod
public void verifySupportedMethod(org.springframework.http.HttpMethod httpMethod, ResourceType resourceType) throws org.springframework.web.HttpRequestMethodNotSupportedException, ResourceNotFoundException Verifies that the givenHttpMethodis supported for the givenResourceType.- Parameters:
httpMethod- must not be null.resourceType- must not be null.- Throws:
ResourceNotFoundException- if the repository is not exported at all.org.springframework.web.HttpRequestMethodNotSupportedException- if theResourceTypedoes not support the givenHttpMethod. Will contain all supported methods as indicators for clients.
-
verifySupportedMethod
public void verifySupportedMethod(org.springframework.http.HttpMethod httpMethod, org.springframework.data.mapping.PersistentProperty<?> property) throws org.springframework.web.HttpRequestMethodNotSupportedException Verifies that the givenHttpMethodis supported for the givenPersistentProperty.- Parameters:
httpMethod- must not be null.property- must not be null.- Throws:
ResourceNotFoundException- if the repository is not exported at all.org.springframework.web.HttpRequestMethodNotSupportedException- if thePersistentPropertydoes not support the givenHttpMethod. Will contain all supported methods as indicators for clients.
-
verifyPutForCreation
public void verifyPutForCreation() throws org.springframework.web.HttpRequestMethodNotSupportedException- Throws:
org.springframework.web.HttpRequestMethodNotSupportedException
-
resourceLink
public org.springframework.hateoas.Link resourceLink(org.springframework.hateoas.EntityModel<?> resource)
-