Examples of IMethodSecurityInfo


Examples of org.ow2.easybeans.api.bean.info.IMethodSecurityInfo

            // Match only business method
            if (!method.isBusinessMethod()) {
                continue;
            }

            IMethodSecurityInfo methodSecurityInfo = new MethodSecurityInfo();
            securityInfo.addMethodSecurityInfo(methodSecurityInfo);

            // Set meta-info
            methodSecurityInfo.setExcluded(method.hasDenyAll());
            methodSecurityInfo.setUnchecked(method.hasPermitAll());
            List<String> roles = method.getRolesAllowed();
            if (roles != null) {
                for (String role : roles) {
                    methodSecurityInfo.addRole(role);
                }
            }

            // Build permission
            String ejbName = bean.getJCommonBean().getName();
            String methodName = method.getMethodName();
            //TODO: fixme
            String methodInterface = null;
            //TODO: fixme
            String[] methodParams = null;

            EJBMethodPermission permission = new EJBMethodPermission(ejbName, methodName, methodInterface, methodParams);
            methodSecurityInfo.setPermission(permission);
        }

        return securityInfo;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.