Package org.jboss.portletbridge

Examples of org.jboss.portletbridge.PortletBridgePrincipal


            .getAttributeNames());
        portletBridgeContext.setStateId(stateId);
        request.setAttribute(
            PortletBridgeContext.REQUEST_PARAMETER_NAME,
            portletBridgeContext);
        PortletBridgePrincipal portletPrincipal = getPortletPrincipal();
        if(null != portletPrincipal){
          request.setAttribute(PortletRequest.USER_INFO, portletPrincipal.getUserInfo());
        }
      } else {
        throw new FacesException(
            "No saved portlet window state for an id " + stateId);
      }
View Full Code Here


  public String getAuthType() {
    return getHttpRequest().getAuthType();
  }

  public String getRemoteUser() {
    PortletBridgePrincipal userPrincipal = getPortletPrincipal();
    if (null != userPrincipal && null != userPrincipal.getName()) {
      return userPrincipal.getRemoteUser();
    }
    return getHttpRequest().getRemoteUser();
  }
View Full Code Here

    }
    return session;
  }

  public Principal getUserPrincipal() {
    PortletBridgePrincipal portletPrincipal = getPortletPrincipal();
    if(null == portletPrincipal || null == portletPrincipal.getName()){
      //return getHttpRequest().getUserPrincipal();
         return null;
    }
    return portletPrincipal;
  }
View Full Code Here

    }
    return portletPrincipal;
  }

  private PortletBridgePrincipal getPortletPrincipal() {
    PortletBridgePrincipal userPrincipal = null;
    HttpSession httpSession = getHttpRequest().getSession(false);
    if (null != httpSession) {
      userPrincipal = (PortletBridgePrincipal) httpSession
          .getAttribute(PORTAL_USER_PRINCIPAL);
    }
View Full Code Here

    }
    return userPrincipal;
  }

  public boolean isUserInRole(String role) {
    PortletBridgePrincipal portletPrincipal = getPortletPrincipal();
    return null != portletPrincipal?portletPrincipal.isUserInRole(role):getHttpRequest().isUserInRole(role);
  }
View Full Code Here

TOP

Related Classes of org.jboss.portletbridge.PortletBridgePrincipal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.