org.apache.struts2.servlet.interceptor
类 ServletPrincipalProxy

java.lang.Object
  继承者 org.apache.struts2.servlet.interceptor.ServletPrincipalProxy
所有已实现的接口:
PrincipalProxy

public class ServletPrincipalProxy
extends Object
implements PrincipalProxy

PrincipalProxy implementation for using HttpServletRequest Principal related methods.


构造方法摘要
ServletPrincipalProxy(javax.servlet.http.HttpServletRequest request)
          Constructs a proxy
 
方法摘要
 String getRemoteUser()
          Gets the user id
 javax.servlet.http.HttpServletRequest getRequest()
          已过时。 To obtain the HttpServletRequest in your action, use org.apache.struts2.servlet.ServletRequestAware, since this method will be dropped in future.
 Principal getUserPrincipal()
          Gets the user principal
 boolean isRequestSecure()
          Is the request using https?
 boolean isUserInRole(String role)
          True if the user is in the given role
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

ServletPrincipalProxy

public ServletPrincipalProxy(javax.servlet.http.HttpServletRequest request)
Constructs a proxy

参数:
request - The underlying request
方法详细信息

isUserInRole

public boolean isUserInRole(String role)
True if the user is in the given role

指定者:
接口 PrincipalProxy 中的 isUserInRole
参数:
role - The role
返回:
True if the user is in that role

getUserPrincipal

public Principal getUserPrincipal()
Gets the user principal

指定者:
接口 PrincipalProxy 中的 getUserPrincipal
返回:
The principal

getRemoteUser

public String getRemoteUser()
Gets the user id

指定者:
接口 PrincipalProxy 中的 getRemoteUser
返回:
The user id

isRequestSecure

public boolean isRequestSecure()
Is the request using https?

指定者:
接口 PrincipalProxy 中的 isRequestSecure
返回:
True if using https

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
已过时。 To obtain the HttpServletRequest in your action, use org.apache.struts2.servlet.ServletRequestAware, since this method will be dropped in future.

Gets the request.

指定者:
接口 PrincipalProxy 中的 getRequest
返回:
The request