@Service(value="blStaticAssetPathService") public class StaticAssetPathServiceImpl extends Object implements StaticAssetPathService
Modifier and Type | Field and Description |
---|---|
protected String |
staticAssetEnvironmentSecureUrlPrefix |
protected String |
staticAssetEnvironmentUrlPrefix |
protected String |
staticAssetUrlPrefix |
Constructor and Description |
---|
StaticAssetPathServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected String |
addThemeContextIfNeeded(String assetURL) |
String |
convertAllAssetPathsInContent(String content,
boolean secureRequest)
This method will take in a content string (e.g.
|
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.
|
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 |
setStaticAssetEnvironmentSecureUrlPrefix(String staticAssetEnvironmentSecureUrlPrefix) |
void |
setStaticAssetEnvironmentUrlPrefix(String staticAssetEnvironmentUrlPrefix)
Sets the environment url prefix.
|
void |
setStaticAssetUrlPrefix(String staticAssetUrlPrefix)
Sets the static asset url prefix
|
@Value(value="${asset.server.url.prefix.internal}") protected String staticAssetUrlPrefix
@Value(value="${asset.server.url.prefix}") protected String staticAssetEnvironmentUrlPrefix
@Value(value="${asset.server.url.prefix.secure}") protected String staticAssetEnvironmentSecureUrlPrefix
public String convertAllAssetPathsInContent(String content, boolean secureRequest)
convertAllAssetPathsInContent
in interface StaticAssetPathService
content
- - The content string to rewrite if it contains a cms managed assetsecureRequest
- - True if the request is being served over httpsorg.broadleafcommerce.common.file.service.StaticAssetService#getStaticAssetUrlPrefix()
,
org.broadleafcommerce.common.file.service.StaticAssetService#getStaticAssetEnvironmentUrlPrefix()
public String convertAssetPath(String assetPath, String contextPath, boolean secureRequest)
convertAssetPath
in interface StaticAssetPathService
assetPath
- - 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 httpsorg.broadleafcommerce.common.file.service.StaticAssetService#getStaticAssetUrlPrefix()
,
org.broadleafcommerce.common.file.service.StaticAssetService#getStaticAssetEnvironmentUrlPrefix()
public String getStaticAssetUrlPrefix()
StaticAssetPathService
getStaticAssetUrlPrefix
in interface StaticAssetPathService
public void setStaticAssetUrlPrefix(String staticAssetUrlPrefix)
StaticAssetPathService
setStaticAssetUrlPrefix
in interface StaticAssetPathService
public String getStaticAssetEnvironmentUrlPrefix()
StaticAssetPathService
getStaticAssetEnvironmentUrlPrefix
in interface StaticAssetPathService
public void setStaticAssetEnvironmentUrlPrefix(String staticAssetEnvironmentUrlPrefix)
StaticAssetPathService
setStaticAssetEnvironmentUrlPrefix
in interface StaticAssetPathService
public String getStaticAssetEnvironmentSecureUrlPrefix()
StaticAssetPathService
getStaticAssetEnvironmentSecureUrlPrefix
in interface StaticAssetPathService
public void setStaticAssetEnvironmentSecureUrlPrefix(String staticAssetEnvironmentSecureUrlPrefix)
Copyright © 2022. All rights reserved.