org.objectweb.easybeans.container.info.security
Class SecurityInfo

java.lang.Object
  extended by org.objectweb.easybeans.container.info.security.SecurityInfo
All Implemented Interfaces:
ISecurityInfo

public class SecurityInfo
extends java.lang.Object
implements ISecurityInfo

Runtime info about security.

Author:
Florent Benoit

Field Summary
private  java.util.List<java.lang.String> declaredRoles
          List of roles.
private  java.util.List<IMethodSecurityInfo> methodSecurityInfos
          List of methods.
private  java.lang.String runAsRole
          Name of the run-as role.
private  javax.security.auth.Subject runAsSubject
          Subject for run-as role.
 
Constructor Summary
SecurityInfo()
          Default constructor.
 
Method Summary
 void addDeclaredRole(java.lang.String roleName)
          Adds a role for this bean (for isCallerInRole).
 void addMethodSecurityInfo(IMethodSecurityInfo methodSecurityInfo)
          Adds a method containing security.
 java.util.List<java.lang.String> getDeclaredRoles()
           
 java.util.List<IMethodSecurityInfo> getMethodSecurityInfos()
           
 java.lang.String getRunAsRole()
          Gets run-as name.
 javax.security.auth.Subject getRunAsSubject()
          Gets run-as role subject.
 void setDeclaredRole(java.util.List<java.lang.String> declaredRoles)
          Sets the list of declared roles.
 void setRunAsRole(java.lang.String runAsRole)
          Sets the name of the run-as security role.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

declaredRoles

private java.util.List<java.lang.String> declaredRoles
List of roles.


methodSecurityInfos

private java.util.List<IMethodSecurityInfo> methodSecurityInfos
List of methods.


runAsRole

private java.lang.String runAsRole
Name of the run-as role.


runAsSubject

private javax.security.auth.Subject runAsSubject
Subject for run-as role.

Constructor Detail

SecurityInfo

public SecurityInfo()
Default constructor.

Method Detail

addMethodSecurityInfo

public void addMethodSecurityInfo(IMethodSecurityInfo methodSecurityInfo)
Adds a method containing security.

Specified by:
addMethodSecurityInfo in interface ISecurityInfo
Parameters:
methodSecurityInfo - the info about security.

getMethodSecurityInfos

public java.util.List<IMethodSecurityInfo> getMethodSecurityInfos()
Specified by:
getMethodSecurityInfos in interface ISecurityInfo
Returns:
list of security infos on all methods.

setRunAsRole

public void setRunAsRole(java.lang.String runAsRole)
Sets the name of the run-as security role.

Specified by:
setRunAsRole in interface ISecurityInfo
Parameters:
runAsRole - the name of the role.

getRunAsRole

public java.lang.String getRunAsRole()
Gets run-as name.

Specified by:
getRunAsRole in interface ISecurityInfo
Returns:
the name of the security role for the run-as.

getRunAsSubject

public javax.security.auth.Subject getRunAsSubject()
Gets run-as role subject.

Specified by:
getRunAsSubject in interface ISecurityInfo
Returns:
a subject with run-as role as role.

addDeclaredRole

public void addDeclaredRole(java.lang.String roleName)
Adds a role for this bean (for isCallerInRole).

Specified by:
addDeclaredRole in interface ISecurityInfo
Parameters:
roleName - the name of a role.

getDeclaredRoles

public java.util.List<java.lang.String> getDeclaredRoles()
Specified by:
getDeclaredRoles in interface ISecurityInfo
Returns:
list of roles declared for this bean.

setDeclaredRole

public void setDeclaredRole(java.util.List<java.lang.String> declaredRoles)
Sets the list of declared roles.

Specified by:
setDeclaredRole in interface ISecurityInfo
Parameters:
declaredRoles - list of declared roles.