Class DefaultLinkCollector
java.lang.Object
org.springframework.data.rest.webmvc.mapping.DefaultLinkCollector
- All Implemented Interfaces:
LinkCollector
A service to collect all standard links that need to be added to a certain object.
- Since:
- 3.6
- Author:
- Oliver Drotbohm
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultLinkCollector(PersistentEntities entities, SelfLinkProvider linkProvider, Associations associationLinks) Creates a newDefaultLinkCollectorfor the givenPersistentEntities,SelfLinkProviderandAssociations. -
Method Summary
Modifier and TypeMethodDescriptiongetLinksFor(Object object) Returns allLinksfor the given object.getLinksFor(Object object, Links existingLinks) getLinksForNested(Object object, Links existing)
-
Constructor Details
-
DefaultLinkCollector
public DefaultLinkCollector(PersistentEntities entities, SelfLinkProvider linkProvider, Associations associationLinks) Creates a newDefaultLinkCollectorfor the givenPersistentEntities,SelfLinkProviderandAssociations.- Parameters:
entities- must not be null.linkProvider- must not be null.associationLinks- must not be null.
-
-
Method Details
-
getLinksFor
Returns allLinksfor the given object.- Specified by:
getLinksForin interfaceLinkCollector- Parameters:
object- must not be null.- Returns:
-
getLinksFor
- Specified by:
getLinksForin interfaceLinkCollector- Parameters:
object- must not be null.existingLinks- must not be null.- Returns:
-
getLinksForNested
- Specified by:
getLinksForNestedin interfaceLinkCollector
-