Class UrlRewriteProcessor
java.lang.Object
org.broadleafcommerce.presentation.dialect.AbstractBroadleafAttributeModifierProcessor
org.broadleafcommerce.cms.web.processor.UrlRewriteProcessor
- All Implemented Interfaces:
org.broadleafcommerce.presentation.dialect.BroadleafAttributeModifierProcessor,org.broadleafcommerce.presentation.dialect.BroadleafProcessor
- Direct Known Subclasses:
HrefUrlRewriteProcessor
@Component("blUrlRewriteProcessor")
@ConditionalOnTemplating
public class UrlRewriteProcessor
extends org.broadleafcommerce.presentation.dialect.AbstractBroadleafAttributeModifierProcessor
A Thymeleaf processor that processes the given url through the StaticAssetService's
StaticAssetService.convertAssetPath(String, String, boolean) method to determine
the appropriate URL for the asset to be served from.- Author:
- apazzolini
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.broadleafcommerce.common.file.service.StaticAssetPathServiceFields inherited from interface org.broadleafcommerce.presentation.dialect.BroadleafProcessor
DEFAULT_PRECEDENCE, DEFAULT_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetDefaultFileTypeImagePath(String extension) protected StringgetFileExtension(String assetPath) protected StringgetFullAssetPath(String tagName, String attributeValue, org.broadleafcommerce.presentation.model.BroadleafTemplateContext context) org.broadleafcommerce.presentation.model.BroadleafAttributeModifiergetModifiedAttributes(String tagName, Map<String, String> tagAttributes, String attributeName, String attributeValue, org.broadleafcommerce.presentation.model.BroadleafTemplateContext context) getName()intprotected StringgetQueryString(String assetPath) protected booleanprotected BooleanisImageExtension(String extension) protected booleanisImageTag(String tagName) protected booleanisRequestSecure(jakarta.servlet.http.HttpServletRequest request) protected StringparsePath(String attributeValue, org.broadleafcommerce.presentation.model.BroadleafTemplateContext context) Methods inherited from class org.broadleafcommerce.presentation.dialect.AbstractBroadleafAttributeModifierProcessor
getPrefix, useSingleQuotes
-
Field Details
-
staticAssetPathService
protected org.broadleafcommerce.common.file.service.StaticAssetPathService staticAssetPathService
-
-
Constructor Details
-
UrlRewriteProcessor
public UrlRewriteProcessor()
-
-
Method Details
-
getName
-
getPrecedence
public int getPrecedence()- Specified by:
getPrecedencein interfaceorg.broadleafcommerce.presentation.dialect.BroadleafProcessor- Overrides:
getPrecedencein classorg.broadleafcommerce.presentation.dialect.AbstractBroadleafAttributeModifierProcessor
-
getModifiedAttributes
-
getFullAssetPath
-
isRequestSecure
protected boolean isRequestSecure(jakarta.servlet.http.HttpServletRequest request) - Returns:
- true if the current request.scheme = HTTPS or if the request.isSecure value is true.
-
isImageTag
-
isAdminRequest
protected boolean isAdminRequest() -
isImageExtension
-
parsePath
-
getFileExtension
-
getDefaultFileTypeImagePath
-
getQueryString
-