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.ApplicationContext
protected String
protected org.springframework.core.env.Environment
protected NamedOperationManager
protected BroadleafSiteResolver
protected StaticAssetStorageService
protected String
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
HEADER_CACHE_CONTROL, METHOD_GET, METHOD_HEAD, METHOD_POST
Fields 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.boolean
protected org.springframework.web.servlet.ModelAndView
handleRequestInternal
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Process the static asset request by determining the asset name.protected void
init()
protected boolean
isAllowedUrlParameter
(String parameter) protected String
removeAssetPrefix
(String requestURI) void
setAssetServerUrlPrefix
(String assetServerUrlPrefix) void
setViewResolverName
(String viewResolverName) Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheControl, applyCacheSeconds, checkAndPrepare, checkRequest, getAllowHeader, getCacheControl, getCacheSeconds, getSupportedMethods, getVaryByRequestHeaders, isRequireSession, prepareResponse, setCacheControl, setCacheSeconds, setRequireSession, setSupportedMethods, setVaryByRequestHeaders
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContext
-
Field Details
-
assetServerUrlPrefix
-
viewResolverName
-
staticAssetStorageService
-
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#allowUnnamedImageManipulation
that 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:
handleRequestInternal
in classorg.springframework.web.servlet.mvc.AbstractController
- Throws:
Exception
- See Also:
-
StaticAssetView
AbstractController.handleRequest(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)
-
removeAssetPrefix
-
getAllowUnnamedImageManipulation
public boolean getAllowUnnamedImageManipulation() -
getAssetServerUrlPrefix
-
setAssetServerUrlPrefix
-
getViewResolverName
-
setViewResolverName
-