org.broadleafcommerce.common.file.service
Interface StaticAssetPathService

All Known Implementing Classes:
StaticAssetPathServiceImpl

public interface StaticAssetPathService


Method Summary
 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 convert it if the value contains the asseturlprefix.
 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 setStaticAssetEnvironmentUrlPrefix(String prefix)
          Sets the environment url prefix.
 void setStaticAssetUrlPrefix(String prefix)
          Sets the static asset url prefix
 

Method Detail

convertAllAssetPathsInContent

String convertAllAssetPathsInContent(String content,
                                     boolean secureRequest)
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 asset
secureRequest - - True if the request is being served over https

convertAssetPath

String 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.

Parameters:
assetPath - - The path to rewrite if it is a cms managed asset
contextPath - - 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

void setStaticAssetUrlPrefix(String prefix)
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

void setStaticAssetEnvironmentUrlPrefix(String prefix)
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).



Copyright © 2013. All Rights Reserved.