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 Type
    Method
    Description
    createVendorFromRequest(VendorCreationRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Create a vendor from the given VendorCreationRequest.
     
    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 by
      page - the requested page of results from the database
      filters - additional filters to apply in the query, can be null
      context - 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 retrieved
      contextInfo - 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 given VendorCreationRequest.
      Parameters:
      request - the request containing requiried vendor data.
      contextInfo - context information surrounding multitenant state.
      Returns:
      a new vendor.
    • getRepositoryDomain

      @NonNull String getRepositoryDomain()