Module spring.data.rest.webmvc
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(org.springframework.data.rest.core.mapping.ResourceMetadata metadata, PersistentEntity<?, ?> entity, RepositoryInvoker invoker) -
Method Summary
Modifier and TypeMethodDescriptionClass<?>PersistentEntity<?,?> org.springframework.data.rest.core.mapping.ResourceMetadataorg.springframework.data.rest.core.mapping.SearchResourceMappingsorg.springframework.data.rest.core.mapping.SupportedHttpMethodsresourceLink(EntityModel<?> resource) voidvoidverifySupportedMethod(HttpMethod httpMethod, PersistentProperty<?> property) Verifies that the givenHttpMethodis supported for the givenPersistentProperty.voidverifySupportedMethod(HttpMethod httpMethod, org.springframework.data.rest.core.mapping.ResourceType resourceType) Verifies that the givenHttpMethodis supported for the givenResourceType.
-
Constructor Details
-
RootResourceInformation
public RootResourceInformation(org.springframework.data.rest.core.mapping.ResourceMetadata metadata, PersistentEntity<?, ?> entity, RepositoryInvoker invoker)
-
-
Method Details
-
getDomainType
-
getResourceMetadata
public org.springframework.data.rest.core.mapping.ResourceMetadata getResourceMetadata() -
getSearchMappings
public org.springframework.data.rest.core.mapping.SearchResourceMappings getSearchMappings() -
getInvoker
-
getPersistentEntity
-
getSupportedMethods
public org.springframework.data.rest.core.mapping.SupportedHttpMethods getSupportedMethods() -
verifySupportedMethod
public void verifySupportedMethod(HttpMethod httpMethod, org.springframework.data.rest.core.mapping.ResourceType resourceType) throws 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.HttpRequestMethodNotSupportedException- if theResourceTypedoes not support the givenHttpMethod. Will contain all supported methods as indicators for clients.
-
verifySupportedMethod
public void verifySupportedMethod(HttpMethod httpMethod, PersistentProperty<?> property) throws 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.HttpRequestMethodNotSupportedException- if thePersistentPropertydoes not support the givenHttpMethod. Will contain all supported methods as indicators for clients.
-
verifyPutForCreation
-
resourceLink
-