Interface VendorService<P extends Vendor>
- All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
- All Known Implementing Classes:
DefaultVendorService
public interface VendorService<P extends Vendor>
extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
Service API for
Vendor
. Supported by VendorRepository
.- Author:
- Jon Fleschler (jfleschler)
-
Method Summary
Modifier and TypeMethodDescriptioncreateVendorFromRequest
(VendorCreationRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Create a vendor from the givenVendorCreationRequest
.org.springframework.data.domain.Page<P>
readAllByName
(String nameQuery, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Read all vendors, optionally filtered by name.readByVendorRef
(String vendorRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the vendor with the given reference key (should only be one result, as vendor keys are unique).Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService
readAll, readAll, readAll, readAll
-
Method Details
-
readAllByName
org.springframework.data.domain.Page<P> readAllByName(@Nullable String nameQuery, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Read all vendors, optionally filtered by name.- Parameters:
nameQuery
- (optional) the vendor name to filter bypage
- the requested page of results from the databasefilters
- additional filters to apply in the query, can be nullcontext
- context information surrounding multitenant state- Returns:
- all vendors, optionally filtered by name
-
readByVendorRef
Optional<P> readByVendorRef(@NonNull String vendorRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the vendor with the given reference key (should only be one result, as vendor keys are unique).- Parameters:
vendorRef
- the reference key of the vendor that should be retrievedcontextInfo
- context information surrounding multitenant state- Returns:
- an
Optional
containing the vendor with the given reference key, empty if not found
-
createVendorFromRequest
P createVendorFromRequest(@NonNull VendorCreationRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Create a vendor from the givenVendorCreationRequest
.- Parameters:
request
- the request containing requiried vendor data.contextInfo
- context information surrounding multitenant state.- Returns:
- a new vendor.
-
getRepositoryDomain
-