public class RequestAccessor
extends javax.servlet.http.HttpServletRequestWrapper
| Modifier and Type | Field and Description |
|---|---|
static String |
PARAM_FORM_ACTION |
| Constructor and Description |
|---|
RequestAccessor(javax.servlet.http.HttpServletRequest request) |
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getTrailerFields, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgradegetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsyncpublic static final String PARAM_FORM_ACTION
public RequestAccessor(javax.servlet.http.HttpServletRequest request)
public javax.servlet.http.HttpServletRequest getRequest()
getRequest in class javax.servlet.ServletRequestWrapperpublic void bindModel(Object model, Function<String,Boolean> excludePaths) throws Exception
Exceptionpublic AppConfig getAppConfig()
public boolean isGetOrHead()
public boolean isLocal()
public PrefCookie getPrefCookie()
public String getReturnUrl()
public String getFormAction()
public boolean isSaveAction()
public boolean isSaveContAction()
public boolean isDeleteAction()
public void storeModel(Object model)
public void storePagerModel(PagerModel pagerModel)
public void storeSortBag(SortBag sortBag)
public boolean isPrincipalForCurrentModule()
public boolean hasPrincipal()
public UserPrincipal getUserPrincipal()
getUserPrincipal in interface javax.servlet.http.HttpServletRequestgetUserPrincipal in class javax.servlet.http.HttpServletRequestWrapperpublic UserPrincipal getRequiredPrincipal()
public int getUserId()
public long getUserIdLong()
public boolean isUserInRoles(String... roles)
public String toActionUrl(String language, String controller, String action, Map<String,Object> parameters) throws IllegalArgumentException
IllegalArgumentExceptionpublic String toAbsActionUrl(String language, String controller, String action, Map<String,Object> parameters) throws IllegalArgumentException
IllegalArgumentExceptionpublic RequestContext getRequestContext()
public ModelState getModelState()
public TempData getTempData()
public ViewBag getViewBag()
public Messages getMessages()
public Resources getResources()
public void assertTrue(boolean expr)
throws BadRequestException
BadRequestExceptionpublic <T> T assertNotNull(T value)
throws BadRequestException
BadRequestExceptionpublic void assertPositive(int value)
throws BadRequestException
BadRequestExceptionpublic void assertValidFields(String... fieldNames) throws BadRequestException
BadRequestExceptionpublic void assertValidModel()
throws BadRequestException
BadRequestExceptionpublic void assertInRoles(String[] roles) throws ForbiddenException
ForbiddenExceptionpublic void assertForbidden(boolean expr)
throws ForbiddenException
ForbiddenExceptionCopyright © 2019. All rights reserved.