Schnittstelle SealedResourceListAssemblerModule<ResourceT,EmbeddedT>
- Typparameter:
ResourceT- the type of the object being wrapped, which contains the main dataEmbeddedT- the type of the object representing additional embedded resources related to the main data, if any
- Alle bekannten Unterschnittstellen:
EmbeddingHalWrapperAssembler<ResourceT,,EmbeddedT> FlatHalWrapperAssembler<ResourceT>,SealedNonReactiveEmbeddingHalWrapperAssembler<ResourceT,,EmbeddedT> SealedNonReactiveFlatHalWrapperAssembler<ResourceT>
public sealed interface SealedResourceListAssemblerModule<ResourceT,EmbeddedT>
permits SealedNonReactiveFlatHalWrapperAssembler<ResourceT>, SealedNonReactiveEmbeddingHalWrapperAssembler<ResourceT,EmbeddedT>
Assembler module that has utility functions and builds links for a list of resources.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbuildLinksForResourceList(HalPageInfo pageInfo, List<SortCriteria> sortCriteria, org.springframework.web.server.ServerWebExchange exchange) Main method for building all links for a paged list of resources and embedded resources, including navigational links and other contextual links applicable to the entire list.buildLinksForResourceList(org.springframework.web.server.ServerWebExchange exchange) Main method for building all links for a list of resources and embedded resources, including a self-link and other contextual links applicable to the entire list.buildOtherLinksForResourceList(org.springframework.web.server.ServerWebExchange exchange) Provides additional contextual links for a list of resources and embedded resources, beyond the self-link, applicable to the entire list.buildSelfLinkForResourceList(org.springframework.web.server.ServerWebExchange exchange) Creates a self-link for a list of resources and embedded resources, representing a URI that clients can use to access the list directly, applicable to the entire list.default HalListWrapper<ResourceT, EmbeddedT> createEmptyListWrapper(Class<?> listItemTypeAsNameOrigin, int pageSize, int pageNumber, List<SortCriteria> sortCriteria, org.springframework.web.server.ServerWebExchange exchange) Creates a paged emptyHalListWrapperincluding hypermedia links applicable to the entire list.default HalListWrapper<ResourceT, EmbeddedT> createEmptyListWrapper(Class<?> listItemTypeAsNameOrigin, org.springframework.web.server.ServerWebExchange exchange) Creates an emptyHalListWrapperincluding hypermedia links applicable to the entire list.default HalListWrapper<ResourceT, EmbeddedT> createEmptyListWrapper(String listName, int pageSize, int pageNumber, List<SortCriteria> sortCriteria, org.springframework.web.server.ServerWebExchange exchange) Creates an emptyHalListWrapperincluding hypermedia links applicable to the entire list.default HalListWrapper<ResourceT, EmbeddedT> createEmptyListWrapper(String listName, org.springframework.web.server.ServerWebExchange exchange) Creates an emptyHalListWrapperincluding hypermedia links applicable to the entire list.Specifies the class type ofResourceTthat the assembler builds.
-
Methodendetails
-
getResourceTClass
Specifies the class type ofResourceTthat the assembler builds. This method is required because type erasure removes generic type information at runtime. By implementing this method, the class type ofResourceTbecomes accessible. An implementation is as simple as:public Class<Book> getResourceTClass() { return Book.class; }- Gibt zurück:
- the class type of
ResourceT
-
createEmptyListWrapper
default HalListWrapper<ResourceT,EmbeddedT> createEmptyListWrapper(@NonNull Class<?> listItemTypeAsNameOrigin, org.springframework.web.server.ServerWebExchange exchange) Creates an emptyHalListWrapperincluding hypermedia links applicable to the entire list.- Parameter:
listItemTypeAsNameOrigin- the class of the resource from which the list name is derived, typically pluralized to represent both resource and embedded resource types (also seeRelation)exchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- an initialized
HalListWrapperwith relevant hypermedia links for the entire list - Siehe auch:
-
createEmptyListWrapper
default HalListWrapper<ResourceT,EmbeddedT> createEmptyListWrapper(@NonNull Class<?> listItemTypeAsNameOrigin, int pageSize, int pageNumber, List<SortCriteria> sortCriteria, org.springframework.web.server.ServerWebExchange exchange) Creates a paged emptyHalListWrapperincluding hypermedia links applicable to the entire list.- Parameter:
listItemTypeAsNameOrigin- the class of the resource from which the list name is derived, typically pluralized to represent both resource and embedded resource types (also seeRelation)pageSize- the requested/max number of elements in a single pagepageNumber- the current page numbersortCriteria- sort criteria (property and direction) of the pageexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- an initialized
HalListWrapperwith relevant hypermedia links for the entire list - Siehe auch:
-
createEmptyListWrapper
default HalListWrapper<ResourceT,EmbeddedT> createEmptyListWrapper(@NonNull String listName, org.springframework.web.server.ServerWebExchange exchange) Creates an emptyHalListWrapperincluding hypermedia links applicable to the entire list.- Parameter:
listName- the given name for the listexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- an initialized
HalListWrapperwith relevant hypermedia links for the entire list - Siehe auch:
-
createEmptyListWrapper
default HalListWrapper<ResourceT,EmbeddedT> createEmptyListWrapper(@NonNull String listName, int pageSize, int pageNumber, List<SortCriteria> sortCriteria, org.springframework.web.server.ServerWebExchange exchange) Creates an emptyHalListWrapperincluding hypermedia links applicable to the entire list.- Parameter:
listName- the given name for the listpageSize- the requested/max number of elements in a single pagepageNumber- the current page numbersortCriteria- sort criteria (property and direction) of the pageexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- an initialized
HalListWrapperwith relevant hypermedia links for the entire list - Siehe auch:
-
buildLinksForResourceList
default List<Link> buildLinksForResourceList(org.springframework.web.server.ServerWebExchange exchange) Main method for building all links for a list of resources and embedded resources, including a self-link and other contextual links applicable to the entire list. It aggregates results frombuildSelfLinkForResourceList(org.springframework.web.server.ServerWebExchange)andbuildOtherLinksForResourceList(org.springframework.web.server.ServerWebExchange).- Parameter:
exchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- a list of
Linkobjects representing hypermedia links for the entire list of resource and embedded resource types
-
buildLinksForResourceList
default List<Link> buildLinksForResourceList(HalPageInfo pageInfo, List<SortCriteria> sortCriteria, org.springframework.web.server.ServerWebExchange exchange) Main method for building all links for a paged list of resources and embedded resources, including navigational links and other contextual links applicable to the entire list. It aggregates results frombuildSelfLinkForResourceList(org.springframework.web.server.ServerWebExchange)andbuildOtherLinksForResourceList(org.springframework.web.server.ServerWebExchange).- Parameter:
pageInfo- pagination information about the request pagesortCriteria- sort criteria (property and direction) of the pageexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- a list of
Linkobjects representing hypermedia links for the entire list of resource and embedded resource types
-
buildOtherLinksForResourceList
default List<Link> buildOtherLinksForResourceList(org.springframework.web.server.ServerWebExchange exchange) Provides additional contextual links for a list of resources and embedded resources, beyond the self-link, applicable to the entire list.- Parameter:
exchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- a list of
Linkobjects for the entire list of resource and embedded resource types
-
buildSelfLinkForResourceList
Creates a self-link for a list of resources and embedded resources, representing a URI that clients can use to access the list directly, applicable to the entire list.- Parameter:
exchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- a
Linkobject representing the self-link for the entire list of resource and embedded resource types
-