|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.struts2.portlet.servlet.PortletServletRequest
public class PortletServletRequest
Wrapper object exposing a PortletRequest as a HttpServletRequest instance.
Clients accessing this request object will in fact operate on the
PortletRequest object wrapped by this request object.
| Field Summary | |
|---|---|
private javax.portlet.PortletContext |
portletContext
|
private javax.portlet.PortletRequest |
portletRequest
|
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Fields inherited from interface org.apache.struts2.portlet.PortletActionConstants |
|---|
ACTION_PARAM, ACTION_RESET, DEFAULT_ACTION_FOR_MODE, DEFAULT_ACTION_NAME, DEFAULT_DISPATCHER_SERVLET_NAME, ERROR_ACTION, EVENT_ACTION, EVENT_PHASE, MODE_NAMESPACE_MAP, MODE_PARAM, PHASE, PORTLET_CONFIG, PORTLET_NAMESPACE, RENDER_DIRECT_LOCATION, RENDER_PHASE, REQUEST, RESPONSE, STACK_FROM_EVENT_PHASE |
| Constructor Summary | |
|---|---|
PortletServletRequest(javax.portlet.PortletRequest portletRequest,
javax.portlet.PortletContext portletContext)
|
|
| Method Summary | |
|---|---|
Object |
getAttribute(String name)
Gets an attribute value on the PortletRequest. |
Enumeration |
getAttributeNames()
|
String |
getAuthType()
|
String |
getCharacterEncoding()
Can only be invoked in the event phase. |
int |
getContentLength()
Can only be invoked in the event phase. |
String |
getContentType()
Can only be invoked in the event phase. |
String |
getContextPath()
|
Cookie[] |
getCookies()
Not allowed in a portlet. |
long |
getDateHeader(String name)
Not allowed in a portlet. |
String |
getHeader(String name)
Gets a property from the PortletRequest. |
Enumeration |
getHeaderNames()
Gets the property names from the PortletRequest. |
Enumeration |
getHeaders(String name)
Gets the values for the specified property from the PortletRequest. |
ServletInputStream |
getInputStream()
Can only be invoked in the event phase. |
int |
getIntHeader(String name)
Not allowed in a portlet. |
String |
getLocalAddr()
Not allowed in a portlet. |
Locale |
getLocale()
|
Enumeration |
getLocales()
|
String |
getLocalName()
Not allowed in a portlet. |
int |
getLocalPort()
Not allowed in a portlet. |
String |
getMethod()
|
String |
getParameter(String name)
|
Map |
getParameterMap()
|
Enumeration |
getParameterNames()
|
String[] |
getParameterValues(String name)
|
String |
getPathInfo()
|
String |
getPathTranslated()
|
javax.portlet.PortletRequest |
getPortletRequest()
Get the wrapped PortletRequest instance. |
String |
getProtocol()
Not allowed in a portlet. |
String |
getQueryString()
|
BufferedReader |
getReader()
Can only be invoked in the event phase. |
String |
getRealPath(String path)
|
String |
getRemoteAddr()
Not allowed in a portlet. |
String |
getRemoteHost()
Not allowed in a portlet. |
int |
getRemotePort()
Not allowed in a portlet. |
String |
getRemoteUser()
|
RequestDispatcher |
getRequestDispatcher(String path)
Get the PortletRequestDispatcher as a PortletServletRequestDispatcher instance. |
String |
getRequestedSessionId()
|
String |
getRequestURI()
Not allowed in a portlet. |
StringBuffer |
getRequestURL()
Not allowed in a portlet. |
String |
getScheme()
|
String |
getServerName()
|
int |
getServerPort()
Not allowed in a portlet. |
String |
getServletPath()
A PortletRequest has no servlet path. |
HttpSession |
getSession()
Get the PortletSession as a PortletHttpSession instance. |
HttpSession |
getSession(boolean create)
Get the PortletSession as a PortletHttpSession instance. |
Principal |
getUserPrincipal()
|
boolean |
isRequestedSessionIdFromCookie()
Not allowed in a portlet. |
boolean |
isRequestedSessionIdFromUrl()
Not allowed in a portlet. |
boolean |
isRequestedSessionIdFromURL()
Not allowed in a portlet. |
boolean |
isRequestedSessionIdValid()
|
boolean |
isSecure()
|
boolean |
isUserInRole(String role)
|
void |
removeAttribute(String name)
|
void |
setAttribute(String name,
Object o)
|
void |
setCharacterEncoding(String env)
Can only be invoked in the event phase. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private javax.portlet.PortletRequest portletRequest
private javax.portlet.PortletContext portletContext
| Constructor Detail |
|---|
public PortletServletRequest(javax.portlet.PortletRequest portletRequest,
javax.portlet.PortletContext portletContext)
| Method Detail |
|---|
public String getAuthType()
getAuthType in interface HttpServletRequestpublic String getContextPath()
getContextPath in interface HttpServletRequestpublic Cookie[] getCookies()
getCookies in interface HttpServletRequestIllegalStateException - Not allowed in a portlet.public long getDateHeader(String name)
getDateHeader in interface HttpServletRequestIllegalStateException - Not allowed in a portlet.public String getHeader(String name)
PortletRequest. Note that a PortletRequest is not
guaranteed to map properties to headers.
getHeader in interface HttpServletRequestPortletRequest.getProperty(String),
HttpServletRequest.getHeader(java.lang.String)public Enumeration getHeaderNames()
PortletRequest. Note that a PortletRequest is not
guaranteed to map properties to headers.
getHeaderNames in interface HttpServletRequestPortletRequest.getPropertyNames(),
HttpServletRequest.getHeaderNames()public Enumeration getHeaders(String name)
PortletRequest. Note that a
PortletRequest is not guaranteed to map properties to headers.
getHeaders in interface HttpServletRequestPortletRequest.getProperties(String),
HttpServletRequest.getHeaders(String)public int getIntHeader(String name)
getIntHeader in interface HttpServletRequestIllegalStateException - Not allowed in a portlet.public String getMethod()
getMethod in interface HttpServletRequestpublic String getPathInfo()
getPathInfo in interface HttpServletRequestpublic String getPathTranslated()
getPathTranslated in interface HttpServletRequestpublic String getQueryString()
getQueryString in interface HttpServletRequestpublic String getRemoteUser()
getRemoteUser in interface HttpServletRequestpublic String getRequestURI()
getRequestURI in interface HttpServletRequestIllegalStateException - Not allowed in a portlet.public StringBuffer getRequestURL()
getRequestURL in interface HttpServletRequestIllegalStateException - Not allowed in a portlet.public String getRequestedSessionId()
getRequestedSessionId in interface HttpServletRequestpublic String getServletPath()
PortletRequest has no servlet path. But for compatibility with Struts 2 components and
interceptors, the action parameter on the request is mapped to the servlet path.
getServletPath in interface HttpServletRequestHttpServletRequest.getServletPath()public HttpSession getSession()
PortletSession as a PortletHttpSession instance.
getSession in interface HttpServletRequestHttpServletRequest.getSession()public HttpSession getSession(boolean create)
PortletSession as a PortletHttpSession instance.
getSession in interface HttpServletRequestHttpServletRequest.getSession(boolean)public Principal getUserPrincipal()
getUserPrincipal in interface HttpServletRequestpublic boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie in interface HttpServletRequestIllegalStateException - Not allowed in a portlet.public boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL in interface HttpServletRequestIllegalStateException - Not allowed in a portlet.public boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl in interface HttpServletRequestIllegalStateException - Not allowed in a portlet.public boolean isRequestedSessionIdValid()
isRequestedSessionIdValid in interface HttpServletRequestpublic boolean isUserInRole(String role)
isUserInRole in interface HttpServletRequestpublic Object getAttribute(String name)
PortletRequest. If the attribute name is
javax.servlet.include.servlet_path, it returns the same as
getServletPath()
getAttribute in interface ServletRequestServletRequest.getAttribute(java.lang.String)public Enumeration getAttributeNames()
getAttributeNames in interface ServletRequestpublic String getCharacterEncoding()
getCharacterEncoding in interface ServletRequestIllegalStateException - If the portlet is not in the event phase.ServletRequest.getCharacterEncoding()public int getContentLength()
getContentLength in interface ServletRequestIllegalStateException - If the portlet is not in the event phase.ServletRequest.getContentLength()public String getContentType()
getContentType in interface ServletRequestIllegalStateException - If the portlet is not in the event phase.ServletRequest.getContentType()
public ServletInputStream getInputStream()
throws IOException
InputStream as a PortletServletInputStream.
getInputStream in interface ServletRequestIllegalStateException - If the portlet is not in the event phase.
IOExceptionServletRequest.getInputStream()public String getLocalAddr()
getLocalAddr in interface ServletRequestIllegalStateException - Not allowed in a portlet.public String getLocalName()
getLocalName in interface ServletRequestIllegalStateException - Not allowed in a portlet.public int getLocalPort()
getLocalPort in interface ServletRequestIllegalStateException - Not allowed in a portlet.public Locale getLocale()
getLocale in interface ServletRequestpublic Enumeration getLocales()
getLocales in interface ServletRequestpublic String getParameter(String name)
getParameter in interface ServletRequestpublic Map getParameterMap()
getParameterMap in interface ServletRequestpublic Enumeration getParameterNames()
getParameterNames in interface ServletRequestpublic String[] getParameterValues(String name)
getParameterValues in interface ServletRequestpublic String getProtocol()
getProtocol in interface ServletRequestIllegalStateException - Not allowed in a portlet.
public BufferedReader getReader()
throws IOException
getReader in interface ServletRequestIllegalStateException - If the portlet is not in the event phase.
IOExceptionServletRequest.getReader()public String getRealPath(String path)
getRealPath in interface ServletRequestpublic String getRemoteAddr()
getRemoteAddr in interface ServletRequestIllegalStateException - Not allowed in a portlet.public String getRemoteHost()
getRemoteHost in interface ServletRequestIllegalStateException - Not allowed in a portlet.public int getRemotePort()
getRemotePort in interface ServletRequestIllegalStateException - Not allowed in a portlet.public RequestDispatcher getRequestDispatcher(String path)
PortletRequestDispatcher as a PortletServletRequestDispatcher instance.
getRequestDispatcher in interface ServletRequestServletRequest.getRequestDispatcher(java.lang.String)public String getScheme()
getScheme in interface ServletRequestpublic String getServerName()
getServerName in interface ServletRequestpublic int getServerPort()
getServerPort in interface ServletRequestIllegalStateException - Not allowed in a portlet.public boolean isSecure()
isSecure in interface ServletRequestpublic void removeAttribute(String name)
removeAttribute in interface ServletRequest
public void setAttribute(String name,
Object o)
setAttribute in interface ServletRequest
public void setCharacterEncoding(String env)
throws UnsupportedEncodingException
setCharacterEncoding in interface ServletRequestIllegalStateException - If the portlet is not in the event phase.
UnsupportedEncodingExceptionServletRequest.setCharacterEncoding(String)public javax.portlet.PortletRequest getPortletRequest()
PortletRequest instance.
PortletRequest instance.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||