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 -
Constructor Summary
ConstructorsConstructorDescriptionDefaultFulfillmentPricingConfigService(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 TypeMethodDescriptionprotected com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfigcopyFulfillmentPricingConfig(P tenantConfig, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Copy the givenFulfillmentPricingConfiginto a new object.protected PgetApplicationConfig(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Get theFulfillmentPricingConfigfor the given application context.protected com.broadleafcommerce.common.extension.cache.CacheStateManagerprotected FulfillmentPricingConfigRepository<com.broadleafcommerce.data.tracking.core.Trackable>getFulfillmentPricingConfigRepository(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Convenience method to cast the repository toFulfillmentPricingConfigRepository.protected PgetTenantConfig(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Get theFulfillmentPricingConfigfor the given tenant context.protected com.broadleafcommerce.common.extension.TypeFactorybooleanhasApplicationConfig(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Indicate if the current application context has aFulfillmentPricingConfigsaved in the database.booleanhasTenantConfig(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Indicate if the current tenant context has aFulfillmentPricingConfigsaved in the database.readFulfillmentPricingConfig(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds theFulfillmentPricingConfigfor the providedContextInfo.readOrGetNewConfigForApplication(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Fetch theFulfillmentPricingConfigfor the providedContextInfo.Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService
getRsqlHelper, readAll, readAll, readAll, readAllMethods 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, updateSortMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, updateSortMethods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService
readAll, readAll, readAll, readAll
-
Field Details
-
CACHE_PRICING_CONFIG
- See Also:
-
-
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:FulfillmentPricingConfigServiceIndicate if the current application context has aFulfillmentPricingConfigsaved in the database.- Specified by:
hasApplicationConfigin interfaceFulfillmentPricingConfigService<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:FulfillmentPricingConfigServiceIndicate if the current tenant context has aFulfillmentPricingConfigsaved in the database.- Specified by:
hasTenantConfigin interfaceFulfillmentPricingConfigService<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:FulfillmentPricingConfigAccessorFinds theFulfillmentPricingConfigfor the providedContextInfo.- Specified by:
readFulfillmentPricingConfigin interfaceFulfillmentPricingConfigAccessor<P extends com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig>- Parameters:
contextInfo- The context of the request.- Returns:
- The
FulfillmentPricingConfigfor this context.
-
readOrGetNewConfigForApplication
public P readOrGetNewConfigForApplication(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:FulfillmentPricingConfigServiceFetch theFulfillmentPricingConfigfor the providedContextInfo. If none is found, return a new, non-persisted object.- Specified by:
readOrGetNewConfigForApplicationin interfaceFulfillmentPricingConfigService<P extends com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig>- Parameters:
contextInfo- The context of the request.- Returns:
- The
FulfillmentPricingConfigfor this context.
-
getApplicationConfig
protected P getApplicationConfig(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Get theFulfillmentPricingConfigfor the given application context.- Parameters:
contextInfo- The context of the request.- Returns:
- The
FulfillmentPricingConfigfor the given application context.
-
getTenantConfig
protected P getTenantConfig(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Get theFulfillmentPricingConfigfor the given tenant context.- Parameters:
contextInfo- The context of the request.- Returns:
- The
FulfillmentPricingConfigfor the given application context.
-
copyFulfillmentPricingConfig
protected com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig copyFulfillmentPricingConfig(P tenantConfig, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Copy the givenFulfillmentPricingConfiginto a new object. This deep copies theSupportedFulfillmentOptionList.- Parameters:
tenantConfig- The source object to copy.contextInfo- The context of the request.- Returns:
- A new
FulfillmentPricingConfigthat 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 toFulfillmentPricingConfigRepository.- 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()
-