org.broadleafcommerce.cms.file.service
Class StaticAssetStorageServiceImpl
java.lang.Object
org.broadleafcommerce.cms.file.service.StaticAssetStorageServiceImpl
- All Implemented Interfaces:
- StaticAssetStorageService
@Service(value="blStaticAssetStorageService")
public class StaticAssetStorageServiceImpl
- extends Object
- implements StaticAssetStorageService
- Author:
- Jeff Fischer
|
Method Summary |
protected void |
clearObsoleteCacheFiles(StaticAsset staticAsset,
File cacheFile)
|
protected String |
constructCacheFileName(StaticAsset staticAsset,
Map<String,String> parameterMap)
|
StaticAssetStorage |
create()
|
Blob |
createBlob(org.springframework.web.multipart.MultipartFile uploadedFile)
|
protected void |
createCacheFile(InputStream is,
File cacheFile)
|
void |
delete(StaticAssetStorage assetStorage)
|
void |
destroy()
|
protected StaticAsset |
findStaticAsset(String fullUrl,
SandBox sandBox)
|
StaticAssetStorage |
findStaticAssetStorageById(Long id)
|
String |
getCacheDirectory()
|
Map<String,String> |
getCacheFileModel(String fullUrl,
SandBox sandBox,
Map<String,String> parameterMap)
|
boolean |
isCleanupThreadEnabled()
|
protected String |
pad(String s,
int length,
char pad)
|
StaticAssetStorage |
readStaticAssetStorageByStaticAssetId(Long id)
|
StaticAssetStorage |
save(StaticAssetStorage assetStorage)
|
void |
setCacheDirectory(String cacheDirectory)
|
void |
setCleanupThreadEnabled(boolean cleanupThreadEnabled)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cacheDirectory
protected String cacheDirectory
cleanupThreadEnabled
protected boolean cleanupThreadEnabled
staticAssetService
protected StaticAssetService staticAssetService
artifactService
protected ArtifactService artifactService
staticAssetStorageDao
protected StaticAssetStorageDao staticAssetStorageDao
namedOperationManager
protected NamedOperationManager namedOperationManager
cleanupThread
protected Thread cleanupThread
StaticAssetStorageServiceImpl
public StaticAssetStorageServiceImpl()
destroy
@PreDestroy
public void destroy()
findStaticAsset
protected StaticAsset findStaticAsset(String fullUrl,
SandBox sandBox)
getCacheFileModel
@Transactional(value="blTransactionManagerAssetStorageInfo")
public Map<String,String> getCacheFileModel(String fullUrl,
SandBox sandBox,
Map<String,String> parameterMap)
throws Exception
- Specified by:
getCacheFileModel in interface StaticAssetStorageService
- Throws:
Exception
findStaticAssetStorageById
@Transactional(value="blTransactionManagerAssetStorageInfo")
public StaticAssetStorage findStaticAssetStorageById(Long id)
- Specified by:
findStaticAssetStorageById in interface StaticAssetStorageService
create
@Transactional(value="blTransactionManagerAssetStorageInfo")
public StaticAssetStorage create()
- Specified by:
create in interface StaticAssetStorageService
readStaticAssetStorageByStaticAssetId
@Transactional(value="blTransactionManagerAssetStorageInfo")
public StaticAssetStorage readStaticAssetStorageByStaticAssetId(Long id)
- Specified by:
readStaticAssetStorageByStaticAssetId in interface StaticAssetStorageService
save
@Transactional(value="blTransactionManagerAssetStorageInfo")
public StaticAssetStorage save(StaticAssetStorage assetStorage)
- Specified by:
save in interface StaticAssetStorageService
delete
@Transactional(value="blTransactionManagerAssetStorageInfo")
public void delete(StaticAssetStorage assetStorage)
- Specified by:
delete in interface StaticAssetStorageService
createBlob
@Transactional(value="blTransactionManagerAssetStorageInfo")
public Blob createBlob(org.springframework.web.multipart.MultipartFile uploadedFile)
throws IOException
- Specified by:
createBlob in interface StaticAssetStorageService
- Throws:
IOException
clearObsoleteCacheFiles
protected void clearObsoleteCacheFiles(StaticAsset staticAsset,
File cacheFile)
createCacheFile
protected void createCacheFile(InputStream is,
File cacheFile)
throws SQLException,
IOException
- Throws:
SQLException
IOException
constructCacheFileName
protected String constructCacheFileName(StaticAsset staticAsset,
Map<String,String> parameterMap)
pad
protected String pad(String s,
int length,
char pad)
getCacheDirectory
public String getCacheDirectory()
setCacheDirectory
public void setCacheDirectory(String cacheDirectory)
isCleanupThreadEnabled
public boolean isCleanupThreadEnabled()
setCleanupThreadEnabled
public void setCleanupThreadEnabled(boolean cleanupThreadEnabled)
Copyright © 2013. All Rights Reserved.