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 java.lang.Object
- implements StaticAssetStorageService
- Author:
- Jeff Fischer
|
Method Summary |
protected void |
clearObsoleteCacheFiles(StaticAsset staticAsset,
java.io.File cacheFile)
|
protected java.lang.String |
constructCacheFileName(StaticAsset staticAsset,
java.util.Map<java.lang.String,java.lang.String> parameterMap)
|
StaticAssetStorage |
create()
|
java.sql.Blob |
createBlob(org.springframework.web.multipart.MultipartFile uploadedFile)
|
protected void |
createCacheFile(java.io.InputStream is,
java.io.File cacheFile)
|
void |
delete(StaticAssetStorage assetStorage)
|
StaticAssetStorage |
findStaticAssetStorageById(java.lang.Long id)
|
java.lang.String |
getCacheDirectory()
|
java.util.Map<java.lang.String,java.lang.String> |
getCacheFileModel(java.lang.String fullUrl,
SandBox sandBox,
java.util.Map<java.lang.String,java.lang.String> parameterMap)
|
boolean |
isCleanupThreadEnabled()
|
protected java.lang.String |
pad(java.lang.String s,
int length,
char pad)
|
StaticAssetStorage |
readStaticAssetStorageByStaticAssetId(java.lang.Long id)
|
StaticAssetStorage |
save(StaticAssetStorage assetStorage)
|
void |
setCacheDirectory(java.lang.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 java.lang.String cacheDirectory
cleanupThreadEnabled
protected boolean cleanupThreadEnabled
staticAssetService
protected StaticAssetService staticAssetService
artifactService
protected ArtifactService artifactService
staticAssetStorageDao
protected StaticAssetStorageDao staticAssetStorageDao
cleanupThread
protected java.lang.Thread cleanupThread
StaticAssetStorageServiceImpl
public StaticAssetStorageServiceImpl()
getCacheFileModel
public java.util.Map<java.lang.String,java.lang.String> getCacheFileModel(java.lang.String fullUrl,
SandBox sandBox,
java.util.Map<java.lang.String,java.lang.String> parameterMap)
throws java.lang.Exception
- Specified by:
getCacheFileModel in interface StaticAssetStorageService
- Throws:
java.lang.Exception
findStaticAssetStorageById
public StaticAssetStorage findStaticAssetStorageById(java.lang.Long id)
- Specified by:
findStaticAssetStorageById in interface StaticAssetStorageService
create
public StaticAssetStorage create()
- Specified by:
create in interface StaticAssetStorageService
readStaticAssetStorageByStaticAssetId
public StaticAssetStorage readStaticAssetStorageByStaticAssetId(java.lang.Long id)
- Specified by:
readStaticAssetStorageByStaticAssetId in interface StaticAssetStorageService
save
public StaticAssetStorage save(StaticAssetStorage assetStorage)
- Specified by:
save in interface StaticAssetStorageService
delete
public void delete(StaticAssetStorage assetStorage)
- Specified by:
delete in interface StaticAssetStorageService
createBlob
public java.sql.Blob createBlob(org.springframework.web.multipart.MultipartFile uploadedFile)
throws java.io.IOException
- Specified by:
createBlob in interface StaticAssetStorageService
- Throws:
java.io.IOException
clearObsoleteCacheFiles
protected void clearObsoleteCacheFiles(StaticAsset staticAsset,
java.io.File cacheFile)
createCacheFile
protected void createCacheFile(java.io.InputStream is,
java.io.File cacheFile)
throws java.sql.SQLException,
java.io.IOException
- Throws:
java.sql.SQLException
java.io.IOException
constructCacheFileName
protected java.lang.String constructCacheFileName(StaticAsset staticAsset,
java.util.Map<java.lang.String,java.lang.String> parameterMap)
pad
protected java.lang.String pad(java.lang.String s,
int length,
char pad)
getCacheDirectory
public java.lang.String getCacheDirectory()
setCacheDirectory
public void setCacheDirectory(java.lang.String cacheDirectory)
isCleanupThreadEnabled
public boolean isCleanupThreadEnabled()
setCleanupThreadEnabled
public void setCleanupThreadEnabled(boolean cleanupThreadEnabled)
Copyright © 2011. All Rights Reserved.