Class JpaDataFeedFileLobStorageService
java.lang.Object
com.broadleafcommerce.datafeed.provider.jpa.service.JpaDataFeedFileLobStorageService
- All Implemented Interfaces:
- StorageService
An implementation of 
StorageService that leverages JpaDataFeedFileLob as the file
 storage mechanism.- 
Constructor SummaryConstructorsConstructorDescription
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringbooleanDeletes the content from the backing provider.protected JpaDataFeedFileLobRepository<JpaDataFeedFileLob>booleanreadToDestination(String uniqueFileNameInContext, String tenantId, OutputStream destination) Reads and transfers the data content of the specified file directly into the specifiedOutputStream.booleanstore(String uniqueFileNameInContext, InputStream content, long contentSizeInBytes, String tenantId) Stores a data stream to a backing provider.
- 
Constructor Details- 
JpaDataFeedFileLobStorageServicepublic JpaDataFeedFileLobStorageService(JpaDataFeedFileLobRepository<JpaDataFeedFileLob> repository) 
 
- 
- 
Method Details- 
storepublic boolean store(String uniqueFileNameInContext, InputStream content, long contentSizeInBytes, String tenantId) Description copied from interface:StorageServiceStores a data stream to a backing provider. The operation will not be successful if there is already data at the specified location.- Specified by:
- storein interface- StorageService
- Parameters:
- uniqueFileNameInContext- a file name to uniquely identify the file in the given context (ex: unique in the given tenant)
- content- the data to store. This will always be closed by the implementation.
- contentSizeInBytes- the size of the- contentstream in bytes
- tenantId- the tenant ID to store the file under
- Returns:
- whether the operation was successful
 
- 
buildPath
- 
readToDestinationpublic boolean readToDestination(String uniqueFileNameInContext, String tenantId, OutputStream destination) Description copied from interface:StorageServiceReads and transfers the data content of the specified file directly into the specifiedOutputStream.- Specified by:
- readToDestinationin interface- StorageService
- Parameters:
- uniqueFileNameInContext- a file name to uniquely identify the file in the given context (ex: unique in the given tenant)
- tenantId- the tenant ID the file is stored under
- destination- the destination to write the data to. This will always be closed by the implementation.
- Returns:
- whether the operation was successful
 
- 
deleteDescription copied from interface:StorageServiceDeletes the content from the backing provider.- Specified by:
- deletein interface- StorageService
- Parameters:
- uniqueFileNameInContext- a file name to uniquely identify the file in the given context (ex: unique in the given tenant)
- tenantId- the tenant ID the file is stored under
- Returns:
- whether the operation was successful
 
- 
getRepository
 
-