Class DefaultFulfillmentPricingConfigService<P extends com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig>

java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
com.broadleafcommerce.fulfillment.service.DefaultFulfillmentPricingConfigService<P>
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>, FulfillmentPricingConfigAccessor<P>, FulfillmentPricingConfigService<P>

public class DefaultFulfillmentPricingConfigService<P extends com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig> extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P> implements FulfillmentPricingConfigService<P>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultFulfillmentPricingConfigService(com.broadleafcommerce.data.tracking.core.TrackableRepository<T> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig
    copyFulfillmentPricingConfig(P tenantConfig, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Unnecessary method.
    protected P
    getApplicationConfig(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Get the FulfillmentPricingConfig for the given application context.
    protected com.broadleafcommerce.common.extension.cache.CacheStateManager
     
    protected FulfillmentPricingConfigRepository<com.broadleafcommerce.data.tracking.core.Trackable>
    getFulfillmentPricingConfigRepository(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Convenience method to cast the repository to FulfillmentPricingConfigRepository.
    protected P
    getTenantConfig(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Get the FulfillmentPricingConfig for the given tenant context.
    protected com.broadleafcommerce.common.extension.TypeFactory
     
    boolean
    hasApplicationConfig(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Indicate if the current application context has a FulfillmentPricingConfig saved in the database.
    boolean
    hasTenantConfig(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Indicate if the current tenant context has a FulfillmentPricingConfig saved in the database.
    readFulfillmentPricingConfig(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds the FulfillmentPricingConfig for the provided ContextInfo.
    readOrGetNewConfigForApplication(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Fetch the FulfillmentPricingConfig for the provided ContextInfo.

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService

    getRsqlHelper, readAll, readAll, readAll, readAll

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService

    convertFromPersistentDomain, convertToPersistentDomain, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, getRepository, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    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
  • Field Details

  • Constructor Details

    • DefaultFulfillmentPricingConfigService

      public DefaultFulfillmentPricingConfigService(com.broadleafcommerce.data.tracking.core.TrackableRepository<T> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager)
  • Method Details

    • hasApplicationConfig

      public boolean hasApplicationConfig(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentPricingConfigService
      Indicate if the current application context has a FulfillmentPricingConfig saved in the database.
      Specified by:
      hasApplicationConfig in interface FulfillmentPricingConfigService<P extends com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig>
      Parameters:
      contextInfo - The context of the request.
      Returns:
      TRUE if the current application context has a FulfillmentPricingConfig.
    • hasTenantConfig

      public boolean hasTenantConfig(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentPricingConfigService
      Indicate if the current tenant context has a FulfillmentPricingConfig saved in the database.
      Specified by:
      hasTenantConfig in interface FulfillmentPricingConfigService<P extends com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig>
      Parameters:
      contextInfo - The context of the request.
      Returns:
      TRUE if the current tenant context has a FulfillmentPricingConfig.
    • readFulfillmentPricingConfig

      public P readFulfillmentPricingConfig(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentPricingConfigAccessor
      Finds the FulfillmentPricingConfig for the provided ContextInfo.
      Specified by:
      readFulfillmentPricingConfig in interface FulfillmentPricingConfigAccessor<P extends com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig>
      Parameters:
      contextInfo - The context of the request.
      Returns:
      The FulfillmentPricingConfig for this context.
    • readOrGetNewConfigForApplication

      public P readOrGetNewConfigForApplication(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentPricingConfigService
      Fetch the FulfillmentPricingConfig for the provided ContextInfo. If none is found, return a new, non-persisted object.
      Specified by:
      readOrGetNewConfigForApplication in interface FulfillmentPricingConfigService<P extends com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig>
      Parameters:
      contextInfo - The context of the request.
      Returns:
      The FulfillmentPricingConfig for this context.
    • getApplicationConfig

      protected P getApplicationConfig(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Get the FulfillmentPricingConfig for the given application context.
      Parameters:
      contextInfo - The context of the request.
      Returns:
      The FulfillmentPricingConfig for the given application context.
    • getTenantConfig

      protected P getTenantConfig(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Get the FulfillmentPricingConfig for the given tenant context.
      Parameters:
      contextInfo - The context of the request.
      Returns:
      The FulfillmentPricingConfig for the given application context.
    • copyFulfillmentPricingConfig

      @Deprecated(since="2.1.0", forRemoval=true) protected com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig copyFulfillmentPricingConfig(P tenantConfig, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Unnecessary method. readOrGetNewConfigForApplication(ContextInfo) no longer copies fields to a new object.
      Copy the given FulfillmentPricingConfig into a new object.
      Parameters:
      tenantConfig - The source object to copy.
      contextInfo - The context of the request.
      Returns:
      A new FulfillmentPricingConfig that is a copy of the given object.
    • getFulfillmentPricingConfigRepository

      protected FulfillmentPricingConfigRepository<com.broadleafcommerce.data.tracking.core.Trackable> getFulfillmentPricingConfigRepository(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Convenience method to cast the repository to FulfillmentPricingConfigRepository.
      Parameters:
      contextInfo - The context of the request.
      Returns:
      The repository as FulfillmentPricingConfigRepository.
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
    • getCacheStateManager

      protected com.broadleafcommerce.common.extension.cache.CacheStateManager getCacheStateManager()