public class StaticAssetsRequestHandler
extends org.springframework.web.servlet.support.WebContentGenerator
implements org.springframework.web.HttpRequestHandler
org.springframework.web.servlet.resource.ResourceHttpRequestHandler, but
instead of using Spring Resources, it uses the ContentStoreService.getContent(Context, String).| Constructor and Description |
|---|
StaticAssetsRequestHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected org.craftercms.core.service.Content |
getContent(SiteContext context,
String path) |
protected org.springframework.http.MediaType |
getMediaType(String path) |
protected String |
getPath(javax.servlet.http.HttpServletRequest request,
SiteContext context) |
void |
handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
setContentStoreService(org.craftercms.core.service.ContentStoreService contentStoreService) |
protected void |
setHeaders(javax.servlet.http.HttpServletResponse response,
org.craftercms.core.service.Content content,
org.springframework.http.MediaType mediaType) |
void |
setStaticAssetsPath(String staticAssetsPath) |
protected void |
writeContent(javax.servlet.http.HttpServletResponse response,
org.craftercms.core.service.Content content) |
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeadergetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextpublic void setContentStoreService(org.craftercms.core.service.ContentStoreService contentStoreService)
public void setStaticAssetsPath(String staticAssetsPath)
public void handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
handleRequest in interface org.springframework.web.HttpRequestHandlerjavax.servlet.ServletExceptionIOExceptionprotected String getPath(javax.servlet.http.HttpServletRequest request, SiteContext context)
protected org.craftercms.core.service.Content getContent(SiteContext context, String path)
protected org.springframework.http.MediaType getMediaType(String path)
protected void setHeaders(javax.servlet.http.HttpServletResponse response,
org.craftercms.core.service.Content content,
org.springframework.http.MediaType mediaType)
throws IOException
IOExceptionprotected void writeContent(javax.servlet.http.HttpServletResponse response,
org.craftercms.core.service.Content content)
throws IOException
IOExceptionCopyright © 2014 CrafterCMS. All Rights Reserved.