站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

RunAsIdentity (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


org.jboss.security
Class RunAsIdentity

java.lang.Object
  extended byorg.jboss.security.SimplePrincipal
      extended byorg.jboss.security.CallerIdentity
          extended byorg.jboss.security.RunAsIdentity
All Implemented Interfaces:
Principal, Serializable

public class RunAsIdentity
extends CallerIdentity

The RunAsIdentity is a Principal that associates the run-as principal with his run-as role(s).

Version:
$Revision: 1.5 $
Author:
Thomas.Diesler@jboss.org
See Also:
Serialized Form

Constructor Summary
RunAsIdentity(String roleName, String principalName)
          Construct an inmutable instance of a RunAsIdentity
RunAsIdentity(String roleName, String principalName, Set extraRoleNames)
          Construct an inmutable instance of a RunAsIdentity
 
Method Summary
 boolean doesUserHaveRole(Principal role)
           
 boolean doesUserHaveRole(Set methodRoles)
          True if the run-as principal has any of the method roles
 Set getRunAsRoles()
           
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class org.jboss.security.CallerIdentity
equals, getCredential, hashCode
 
Methods inherited from class org.jboss.security.SimplePrincipal
getName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RunAsIdentity

public RunAsIdentity(String roleName,
                     String principalName)
Construct an inmutable instance of a RunAsIdentity


RunAsIdentity

public RunAsIdentity(String roleName,
                     String principalName,
                     Set extraRoleNames)
Construct an inmutable instance of a RunAsIdentity

Method Detail

getRunAsRoles

public Set getRunAsRoles()

doesUserHaveRole

public boolean doesUserHaveRole(Principal role)

doesUserHaveRole

public boolean doesUserHaveRole(Set methodRoles)
True if the run-as principal has any of the method roles


toString

public String toString()
Returns a string representation of the object.

Specified by:
toString in interface Principal
Overrides:
toString in class CallerIdentity
Returns:
a string representation of the object.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.