org.apache.geronimo.openejb.deployment
Class SecurityBuilder

java.lang.Object
  extended by org.apache.geronimo.openejb.deployment.SecurityBuilder

public class SecurityBuilder
extends Object


Constructor Summary
SecurityBuilder()
           
 
Method Summary
 void addComponentPermissions(String defaultRole, PermissionCollection notAssigned, org.apache.openejb.jee.AssemblyDescriptor assemblyDescriptor, String ejbName, List<org.apache.openejb.jee.SecurityRoleRef> securityRoleRefs, ComponentPermissions componentPermissions)
          Fill the container moduleBuilder with the security information that it needs to create the proper interceptors.
 void addToPermissions(PermissionCollection permissions, String ejbName, String methodInterface, String interfaceClass, ClassLoader classLoader)
          Generate all the possible permissions for a bean's interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityBuilder

public SecurityBuilder()
Method Detail

addComponentPermissions

public void addComponentPermissions(String defaultRole,
                                    PermissionCollection notAssigned,
                                    org.apache.openejb.jee.AssemblyDescriptor assemblyDescriptor,
                                    String ejbName,
                                    List<org.apache.openejb.jee.SecurityRoleRef> securityRoleRefs,
                                    ComponentPermissions componentPermissions)
                             throws DeploymentException
Fill the container moduleBuilder with the security information that it needs to create the proper interceptors. A SecurityConfiguration is also filled with permissions that need to be used to fill the JACC policy configuration.

Parameters:
defaultRole - default role for otherwise unassigned permissions
notAssigned - the set of all possible permissions. These will be culled so that all that are left are those that have not been assigned roles.
assemblyDescriptor - the assembly descriptor
ejbName - the name of the EJB
securityRoleRefs - the EJB's role references
componentPermissions - the holder for the ejb's permissions
Throws:
DeploymentException - if any constraints are violated

addToPermissions

public void addToPermissions(PermissionCollection permissions,
                             String ejbName,
                             String methodInterface,
                             String interfaceClass,
                             ClassLoader classLoader)
                      throws DeploymentException
Generate all the possible permissions for a bean's interface.

Method permissions are defined in the deployment descriptor as a binary relation from the set of security roles to the set of methods of the home, component, and/or web service endpoint interfaces of session and entity beans, including all their superinterfaces (including the methods of the EJBHome and EJBObject interfaces and/or EJBLocalHome and EJBLocalObject interfaces).

Parameters:
permissions - the permission set to be extended
ejbName - the name of the EJB
methodInterface - the EJB method interface
interfaceClass - the class name of the interface to be used to generate the permissions
classLoader - the class loader to be used in obtaining the interface class
Throws:
DeploymentException - in case a class could not be found


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.