Schnittstelle SealedNonReactiveFlatHalWrapperAssembler<ResourceT>
- Typparameter:
ResourceT- the type of the object being wrapped, which contains the main data
- Alle Superschnittstellen:
SealedResourceLinkAssemblerModule<ResourceT>,SealedResourceListAssemblerModule<ResourceT,Void>
- Alle bekannten Unterschnittstellen:
FlatHalWrapperAssembler<ResourceT>
public sealed interface SealedNonReactiveFlatHalWrapperAssembler<ResourceT>
extends SealedResourceLinkAssemblerModule<ResourceT>, SealedResourceListAssemblerModule<ResourceT,Void>
permits FlatHalWrapperAssembler<ResourceT>
Interface for managing the transformation of standalone resources into HAL-compliant representations,
supplemented with hypermedia links. This interface facilitates the direct enhancement of resources with the
necessary
fields and structure to comply with HAL standards, enabling resources to become HAL-compliant.
Core functionalities include:
- Directly enhancing resources to meet HAL structure requirements.
- Appending hypermedia links to resources to support navigability and resource interaction in a HAL-based API.
- Supporting pagination when wrapping lists of resources to provide structured navigation across large datasets.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdefault HalListWrapper<ResourceT, Void> wrapInListWrapper(List<ResourceT> resourcesToWrap, long totalElements, int pageSize, Long offset, List<SortCriteria> sortCriteria, org.springframework.web.server.ServerWebExchange exchange) Wraps a list of resources into aHalListWrapperwith pagination details, enhancing them with hypermedia links as defined by the assembler.default HalListWrapper<ResourceT, Void> wrapInListWrapper(List<ResourceT> resourcesToWrap, HalPageInfo pageInfo, List<SortCriteria> sortCriteria, org.springframework.web.server.ServerWebExchange exchange) Wraps a list of resources into aHalListWrapper, optionally including pagination information, and enhances them with hypermedia links as defined by the assembler.default HalListWrapper<ResourceT, Void> wrapInListWrapper(List<ResourceT> resourcesToWrap, org.springframework.web.server.ServerWebExchange exchange) Wraps a list of resources into aHalListWrapper, enhancing them with hypermedia links as defined by the assembler.default HalResourceWrapper<ResourceT, Void> wrapInResourceWrapper(ResourceT resourceToWrap, org.springframework.web.server.ServerWebExchange exchange) Wraps a single resource in aHalResourceWrapperand enhances it with hypermedia links as defined by the assembler.Von Schnittstelle geerbte Methoden de.kamillionlabs.hateoflux.assembler.SealedResourceLinkAssemblerModule
buildLinksForResource, buildOtherLinksForResource, buildSelfLinkForResourceVon Schnittstelle geerbte Methoden de.kamillionlabs.hateoflux.assembler.SealedResourceListAssemblerModule
buildLinksForResourceList, buildLinksForResourceList, buildOtherLinksForResourceList, buildSelfLinkForResourceList, createEmptyListWrapper, createEmptyListWrapper, createEmptyListWrapper, createEmptyListWrapper, getResourceTClass
-
Methodendetails
-
wrapInListWrapper
default HalListWrapper<ResourceT,Void> wrapInListWrapper(@NonNull List<ResourceT> resourcesToWrap, org.springframework.web.server.ServerWebExchange exchange) Wraps a list of resources into aHalListWrapper, enhancing them with hypermedia links as defined by the assembler.- Parameter:
resourcesToWrap- the list of resources to be wrappedexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- a
HalListWrapperthat includes the wrapped resources enhanced with hypermedia links - Siehe auch:
-
wrapInListWrapper
default HalListWrapper<ResourceT,Void> wrapInListWrapper(@NonNull List<ResourceT> resourcesToWrap, long totalElements, int pageSize, @Nullable Long offset, @Nullable List<SortCriteria> sortCriteria, org.springframework.web.server.ServerWebExchange exchange) Wraps a list of resources into aHalListWrapperwith pagination details, enhancing them with hypermedia links as defined by the assembler.- Parameter:
resourcesToWrap- the list of resources to be wrappedtotalElements- the total number of elements across all pagespageSize- the requested/max number of elements in a single pageoffset- the starting offset of the page, if specifiedsortCriteria- sort criteria (property and direction) of the page, if specifiedexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- a
HalListWrapperthat includes the wrapped resources enhanced with hypermedia links, along with pagination information - Siehe auch:
-
wrapInListWrapper
default HalListWrapper<ResourceT,Void> wrapInListWrapper(@NonNull List<ResourceT> resourcesToWrap, @Nullable HalPageInfo pageInfo, @Nullable List<SortCriteria> sortCriteria, org.springframework.web.server.ServerWebExchange exchange) Wraps a list of resources into aHalListWrapper, optionally including pagination information, and enhances them with hypermedia links as defined by the assembler.- Parameter:
resourcesToWrap- the list of resources to be wrappedpageInfo- optional pagination information to include in the wrappersortCriteria- sort criteria (property and direction) of the page, if specifiedexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- a
HalListWrapperthat includes the wrapped resources enhanced with hypermedia links, and optionally pagination details - Siehe auch:
-
wrapInResourceWrapper
default HalResourceWrapper<ResourceT,Void> wrapInResourceWrapper(@NonNull ResourceT resourceToWrap, org.springframework.web.server.ServerWebExchange exchange) Wraps a single resource in aHalResourceWrapperand enhances it with hypermedia links as defined by the assembler.- Parameter:
resourceToWrap- the resource to wrapexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- a
HalResourceWrapperthat includes the wrapped resource enhanced with hypermedia links
-