// Process the method-permission MethodMetaData
MethodPermissionsMetaData perms = bean.getMethodPermissions();
if (perms != null)
for (MethodPermissionMetaData perm : perms)
{
MethodsMetaData methods = perm.getMethods();
if (methods != null)
for (org.jboss.metadata.ejb.spec.MethodMetaData mmd : methods)
{
String[] params =
{};
if (mmd.getMethodParams() != null)
params = mmd.getMethodParams().toArray(params);
else
params = null;
String methodName = mmd.getMethodName();
if (methodName != null && methodName.equals("*"))
methodName = null;
MethodInterfaceType miType = mmd.getMethodIntf();
String iface = miType != null ? miType.name() : null;
EJBMethodPermission p = new EJBMethodPermission(mmd.getEjbName(), methodName, iface, params);
if (perm.getUnchecked() != null)
{
pc.addToUncheckedPolicy(p);
}
else
{
Set<String> roles = perm.getRoles();
Iterator riter = roles.iterator();
while (riter.hasNext())
{
String role = (String) riter.next();
pc.addToRole(role, p);
}
}
}
}
// Process the exclude-list MethodMetaData
ExcludeListMetaData excluded = bean.getExcludeList();
if (excluded != null)
{
MethodsMetaData methods = excluded.getMethods();
if (methods != null)
for (org.jboss.metadata.ejb.spec.MethodMetaData mmd : methods)
{
String[] params =
{};