Search in sources :

Example 1 with SecurityRoleInfo

use of org.apache.openejb.assembler.classic.SecurityRoleInfo in project tomee by apache.

the class EjbJarInfoBuilder method initSecurityRoles.

private void initSecurityRoles(final EjbModule jar, final EjbJarInfo ejbJarInfo) {
    final List<SecurityRole> roles = jar.getEjbJar().getAssemblyDescriptor().getSecurityRole();
    for (final SecurityRole sr : roles) {
        final SecurityRoleInfo info = new SecurityRoleInfo();
        info.description = sr.getDescription();
        info.roleName = sr.getRoleName();
        if (securityRoles.contains(sr.getRoleName())) {
            ConfigUtils.logger.warning("conf.0102", jar.getJarLocation(), sr.getRoleName());
        } else {
            securityRoles.add(sr.getRoleName());
        }
        ejbJarInfo.securityRoles.add(info);
    }
}
Also used : SecurityRole(org.apache.openejb.jee.SecurityRole) SecurityRoleInfo(org.apache.openejb.assembler.classic.SecurityRoleInfo)

Aggregations

SecurityRoleInfo (org.apache.openejb.assembler.classic.SecurityRoleInfo)1 SecurityRole (org.apache.openejb.jee.SecurityRole)1