Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.portlet.interceptor
Class PortletPrincipalProxy

    java.lang.Object
      org.apache.struts2.portlet.interceptor.PortletPrincipalProxy

All Implemented Interfaces:
  PrincipalProxy

    public class PortletPrincipalProxy

extends Object
implements PrincipalProxy

PrincipalProxy implementation for using PortletRequest Principal related methods.

Field Summary
`private javax.portlet.PortletRequest` | `request`

Constructor Summary
`PortletPrincipalProxy(javax.portlet.PortletRequest request)` Constructs a proxy

Method Summary
`String` | `getRemoteUser()` Gets the user id
`HttpServletRequest` | `getRequest()` Deprecated. 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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### request

    private javax.portlet.PortletRequest request

Constructor Detail

### PortletPrincipalProxy

    public PortletPrincipalProxy(javax.portlet.PortletRequest request)

  Constructs a proxy

  Parameters:
    `request` - The underlying request

Method Detail

### isUserInRole

    public boolean isUserInRole(String role)

  True if the user is in the given role

  Specified by:
    `isUserInRole` in interface `PrincipalProxy`
  Parameters:
    `role` - The role
  Returns:
    True if the user is in that role

### getUserPrincipal

    public Principal getUserPrincipal()

  Gets the user principal

  Specified by:
    `getUserPrincipal` in interface `PrincipalProxy`
  Returns:
    The principal

### getRemoteUser

    public String getRemoteUser()

  Gets the user id

  Specified by:
    `getRemoteUser` in interface `PrincipalProxy`
  Returns:
    The user id

### isRequestSecure

    public boolean isRequestSecure()

  Is the request using https?

  Specified by:
    `isRequestSecure` in interface `PrincipalProxy`
  Returns:
    True if using https

### getRequest

    public HttpServletRequest getRequest()

  Deprecated. To obtain the HttpServletRequest in your action, use `org.apache.struts2.servlet.ServletRequestAware`, since this method will be dropped in future.

  Gets the request.

  Specified by:
    `getRequest` in interface `PrincipalProxy`
  Returns:
    The request
  Throws:
    `UnsupportedOperationException` - not supported in this implementation.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.