public class Render
extends javax.servlet.http.HttpServlet
implements org.springframework.web.servlet.mvc.Controller, org.springframework.web.context.ServletConfigAware
| Constructor and Description |
|---|
Render() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
static void |
checkActionRequirements(Action action,
RenderContext renderContext,
URLResolver urlResolver)
Performs all required checks for this action.
|
protected RenderContext |
createRenderContext(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
JahiaUser user) |
protected void |
doDelete(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
RenderContext renderContext,
URLResolver urlResolver) |
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
RenderContext renderContext,
Resource resource,
long startTime) |
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
RenderContext renderContext,
URLResolver urlResolver) |
protected void |
doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
RenderContext renderContext,
URLResolver urlResolver) |
String |
getDefaultContentType(String templateType) |
protected long |
getLastModified(Resource resource,
RenderContext renderContext)
Returns the time the
HttpServletRequest object was last modified, in milliseconds since midnight January 1, 1970 GMT. |
static String |
getRenderServletPath() |
static Set<String> |
getReservedParameters() |
javax.servlet.ServletConfig |
getServletConfig() |
String |
getServletName() |
SettingsBean |
getSettingsBean() |
org.springframework.web.servlet.ModelAndView |
handleRequest(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected boolean |
hasAccess(JCRNodeWrapper node) |
protected boolean |
isDisabled() |
protected boolean |
isInReadOnlyMode() |
protected boolean |
isMethodAllowed(String method) |
boolean |
isMultipartRequest(javax.servlet.http.HttpServletRequest req) |
boolean |
isPortletRequest(javax.servlet.http.HttpServletRequest req)
If the request is a portlet request, it returns true, otherwise returns false.
|
static boolean |
isWebflowRequest(javax.servlet.http.HttpServletRequest req) |
protected void |
maybeSetLastModified(javax.servlet.http.HttpServletResponse resp,
long lastModified)
Sets the Last-Modified entity header field, if it has not already been set and if the value is meaningful.
|
static void |
performRedirect(String url,
String path,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
Map<String,List<String>> parameters,
boolean bypassCache)
This method allows you to define where you want to redirect the user after request.
|
static org.json.JSONObject |
serializeNodeToJSON(JCRNodeWrapper node) |
void |
setAllowedMethods(Set<String> allowedMethods)
Specifies the set of allowed HTTP methods.
|
void |
setCookieExpirationInDays(Integer cookieExpirationInDays) |
void |
setDefaultContentType(Map<String,String> defaultContentType) |
void |
setDefaultPostAction(Action defaultPostActionResult) |
void |
setDefaultPutAction(Action defaultPutActionResult) |
void |
setJcrSessionFactory(JCRSessionFactory jcrSessionFactory) |
void |
setLoggingService(MetricsLoggingService loggingService) |
void |
setRenderService(RenderService renderService) |
void |
setServletConfig(javax.servlet.ServletConfig servletConfig) |
void |
setSessionExpiryTime(int sessionExpiryTime) |
void |
setSettingsBean(SettingsBean settingsBean) |
void |
setTemplateService(JahiaTemplateManagerService templateService) |
void |
setUrlResolverFactory(URLResolverFactory urlResolverFactory) |
void |
setWebflowAction(Action webflowAction) |
void |
setWorkspace(String workspace) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, servicepublic static final String METHOD_DELETE
public static final String METHOD_HEAD
public static final String METHOD_GET
public static final String METHOD_OPTIONS
public static final String METHOD_POST
public static final String METHOD_PUT
public static final String METHOD_TRACE
protected static final String HEADER_IFMODSINCE
protected static final String HEADER_LASTMOD
public static final String NODE_TYPE
public static final String NODE_NAME
public static final String NODE_NAME_PROPERTY
public static final String NEW_NODE_OUTPUT_FORMAT
public static final String REDIRECT_TO
public static final String REDIRECT_HTTP_RESPONSE_CODE
public static final String METHOD_TO_CALL
public static final String AUTO_CHECKIN
public static final String CAPTCHA
public static final String TARGETDIRECTORY
public static final String TARGETNAME
public static final String NORMALIZE_NODE_NAME
public static final String VERSION
public static final String SUBMIT
public static final String AUTO_ASSIGN_ROLE
public static final String ALIAS_USER
public static final String PARENT_TYPE
public static final String RETURN_CONTENTTYPE
public static final String RETURN_CONTENTTYPE_OVERRIDE
public static final String RESOURCE_ID
public static final String REMOVE_MIXIN
public static final String COOKIE_VALUE
public static final String COOKIE_NAME
public static final String COOKIE_PATH
public static final String CONTRIBUTE_POST
public static final String MARK_FOR_DELETION
public static final String MARK_FOR_DELETION_MESSAGE
public static final String PREVIEW_DATE
public static final String DISABLE_XSS_FILTERING
public static final Pattern TAG_MISSING_END_BIGGERTHAN_PATTERN
public static final Pattern TAG_MISSING_START_LESSERTHAN_PATTERN
public static final String ALLOWS_MULTIPLE_SUBMITS
public static final String PLUTO_PREFIX
public static final String PLUTO_ACTION
public static final String PLUTO_RESOURCE
protected long getLastModified(Resource resource, RenderContext renderContext) throws javax.jcr.RepositoryException, IOException
HttpServletRequest object was last modified, in milliseconds since midnight January 1, 1970 GMT. If
the time is unknown, this method returns a negative number (the default).
Servlets that support HTTP GET requests and can quickly determine their last modification time should override this method. This
makes browser and proxy caches work more effectively, reducing the load on server and network resources.long integer specifying the time the HttpServletRequest object was last modified, in milliseconds
since midnight, January 1, 1970 GMT, or -1 if the time is not knownjavax.jcr.RepositoryExceptionIOExceptionprotected void maybeSetLastModified(javax.servlet.http.HttpServletResponse resp,
long lastModified)
protected RenderContext createRenderContext(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, JahiaUser user)
protected void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
RenderContext renderContext,
Resource resource,
long startTime)
throws javax.jcr.RepositoryException,
RenderException,
IOException
javax.jcr.RepositoryExceptionRenderExceptionIOExceptionprotected void doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
RenderContext renderContext,
URLResolver urlResolver)
throws Exception
Exceptionpublic void addCookie(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
public static org.json.JSONObject serializeNodeToJSON(JCRNodeWrapper node) throws javax.jcr.RepositoryException, IOException, org.json.JSONException
javax.jcr.RepositoryExceptionIOExceptionorg.json.JSONExceptionprotected void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
RenderContext renderContext,
URLResolver urlResolver)
throws Exception
Exceptionprotected void doDelete(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
RenderContext renderContext,
URLResolver urlResolver)
throws Exception
Exceptionpublic boolean isMultipartRequest(javax.servlet.http.HttpServletRequest req)
public boolean isPortletRequest(javax.servlet.http.HttpServletRequest req)
req - An HttpServletRequest.public static void performRedirect(String url, String path, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Map<String,List<String>> parameters, boolean bypassCache) throws IOException
url - path - req - resp - parameters - bypassCache - If true we will append a parameter to the URL that should match the id of the resource to refreshIOExceptionpublic org.springframework.web.servlet.ModelAndView handleRequest(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws Exception
handleRequest in interface org.springframework.web.servlet.mvc.ControllerExceptionpublic static boolean isWebflowRequest(javax.servlet.http.HttpServletRequest req)
protected boolean isDisabled()
protected boolean isInReadOnlyMode()
public static void checkActionRequirements(Action action, RenderContext renderContext, URLResolver urlResolver) throws javax.jcr.RepositoryException
action - the action to check requirements forrenderContext - current render context instanceurlResolver - the URL resolver instancejavax.jcr.RepositoryException - in case of requirements violationprotected boolean isMethodAllowed(String method)
protected boolean hasAccess(JCRNodeWrapper node)
public void setServletConfig(javax.servlet.ServletConfig servletConfig)
setServletConfig in interface org.springframework.web.context.ServletConfigAwarepublic javax.servlet.ServletConfig getServletConfig()
getServletConfig in interface javax.servlet.ServletgetServletConfig in class javax.servlet.GenericServletpublic String getServletName()
getServletName in interface javax.servlet.ServletConfiggetServletName in class javax.servlet.GenericServletpublic static String getRenderServletPath()
public void setWorkspace(String workspace)
public void setLoggingService(MetricsLoggingService loggingService)
public void setTemplateService(JahiaTemplateManagerService templateService)
public void setSessionExpiryTime(int sessionExpiryTime)
public void setDefaultPostAction(Action defaultPostActionResult)
public void setDefaultPutAction(Action defaultPutActionResult)
public void setWebflowAction(Action webflowAction)
public void setSettingsBean(SettingsBean settingsBean)
settingsBean - the settingsBean to setpublic void setRenderService(RenderService renderService)
renderService - the renderService to setpublic void setJcrSessionFactory(JCRSessionFactory jcrSessionFactory)
jcrSessionFactory - the jcrSessionFactory to setpublic void setCookieExpirationInDays(Integer cookieExpirationInDays)
public void setUrlResolverFactory(URLResolverFactory urlResolverFactory)
public void setAllowedMethods(Set<String> allowedMethods)
allowedMethods - the set of allowed HTTP methodspublic SettingsBean getSettingsBean()
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.