org.jboss.metadata.javaee.jboss
Class RunAsIdentityMetaData

java.lang.Object
  extended by org.jboss.metadata.javaee.jboss.RunAsIdentityMetaData
All Implemented Interfaces:
Serializable

public class RunAsIdentityMetaData
extends Object
implements Serializable

Extended run-as/security-role metadata for defining a run as principal.

Version:
$Revision: 81768 $
Author:
Scott.Stark@jboss.org
See Also:
Serialized Form

Constructor Summary
RunAsIdentityMetaData(String roleName, String principalName)
          Construct an inmutable instance of a RunAsIdentity
RunAsIdentityMetaData(String roleName, String principalName, Set<String> extraRoleNames)
          Construct an inmutable instance of a RunAsIdentityMetaData
 
Method Summary
 boolean doesUserHaveRole(Set<String> methodRoles)
          True if the run-as principal has any of the method roles
 boolean doesUserHaveRole(String role)
           
 String getPrincipalName()
           
 String getRoleName()
           
 Set<String> getRunAsRoles()
          Return a set with the configured run-as role
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RunAsIdentityMetaData

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


RunAsIdentityMetaData

public RunAsIdentityMetaData(String roleName,
                             String principalName,
                             Set<String> extraRoleNames)
Construct an inmutable instance of a RunAsIdentityMetaData

Method Detail

getPrincipalName

public String getPrincipalName()

getRoleName

public String getRoleName()

getRunAsRoles

public Set<String> getRunAsRoles()
Return a set with the configured run-as role

Returns:
Set for the run-as roles

doesUserHaveRole

public boolean doesUserHaveRole(String role)

doesUserHaveRole

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


toString

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

Overrides:
toString in class Object
Returns:
a string representation of the object.


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.