public class RepositoryEntityLinks
extends org.springframework.hateoas.core.AbstractEntityLinks
EntityLinks
implementation that is able to create Link
for domain classes managed by Spring Data
REST.Constructor and Description |
---|
RepositoryEntityLinks(Repositories repositories,
ResourceMappings mappings,
RepositoryRestConfiguration config,
PagingAndSortingTemplateVariables templateVariables,
org.springframework.plugin.core.PluginRegistry<BackendIdConverter,Class<?>> idConverters)
Creates a new
RepositoryEntityLinks . |
Modifier and Type | Method and Description |
---|---|
org.springframework.hateoas.LinkBuilder |
linkFor(Class<?> type) |
org.springframework.hateoas.LinkBuilder |
linkFor(Class<?> type,
Object... parameters) |
org.springframework.hateoas.Links |
linksToSearchResources(Class<?> type)
Returns all links to search resource for the given type.
|
org.springframework.hateoas.Links |
linksToSearchResources(Class<?> type,
Pageable pageable)
Returns all link to search resources for the given type, pre-expanded with the given
Pageable if
applicable. |
org.springframework.hateoas.Links |
linksToSearchResources(Class<?> type,
Sort sort)
Returns all link to search resources for the given type, pre-expanded with the given
Sort if applicable. |
org.springframework.hateoas.Link |
linkToCollectionResource(Class<?> type) |
org.springframework.hateoas.Link |
linkToPagedResource(Class<?> type,
Pageable pageable)
Returns the link to to the paged colelction resource for the given type, pre-expanding the
|
org.springframework.hateoas.Link |
linkToSearchResource(Class<?> domainType,
String rel)
Creates the link to the search resource with the given rel for a given type.
|
org.springframework.hateoas.Link |
linkToSearchResource(Class<?> domainType,
String rel,
Pageable pageable)
Creates the link to the search resource with the given rel for a given type.
|
org.springframework.hateoas.Link |
linkToSearchResource(Class<?> domainType,
String rel,
Sort sort)
Creates the link to the search resource with the given rel for a given type.
|
org.springframework.hateoas.Link |
linkToSingleResource(Class<?> type,
Object id) |
boolean |
supports(Class<?> delimiter) |
@Autowired public RepositoryEntityLinks(Repositories repositories, ResourceMappings mappings, RepositoryRestConfiguration config, PagingAndSortingTemplateVariables templateVariables, org.springframework.plugin.core.PluginRegistry<BackendIdConverter,Class<?>> idConverters)
RepositoryEntityLinks
.repositories
- must not be null.mappings
- must not be null.config
- must not be null.pagingAndSortingTemplateVariables
- must not be null.idConverters
- must not be null.public boolean supports(Class<?> delimiter)
public org.springframework.hateoas.LinkBuilder linkFor(Class<?> type)
public org.springframework.hateoas.Link linkToPagedResource(Class<?> type, Pageable pageable)
type
- must not be null.pageable
- the pageable to can be null.public org.springframework.hateoas.Link linkToCollectionResource(Class<?> type)
public org.springframework.hateoas.Link linkToSingleResource(Class<?> type, Object id)
public org.springframework.hateoas.Links linksToSearchResources(Class<?> type)
type
- must not be null.public org.springframework.hateoas.Links linksToSearchResources(Class<?> type, Pageable pageable)
Pageable
if
applicable.type
- must not be null.pageable
- can be null.public org.springframework.hateoas.Links linksToSearchResources(Class<?> type, Sort sort)
Sort
if applicable.type
- must not be null.sort
- can be null.public org.springframework.hateoas.Link linkToSearchResource(Class<?> domainType, String rel)
domainType
- must not be null.rel
- must not be null or empty.public org.springframework.hateoas.Link linkToSearchResource(Class<?> domainType, String rel, Pageable pageable)
Pageable
to
pre-expand potentially available template variables.domainType
- must not be null.rel
- must not be null or empty.pageable
- can be null.public org.springframework.hateoas.Link linkToSearchResource(Class<?> domainType, String rel, Sort sort)
Sort
to
pre-expand potentially available template variables.domainType
- must not be null.rel
- must not be null or empty.sort
- can be null.Copyright © 2011-2015–2015 Pivotal Software, Inc.. All rights reserved.