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.jboss.security
Class RunAsIdentity

    java.lang.Object
      org.jboss.security.SimplePrincipal
          org.jboss.security.CallerIdentity
              org.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.

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 © 2002 JBoss Group, LLC. All Rights Reserved.