Class ExternalItemListProvider<P extends com.broadleafcommerce.cart.client.domain.ItemList>
- java.lang.Object
- 
- com.broadleafcommerce.cartoperation.service.provider.external.AbstractExternalProvider
- 
- com.broadleafcommerce.cartoperation.service.provider.external.ExternalItemListProvider<P>
 
 
- 
- All Implemented Interfaces:
- ItemListProvider<P>
 
 public class ExternalItemListProvider<P extends com.broadleafcommerce.cart.client.domain.ItemList> extends AbstractExternalProvider implements ItemListProvider<P> External (HTTP) implementation of an item list provider.- Author:
- Jacob Mitash
 
- 
- 
Field Summary- 
Fields inherited from class com.broadleafcommerce.cartoperation.service.provider.external.AbstractExternalProviderENTITY_NOT_FOUND
 
- 
 - 
Constructor SummaryConstructors Constructor Description ExternalItemListProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCartProperties properties)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Pcreate(P itemList, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Creates an item list.voiddelete(@NonNull String listId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Deletes an item list by ID.voiddelete(@NonNull Set<String> listIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Deletes multiple item lists by IDs.protected org.springframework.web.util.UriComponentsBuildergetBaseUri()Gets the base URI common to all requests this provider will make.protected org.springframework.core.ParameterizedTypeReference<ResponsePageGenerator<P>>getListType()Gets the type reference for a list of item lists.protected ExternalCartPropertiesgetProperties()protected StringgetServiceClient()protected org.springframework.core.ParameterizedTypeReference<P>getType()Gets the type reference for item lists.PreadById(@NonNull String listId, boolean hydrate, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Reads a specific item list by its ID and optionally hydrates the items.PreadById(@NonNull String listId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Reads a specific item list by its ID.org.springframework.data.domain.Page<P>readByIds(@NonNull Set<String> listIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Reads specific item lists by their IDs.Preplace(P itemList, @NonNull String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Replaces an item list.Pupdate(P itemList, @NonNull String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Updates an item list.- 
Methods inherited from class com.broadleafcommerce.cartoperation.service.provider.external.AbstractExternalProviderbuildNotFoundException, executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, isEntityNotFound, pageableToParams, uriVars
 
- 
 
- 
- 
- 
Constructor Detail- 
ExternalItemListProviderpublic ExternalItemListProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCartProperties properties)
 
- 
 - 
Method Detail- 
readByIdpublic P readById(@NonNull @NonNull String listId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Description copied from interface:ItemListProviderReads a specific item list by its ID.- Specified by:
- readByIdin interface- ItemListProvider<P extends com.broadleafcommerce.cart.client.domain.ItemList>
- Parameters:
- listId- the ID of the item list to retrieve
- context- the context of the request
- Returns:
- the item list with the given ID
 
 - 
readByIdpublic P readById(@NonNull @NonNull String listId, boolean hydrate, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Description copied from interface:ItemListProviderReads a specific item list by its ID and optionally hydrates the items.- Specified by:
- readByIdin interface- ItemListProvider<P extends com.broadleafcommerce.cart.client.domain.ItemList>
- Parameters:
- listId- the ID of the item list to retrieve
- hydrate- if true, causes the items to by hydrated
- context- the context of the request
- Returns:
- the item list with the given ID
 
 - 
readByIdspublic org.springframework.data.domain.Page<P> readByIds(@NonNull @NonNull Set<String> listIds, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Description copied from interface:ItemListProviderReads specific item lists by their IDs.- Specified by:
- readByIdsin interface- ItemListProvider<P extends com.broadleafcommerce.cart.client.domain.ItemList>
- Parameters:
- listIds- the IDs of the item lists to retrieve
- filters- additional filters to apply in the query.
- page- the requested page of results from the database
- context- the context of the request
- Returns:
- the item lists with the given IDs
 
 - 
createpublic P create(@NonNull P itemList, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Description copied from interface:ItemListProviderCreates an item list.- Specified by:
- createin interface- ItemListProvider<P extends com.broadleafcommerce.cart.client.domain.ItemList>
- Parameters:
- itemList- the item list to create
- context- the context of the request
- Returns:
- the created item list
 
 - 
replacepublic P replace(@NonNull P itemList, @NonNull @NonNull String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Description copied from interface:ItemListProviderReplaces an item list.- Specified by:
- replacein interface- ItemListProvider<P extends com.broadleafcommerce.cart.client.domain.ItemList>
- Parameters:
- itemList- the item list to replace with
- id- the ID of the item list
- context- the context of the request
- Returns:
- the replaced item list
 
 - 
updatepublic P update(@NonNull P itemList, @NonNull @NonNull String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Description copied from interface:ItemListProviderUpdates an item list.- Specified by:
- updatein interface- ItemListProvider<P extends com.broadleafcommerce.cart.client.domain.ItemList>
- Parameters:
- itemList- the item list to update with
- id- the ID of the item list
- context- the context of the request
- Returns:
- the updated item list
 
 - 
deletepublic void delete(@NonNull @NonNull String listId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Description copied from interface:ItemListProviderDeletes an item list by ID.- Specified by:
- deletein interface- ItemListProvider<P extends com.broadleafcommerce.cart.client.domain.ItemList>
- Parameters:
- listId- the ID of the item list to delete
- context- the context of the request
 
 - 
deletepublic void delete(@NonNull @NonNull Set<String> listIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Description copied from interface:ItemListProviderDeletes multiple item lists by IDs.- Specified by:
- deletein interface- ItemListProvider<P extends com.broadleafcommerce.cart.client.domain.ItemList>
- Parameters:
- listIds- the list of IDs of the item lists to delete
- context- the context of the request
 
 - 
getBaseUriprotected org.springframework.web.util.UriComponentsBuilder getBaseUri() Gets the base URI common to all requests this provider will make.- Returns:
- a URI components builder with the base URI set up
 
 - 
getTypeprotected org.springframework.core.ParameterizedTypeReference<P> getType() Gets the type reference for item lists.- Returns:
- type reference for item lists
 
 - 
getListTypeprotected org.springframework.core.ParameterizedTypeReference<ResponsePageGenerator<P>> getListType() Gets the type reference for a list of item lists.- Returns:
- type reference for a list of item lists
 
 - 
getServiceClientprotected String getServiceClient() 
 - 
getPropertiesprotected ExternalCartProperties getProperties() 
 
- 
 
-