org.broadleafcommerce.cms.file.service
Interface StaticAssetStorageService

All Known Implementing Classes:
StaticAssetStorageServiceImpl

public interface StaticAssetStorageService

Author:
Jeff Fischer

Method Summary
 StaticAssetStorage create()
          Deprecated. Use createStaticAssetStorageFromFile instead.
 Blob createBlob(org.springframework.web.multipart.MultipartFile uploadedFile)
          Deprecated. Use createStaticAssetStorageFromFile instead.
 void createStaticAssetStorageFromFile(org.springframework.web.multipart.MultipartFile file, StaticAsset staticAsset)
          Persists the file to the DB or FileSystem according to the staticAsset's StorageType.
 void delete(StaticAssetStorage assetStorage)
          Removes a static asset from the database.
 StaticAssetStorage findStaticAssetStorageById(Long id)
          Returns a StaticAssetStorage object.
 Map<String,String> getCacheFileModel(String fullUrl, Map<String,String> parameterMap)
           
 StaticAssetStorage readStaticAssetStorageByStaticAssetId(Long id)
          Returns a StaticAssetStorage object using the id of a related StaticAsset.
 StaticAssetStorage save(StaticAssetStorage assetStorage)
          Persists a static asset to the database.
 

Method Detail

findStaticAssetStorageById

StaticAssetStorage findStaticAssetStorageById(Long id)
Returns a StaticAssetStorage object. Assumes that the asset is stored in the Database. Storing Assets in the DB is not the preferred mechanism for Broadleaf as of 3.0 so in most cases, this method would not be used by Broadleaf implementations.

Parameters:
id -
Returns:

create

StaticAssetStorage create()
Deprecated. Use createStaticAssetStorageFromFile instead.

Returns:

readStaticAssetStorageByStaticAssetId

StaticAssetStorage readStaticAssetStorageByStaticAssetId(Long id)
Returns a StaticAssetStorage object using the id of a related StaticAsset. Assumes that the asset is stored in the Database. Storing Assets in the DB is not the preferred mechanism for Broadleaf as of 3.0 so in most cases, this method would not be used by Broadleaf implementations.

Parameters:
id -
Returns:

save

StaticAssetStorage save(StaticAssetStorage assetStorage)
Persists a static asset to the database. Not typically used since Broadleaf 3.0 as the preferred method for storing assets is on a shared-filesystem.

Parameters:
assetStorage -
Returns:

delete

void delete(StaticAssetStorage assetStorage)
Removes a static asset from the database. Not typically used since Broadleaf 3.0 as the preferred method for storing assets is on a shared-filesystem.

Parameters:
assetStorage -

createBlob

Blob createBlob(org.springframework.web.multipart.MultipartFile uploadedFile)
                throws IOException
Deprecated. Use createStaticAssetStorageFromFile instead.

Parameters:
uploadedFile -
Returns:
Throws:
IOException

getCacheFileModel

Map<String,String> getCacheFileModel(String fullUrl,
                                     Map<String,String> parameterMap)
                                     throws Exception
Parameters:
fullUrl -
sandBox -
parameterMap -
Returns:
Throws:
Exception

createStaticAssetStorageFromFile

void createStaticAssetStorageFromFile(org.springframework.web.multipart.MultipartFile file,
                                      StaticAsset staticAsset)
                                      throws IOException
Persists the file to the DB or FileSystem according to the staticAsset's StorageType. Typically, the MultipartFile is passed in from a Controller like the AdminAssetUploadController

Parameters:
file -
id -
Throws:
IOException


Copyright © 2013. All Rights Reserved.