org.apache.geronimo.openejb.deployment
Class SecurityBuilder

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

public class SecurityBuilder
extends java.lang.Object


Constructor Summary
SecurityBuilder()
           
 
Method Summary
 void addComponentPermissions(java.lang.String defaultRole, java.util.Collection<java.security.Permission> notAssigned, org.apache.openejb.jee.AssemblyDescriptor assemblyDescriptor, java.lang.String ejbName, java.util.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 addEjbTimeout(org.apache.openejb.jee.EnterpriseBean remoteBean, EjbModule ejbModule, java.util.Collection<java.security.Permission> permissions)
           
 void addToPermissions(java.util.Collection<java.security.Permission> permissions, java.lang.String ejbName, java.lang.String methodInterface, java.lang.String interfaceClass, java.lang.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(java.lang.String defaultRole,
                                    java.util.Collection<java.security.Permission> notAssigned,
                                    org.apache.openejb.jee.AssemblyDescriptor assemblyDescriptor,
                                    java.lang.String ejbName,
                                    java.util.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(java.util.Collection<java.security.Permission> permissions,
                             java.lang.String ejbName,
                             java.lang.String methodInterface,
                             java.lang.String interfaceClass,
                             java.lang.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

addEjbTimeout

public void addEjbTimeout(org.apache.openejb.jee.EnterpriseBean remoteBean,
                          EjbModule ejbModule,
                          java.util.Collection<java.security.Permission> permissions)
                   throws DeploymentException
Throws:
DeploymentException


Copyright © 2003-2012 The Apache Geronimo development community. All Rights Reserved.