Class StaticAssetViewController
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.springframework.web.servlet.mvc.AbstractController
org.broadleafcommerce.cms.web.file.StaticAssetViewController
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.web.context.ServletContextAware,org.springframework.web.servlet.mvc.Controller
public class StaticAssetViewController
extends org.springframework.web.servlet.mvc.AbstractController
Created by jfischer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected Stringprotected org.springframework.core.env.Environmentprotected NamedOperationManagerprotected org.broadleafcommerce.common.web.BroadleafSiteResolverprotected StaticAssetStorageServiceprotected StringFields inherited from class org.springframework.web.servlet.support.WebContentGenerator
HEADER_CACHE_CONTROL, METHOD_GET, METHOD_HEAD, METHOD_POSTFields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertParameterMap(Map<String, String[]> parameterMap) Converts the given request parameter map into a single key-value map.booleanprotected org.springframework.web.servlet.ModelAndViewhandleRequestInternal(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Process the static asset request by determining the asset name.protected voidinit()protected booleanisAllowedUrlParameter(String parameter) protected StringremoveAssetPrefix(String requestURI) voidsetAssetServerUrlPrefix(String assetServerUrlPrefix) voidsetViewResolverName(String viewResolverName) Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
handleRequest, isSynchronizeOnSession, setSynchronizeOnSessionMethods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheControl, applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkRequest, getAllowHeader, getCacheControl, getCacheSeconds, getSupportedMethods, getVaryByRequestHeaders, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, prepareResponse, preventCaching, setAlwaysMustRevalidate, setCacheControl, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader, setVaryByRequestHeadersMethods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextMethods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContext
-
Field Details
-
assetServerUrlPrefix
-
viewResolverName
-
staticAssetStorageService
-
siteResolver
protected org.broadleafcommerce.common.web.BroadleafSiteResolver siteResolver -
namedOperationManager
-
env
@Autowired protected org.springframework.core.env.Environment env -
appCtx
@Autowired protected org.springframework.context.ApplicationContext appCtx
-
-
Constructor Details
-
StaticAssetViewController
public StaticAssetViewController()
-
-
Method Details
-
init
@PostConstruct protected void init() -
convertParameterMap
Converts the given request parameter map into a single key-value map. This will also strip parameters that do not conform to existing application-configured named operations according to#allowUnnamedImageManipulationthat appear inNamedOperationManager.getNamedOperationComponents()- Parameters:
parameterMap-- Returns:
-
isAllowedUrlParameter
-
handleRequestInternal
protected org.springframework.web.servlet.ModelAndView handleRequestInternal(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws Exception Process the static asset request by determining the asset name. Checks the current sandbox for a matching asset. If not found, checks the production sandbox.The view portion will be handled by a component with the name "blStaticAssetView" This is intended to be the specific class StaticAssetView.
- Specified by:
handleRequestInternalin classorg.springframework.web.servlet.mvc.AbstractController- Throws:
Exception- See Also:
-
StaticAssetViewAbstractController.handleRequest(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)
-
removeAssetPrefix
-
getAllowUnnamedImageManipulation
public boolean getAllowUnnamedImageManipulation() -
getAssetServerUrlPrefix
-
setAssetServerUrlPrefix
-
getViewResolverName
-
setViewResolverName
-