Search in sources :

Example 1 with SecurityRoleReferenceInfo

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

the class EjbJarInfoBuilder method resolveRoleLinks.

private void resolveRoleLinks(final EnterpriseBeanInfo bean, final JndiConsumer item) {
    if (!(item instanceof RemoteBean)) {
        return;
    }
    final RemoteBean rb = (RemoteBean) item;
    final List<SecurityRoleRef> refs = rb.getSecurityRoleRef();
    for (final SecurityRoleRef ref : refs) {
        final SecurityRoleReferenceInfo info = new SecurityRoleReferenceInfo();
        info.description = ref.getDescription();
        info.roleLink = ref.getRoleLink();
        info.roleName = ref.getRoleName();
        if (info.roleLink == null) {
            info.roleLink = info.roleName;
        }
        bean.securityRoleReferences.add(info);
    }
}
Also used : SecurityRoleReferenceInfo(org.apache.openejb.assembler.classic.SecurityRoleReferenceInfo) RemoteBean(org.apache.openejb.jee.RemoteBean) SecurityRoleRef(org.apache.openejb.jee.SecurityRoleRef)

Aggregations

SecurityRoleReferenceInfo (org.apache.openejb.assembler.classic.SecurityRoleReferenceInfo)1 RemoteBean (org.apache.openejb.jee.RemoteBean)1 SecurityRoleRef (org.apache.openejb.jee.SecurityRoleRef)1