Permissions uncheckedPermissions = null;
Permissions excludedPermissions = null;
HashMap rolePermissionsTable = null;
EJBMethodPermission ejbmp = null;
// phase 1
Map mpMap = eDescriptor.getMethodPermissionsFromDD();
if (mpMap != null) {
Iterator mpIt = mpMap.keySet().iterator();
while(mpIt.hasNext()) {
MethodPermission mp = (MethodPermission)mpIt.next();
Iterator mdIt = ((ArrayList) mpMap.get(mp)).iterator();
while(mdIt.hasNext()) {
MethodDescriptor md = (MethodDescriptor) mdIt.next();
String mthdName = md.getName();
String mthdIntf = md.getEjbClassSymbol();
String mthdParams[] = md.getStyle() == 3 ?
md.getParameterClassNames() : null;
ejbmp = new EJBMethodPermission(eName,mthdName.equals("*") ?
null : mthdName,
mthdIntf,mthdParams);
rolePermissionsTable =
addToRolePermissionsTable(rolePermissionsTable,mp,ejbmp);
uncheckedPermissions =
addToUncheckedPermissions(uncheckedPermissions,mp,ejbmp);
excludedPermissions =
addToExcludedPermissions(excludedPermissions,mp,ejbmp);
}
}
}
// phase 2 - configures additional perms:
// . to optimize performance of Permissions.implies
// . to cause any uncovered methods to be unchecked
Iterator mdIt = eDescriptor.getMethodDescriptors().iterator();
while(mdIt.hasNext()) {
MethodDescriptor md = (MethodDescriptor)mdIt.next();
Method mthd = md.getMethod(eDescriptor);
String mthdIntf = md.getEjbClassSymbol();
if(mthd == null){
continue;
}
if(mthdIntf == null || mthdIntf.equals("")) {
_logger.severe("MethodDescriptor interface not defined - "+
" ejbName: "+eName+
" methodName: " +md.getName()+
" methodParams: " +md.getParameterClassNames());
continue;
}
ejbmp = new EJBMethodPermission(eName,mthdIntf,mthd);
Iterator mpIt = eDescriptor.getMethodPermissionsFor(md).iterator();
while(mpIt.hasNext()) {