|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.cms.file.service.StaticAssetServiceImpl
@Service(value="blStaticAssetService") public class StaticAssetServiceImpl
Created by bpolster.
| Field Summary | |
|---|---|
protected ImageArtifactProcessor |
imageArtifactProcessor
|
protected StaticAssetDao |
staticAssetDao
|
protected StaticAssetPathService |
staticAssetPathService
|
protected StaticAssetStorageService |
staticAssetStorageService
|
protected boolean |
storeAssetsOnFileSystem
|
| Constructor Summary | |
|---|---|
StaticAssetServiceImpl()
|
|
| Method Summary | |
|---|---|
protected String |
buildAssetURL(Map<String,String> assetProperties,
String originalFilename)
Will assemble the url from the passed in properties as /{entityType}/{fileName} /product/7001-ab12 If the properties above are not set, it will generate the fileName randomly. |
String |
convertAssetPath(String assetPath,
String contextPath,
boolean secureRequest)
|
StaticAsset |
createStaticAssetFromFile(org.springframework.web.multipart.MultipartFile file,
Map<String,String> properties)
Used when uploading a file to Broadleaf. |
StaticAsset |
findStaticAssetByFullUrl(String fullUrl)
|
StaticAsset |
findStaticAssetById(Long id)
|
protected String |
generateFileName(int size)
Generates a filename as a set of Hex digits. |
protected String |
getCountUrl(String fullUrl,
int count,
boolean legacyFormat)
Gets the count URL based on the original fullUrl. |
protected String |
getFileExtension(String fileName)
|
protected void |
getMimeType(org.springframework.web.multipart.MultipartFile file,
StaticAsset newAsset)
|
String |
getStaticAssetEnvironmentSecureUrlPrefix()
|
String |
getStaticAssetEnvironmentUrlPrefix()
|
String |
getStaticAssetUrlPrefix()
|
List<StaticAsset> |
readAllStaticAssets()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ImageArtifactProcessor imageArtifactProcessor
@Value(value="${asset.use.filesystem.storage}")
protected boolean storeAssetsOnFileSystem
protected StaticAssetDao staticAssetDao
protected StaticAssetStorageService staticAssetStorageService
protected StaticAssetPathService staticAssetPathService
| Constructor Detail |
|---|
public StaticAssetServiceImpl()
| Method Detail |
|---|
public StaticAsset findStaticAssetById(Long id)
findStaticAssetById in interface StaticAssetServicepublic List<StaticAsset> readAllStaticAssets()
readAllStaticAssets in interface StaticAssetServiceprotected String getFileExtension(String fileName)
protected String generateFileName(int size)
size -
protected String buildAssetURL(Map<String,String> assetProperties,
String originalFilename)
url - asset - assetProperties -
@Transactional(value="blTransactionManager")
public StaticAsset createStaticAssetFromFile(org.springframework.web.multipart.MultipartFile file,
Map<String,String> properties)
StaticAssetServiceStaticAssetServiceImpl has a
environment properties that determine this behavior asset.use.filesystem.storage
The properties Map allows for implementors to update other Asset properties at the
same time they are uploading a file. The default implementation uses this for an optional URL to
be specified.
createStaticAssetFromFile in interface StaticAssetServicefile - - the file being uploadedproperties - - additional meta-data properties
StaticAssetServiceImpl
protected String getCountUrl(String fullUrl,
int count,
boolean legacyFormat)
protected void getMimeType(org.springframework.web.multipart.MultipartFile file,
StaticAsset newAsset)
public StaticAsset findStaticAssetByFullUrl(String fullUrl)
findStaticAssetByFullUrl in interface StaticAssetServicepublic String getStaticAssetUrlPrefix()
getStaticAssetUrlPrefix in interface StaticAssetServiceStaticAssetPathService.getStaticAssetUrlPrefix()public String getStaticAssetEnvironmentUrlPrefix()
getStaticAssetEnvironmentUrlPrefix in interface StaticAssetServiceStaticAssetPathService.getStaticAssetEnvironmentUrlPrefix()public String getStaticAssetEnvironmentSecureUrlPrefix()
getStaticAssetEnvironmentSecureUrlPrefix in interface StaticAssetServiceStaticAssetPathService.getStaticAssetEnvironmentSecureUrlPrefix()
public String convertAssetPath(String assetPath,
String contextPath,
boolean secureRequest)
convertAssetPath in interface StaticAssetServiceStaticAssetPathService.convertAssetPath(String, String, boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||