Class DefaultStorageLocationMappingService<P extends StorageLocationMapping>
java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseMappableCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlMappableCrudEntityService<P>
com.broadleafcommerce.asset.service.DefaultStorageLocationMappingService<P>
- Type Parameters:
P-StorageLocationMapping
- All Implemented Interfaces:
StorageLocationMappingService<P>,com.broadleafcommerce.data.tracking.core.service.MappableCrudEntityService<P>,com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityService<P>
public class DefaultStorageLocationMappingService<P extends StorageLocationMapping>
extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlMappableCrudEntityService<P>
implements StorageLocationMappingService<P>
Default implementation of
StorageLocationMappingService.- Since:
- Asset Service 2.0.3, Release Train 2.1.4, Release Train 2.2.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAContextKeyGenimplementation used for caching ofStorageLocationMapping. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultStorageLocationMappingService(StorageLocationMappingRepository<com.broadleafcommerce.data.tracking.core.Identifiable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityHelper helper, com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager, AssetCacheProperties assetCacheProperties) -
Method Summary
Modifier and TypeMethodDescriptionlongdeleteByStorageProviderTypeAndOriginalLocationIn(String storageProviderType, Collection<String> originalLocations) Deletes the mapping records matching the specified filters.findByStorageProviderTypeAndOriginalLocationIn(String storageProviderType, Collection<String> originalLocations) findByStorageProviderTypeAndOriginalLocationInInternal(String storageProviderType, Collection<String> originalLocations) protected StringgetCacheKeyByProviderTypeAndOriginalLocation(StorageLocationMapping storageLocationMapping) protected StringgetCacheKeyByProviderTypeAndOriginalLocation(String storageProviderType, String originalLocation) protected StorageLocationMappingRepository<com.broadleafcommerce.data.tracking.core.Identifiable>protected com.broadleafcommerce.common.extension.cache.key.ContextKeyGenMethods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlMappableCrudEntityService
getRsqlHelper, readAll, readAll, readAll, readAllMethods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseMappableCrudEntityService
convertFromPersistentDomain, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, readAll, readAll, readAll, readAllByIds, readById, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccessMethods 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.MappableCrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByIds, readById, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccessMethods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityService
readAll, readAll, readAll, readAll
-
Field Details
-
CACHE_BY_PROVIDER_TYPE_AND_OG_LOCATION
- See Also:
-
-
Constructor Details
-
DefaultStorageLocationMappingService
public DefaultStorageLocationMappingService(StorageLocationMappingRepository<com.broadleafcommerce.data.tracking.core.Identifiable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityHelper helper, @Nullable com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager, @Nullable AssetCacheProperties assetCacheProperties)
-
-
Method Details
-
findByStorageProviderTypeAndOriginalLocationIn
public List<P> findByStorageProviderTypeAndOriginalLocationIn(String storageProviderType, Collection<String> originalLocations) - Specified by:
findByStorageProviderTypeAndOriginalLocationInin interfaceStorageLocationMappingService<P extends StorageLocationMapping>- Parameters:
storageProviderType- theStorageLocationMapping.getStorageProviderType()value identifying the storage provider to find the mappings fororiginalLocations- theoriginal locationsto find the mapping records for- Returns:
- the mapping records matching the provided input
-
findByStorageProviderTypeAndOriginalLocationInInternal
protected List<P> findByStorageProviderTypeAndOriginalLocationInInternal(String storageProviderType, Collection<String> originalLocations) -
getCacheKeyByProviderTypeAndOriginalLocation
protected String getCacheKeyByProviderTypeAndOriginalLocation(StorageLocationMapping storageLocationMapping) - Parameters:
storageLocationMapping- the item to build a cache key for- Returns:
- a cache key comprised of the
StorageLocationMapping.getStorageProviderType()andStorageLocationMapping.getOriginalLocation().
-
getCacheKeyByProviderTypeAndOriginalLocation
-
deleteByStorageProviderTypeAndOriginalLocationIn
public long deleteByStorageProviderTypeAndOriginalLocationIn(String storageProviderType, Collection<String> originalLocations) Description copied from interface:StorageLocationMappingServiceDeletes the mapping records matching the specified filters.- Specified by:
deleteByStorageProviderTypeAndOriginalLocationInin interfaceStorageLocationMappingService<P extends StorageLocationMapping>- Parameters:
storageProviderType- theStorageLocationMapping.getStorageProviderType()value identifying the storage provider to find the mappings fororiginalLocations- theoriginal locationsto find the mapping records for- Returns:
- the number of records deleted by the operation
-
getStorageLocationMappingCacheKeyGen
protected com.broadleafcommerce.common.extension.cache.key.ContextKeyGen getStorageLocationMappingCacheKeyGen() -
getRepository
protected StorageLocationMappingRepository<com.broadleafcommerce.data.tracking.core.Identifiable> getRepository()- Overrides:
getRepositoryin classcom.broadleafcommerce.data.tracking.core.service.BaseMappableCrudEntityService<P extends StorageLocationMapping>
-