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

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

public class MethodSecurityInfo
extends java.lang.Object
implements IMethodSecurityInfo

Used to describe permission information for a given method.

Author:
Florent Benoit

Field Summary
private  boolean excluded
          Excluded method ?.
private  java.security.Permission permission
          Permission for this method.
private  java.util.List<java.lang.String> roles
          List of roles for this method.
private  boolean unchecked
          Unchecked method ?.
 
Constructor Summary
MethodSecurityInfo()
          Default constructor.
 
Method Summary
 void addRole(java.lang.String roleName)
          Add the given role to the list of roles allowed to call this method.
 java.security.Permission getPermission()
           
 java.util.List<java.lang.String> getRoles()
           
 boolean isExcluded()
           
 boolean isUnchecked()
           
 void setExcluded(boolean excluded)
          This method is excluded (no call allowed if true).
 void setPermission(java.security.Permission permission)
          Sets the permission.
 void setUnchecked(boolean unchecked)
          This method is unchecked (if true, all calls are allowed to this method).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

excluded

private boolean excluded
Excluded method ?.


unchecked

private boolean unchecked
Unchecked method ?.


roles

private java.util.List<java.lang.String> roles
List of roles for this method.


permission

private java.security.Permission permission
Permission for this method.

Constructor Detail

MethodSecurityInfo

public MethodSecurityInfo()
Default constructor.

Method Detail

setExcluded

public void setExcluded(boolean excluded)
This method is excluded (no call allowed if true).

Specified by:
setExcluded in interface IMethodSecurityInfo
Parameters:
excluded - boolean true/false.

isExcluded

public boolean isExcluded()
Specified by:
isExcluded in interface IMethodSecurityInfo
Returns:
true if the method is excluded.

setUnchecked

public void setUnchecked(boolean unchecked)
This method is unchecked (if true, all calls are allowed to this method).

Specified by:
setUnchecked in interface IMethodSecurityInfo
Parameters:
unchecked - boolean true/false.

isUnchecked

public boolean isUnchecked()
Specified by:
isUnchecked in interface IMethodSecurityInfo
Returns:
true if the method is unchecked.

addRole

public void addRole(java.lang.String roleName)
Add the given role to the list of roles allowed to call this method.

Specified by:
addRole in interface IMethodSecurityInfo
Parameters:
roleName - the name of the role.

getRoles

public java.util.List<java.lang.String> getRoles()
Specified by:
getRoles in interface IMethodSecurityInfo
Returns:
list of roles allowed to call this method.

setPermission

public void setPermission(java.security.Permission permission)
Sets the permission.

Specified by:
setPermission in interface IMethodSecurityInfo
Parameters:
permission - the permission to set.

getPermission

public java.security.Permission getPermission()
Specified by:
getPermission in interface IMethodSecurityInfo
Returns:
permissions for this method.