Interface StaticAssetPathService
- All Known Implementing Classes:
StaticAssetPathServiceImpl
public interface StaticAssetPathService
-
Method Summary
Modifier and TypeMethodDescriptionconvertAllAssetPathsInContent
(String content, boolean secureRequest) This method will take in a content string (e.g.convertAssetPath
(String assetPath, String contextPath, boolean secureRequest) This method will take in an assetPath (think image url) and convert it if the value contains the asseturlprefix.Returns the secure value of the environment url prefix (e.g. prefixed with https if needed).Returns the value configured for the current environment for the static asset url prefix.Returns the value configured to mark an item as a static URL.void
Sets the environment url prefix.void
setStaticAssetUrlPrefix
(String prefix) Sets the static asset url prefix
-
Method Details
-
convertAllAssetPathsInContent
This method will take in a content string (e.g. StructuredContentDTO or PageDTO HTML/ASSET_LOOKUP/STRING field value) and replace any instances of "staticAssetUrlPrefix" in the string with the "staticAssetEnvironmentUrlPrefix" or the "staticAssetEnvironmentSecureUrlPrefix" depending on if the request was secure and if it was configured.- Parameters:
content
- - The content string to rewrite if it contains a cms managed assetsecureRequest
- - True if the request is being served over https
-
convertAssetPath
This method will take in an assetPath (think image url) and convert it if the value contains the asseturlprefix.- Parameters:
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 https- See Also:
-
StaticAssetService#getStaticAssetUrlPrefix()
StaticAssetService#getStaticAssetEnvironmentUrlPrefix()
-
getStaticAssetUrlPrefix
String getStaticAssetUrlPrefix()Returns the value configured to mark an item as a static URL.OOB BLC maintains this value in common.properties.
-
setStaticAssetUrlPrefix
Sets the static asset url prefix- Parameters:
prefix
-
-
getStaticAssetEnvironmentUrlPrefix
String getStaticAssetEnvironmentUrlPrefix()Returns the value configured for the current environment for the static asset url prefix. If this is different than the common value, then the URLs will get rewritten by the FieldMapWrapper when called from the DisplayContentTag or ProcessURLFilter. -
setStaticAssetEnvironmentUrlPrefix
Sets the environment url prefix.- Parameters:
prefix
-
-
getStaticAssetEnvironmentSecureUrlPrefix
String getStaticAssetEnvironmentSecureUrlPrefix()Returns the secure value of the environment url prefix (e.g. prefixed with https if needed).
-