|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.cms.common.AbstractContentService
org.broadleafcommerce.cms.file.service.StaticAssetServiceImpl
@Service(value="blStaticAssetService") public class StaticAssetServiceImpl
Created by bpolster.
| Field Summary | |
|---|---|
protected boolean |
automaticallyApproveAndPromoteStaticAssets
|
protected SandBoxItemDao |
sandBoxItemDao
|
protected StaticAssetDao |
staticAssetDao
|
protected String |
staticAssetEnvironmentSecureUrlPrefix
|
protected String |
staticAssetEnvironmentUrlPrefix
|
protected StaticAssetStorageService |
staticAssetStorageService
|
protected String |
staticAssetUrlPrefix
|
| Constructor Summary | |
|---|---|
StaticAssetServiceImpl()
|
|
| Method Summary | |
|---|---|
StaticAsset |
addStaticAsset(StaticAsset staticAsset,
SandBox destinationSandbox)
This method is intended to be called from within the CMS admin only. |
String |
convertAssetPath(String assetPath,
String contextPath,
boolean secureRequest)
This method will take in an assetPath (think image url) and prepend the staticAssetUrlPrefix if one exists. |
Long |
countAssets(SandBox sandbox,
org.hibernate.Criteria c)
|
void |
deleteStaticAsset(StaticAsset staticAsset,
SandBox destinationSandbox)
If deleting and item where page.originalPageId != null then the item is deleted from the database. |
List<StaticAsset> |
findAssets(SandBox sandbox,
org.hibernate.Criteria c)
|
StaticAsset |
findStaticAssetByFullUrl(String fullUrl,
SandBox targetSandBox)
|
StaticAsset |
findStaticAssetById(Long id)
|
boolean |
getAutomaticallyApproveAndPromoteStaticAssets()
If set to true, then this service will not use the SandBox concept and will instead automatically promote images to production as they are entered into the system. |
String |
getStaticAssetEnvironmentSecureUrlPrefix()
Returns the secure value of the environment url prefix (e.g. |
String |
getStaticAssetEnvironmentUrlPrefix()
Returns the value configured for the current environment for the static asset url prefix. |
String |
getStaticAssetUrlPrefix()
Returns the value configured to mark an item as a static URL. |
void |
itemPromoted(SandBoxItem sandBoxItem,
SandBox destinationSandBox)
|
void |
itemRejected(SandBoxItem sandBoxItem,
SandBox destinationSandBox)
|
void |
itemReverted(SandBoxItem sandBoxItem)
|
void |
setAutomaticallyApproveAndPromoteStaticAssets(boolean automaticallyApproveAndPromoteStaticAssets)
If set to true, then this service will not use the SandBox concept and will instead automatically promote images to production as they are entered into the system. |
void |
setStaticAssetEnvironmentSecureUrlPrefix(String staticAssetEnvironmentSecureUrlPrefix)
|
void |
setStaticAssetEnvironmentUrlPrefix(String staticAssetEnvironmentUrlPrefix)
Sets the environment url prefix. |
void |
setStaticAssetUrlPrefix(String staticAssetUrlPrefix)
|
StaticAsset |
updateStaticAsset(StaticAsset staticAsset,
SandBox destSandbox)
This method is intended to be called from within the CMS admin only. |
| Methods inherited from class org.broadleafcommerce.cms.common.AbstractContentService |
|---|
countItems, findItems |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String staticAssetUrlPrefix
protected String staticAssetEnvironmentUrlPrefix
protected String staticAssetEnvironmentSecureUrlPrefix
protected boolean automaticallyApproveAndPromoteStaticAssets
protected StaticAssetDao staticAssetDao
protected SandBoxItemDao sandBoxItemDao
protected StaticAssetStorageService staticAssetStorageService
| Constructor Detail |
|---|
public StaticAssetServiceImpl()
| Method Detail |
|---|
public StaticAsset findStaticAssetById(Long id)
findStaticAssetById in interface StaticAssetService
public StaticAsset findStaticAssetByFullUrl(String fullUrl,
SandBox targetSandBox)
findStaticAssetByFullUrl in interface StaticAssetService
public StaticAsset addStaticAsset(StaticAsset staticAsset,
SandBox destinationSandbox)
StaticAssetService
addStaticAsset in interface StaticAssetService
public StaticAsset updateStaticAsset(StaticAsset staticAsset,
SandBox destSandbox)
StaticAssetService
updateStaticAsset in interface StaticAssetService
public void deleteStaticAsset(StaticAsset staticAsset,
SandBox destinationSandbox)
StaticAssetService
deleteStaticAsset in interface StaticAssetService
public List<StaticAsset> findAssets(SandBox sandbox,
org.hibernate.Criteria c)
findAssets in interface StaticAssetService
public Long countAssets(SandBox sandbox,
org.hibernate.Criteria c)
countAssets in interface StaticAssetService
public void itemPromoted(SandBoxItem sandBoxItem,
SandBox destinationSandBox)
itemPromoted in interface SandBoxItemListener
public void itemRejected(SandBoxItem sandBoxItem,
SandBox destinationSandBox)
itemRejected in interface SandBoxItemListenerpublic void itemReverted(SandBoxItem sandBoxItem)
itemReverted in interface SandBoxItemListenerpublic String getStaticAssetUrlPrefix()
StaticAssetService
getStaticAssetUrlPrefix in interface StaticAssetServicepublic void setStaticAssetUrlPrefix(String staticAssetUrlPrefix)
setStaticAssetUrlPrefix in interface StaticAssetServicepublic String getStaticAssetEnvironmentUrlPrefix()
StaticAssetService
getStaticAssetEnvironmentUrlPrefix in interface StaticAssetServicepublic void setStaticAssetEnvironmentUrlPrefix(String staticAssetEnvironmentUrlPrefix)
StaticAssetService
setStaticAssetEnvironmentUrlPrefix in interface StaticAssetServicepublic String getStaticAssetEnvironmentSecureUrlPrefix()
StaticAssetService
getStaticAssetEnvironmentSecureUrlPrefix in interface StaticAssetServicepublic void setStaticAssetEnvironmentSecureUrlPrefix(String staticAssetEnvironmentSecureUrlPrefix)
public boolean getAutomaticallyApproveAndPromoteStaticAssets()
StaticAssetService
getAutomaticallyApproveAndPromoteStaticAssets in interface StaticAssetServicepublic void setAutomaticallyApproveAndPromoteStaticAssets(boolean automaticallyApproveAndPromoteStaticAssets)
StaticAssetService
setAutomaticallyApproveAndPromoteStaticAssets in interface StaticAssetService
public String convertAssetPath(String assetPath,
String contextPath,
boolean secureRequest)
convertAssetPath in interface StaticAssetServiceassetPath - - The path to rewrite if it is a cms managed assetcontextPath - - The context path of the web application (if applicable)secureRequest - - True if the request is being served over https
StaticAssetService.getStaticAssetUrlPrefix(),
StaticAssetService.getStaticAssetEnvironmentUrlPrefix()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||