class FileConnection implements ObjectStoreConnection {

    @Override
    public Map<String, List<DomainRoleMember>> getPendingDomainRoleMembers(String principal) {

        List<String> orgs = new ArrayList<>();
        Map<String, List<DomainRoleMember>> domainRoleMembersMap = new HashMap<>();

        DomainStruct auditDom = getDomainStruct(ZMSConsts.SYS_AUTH_AUDIT_BY_ORG);
        if (auditDom != null && auditDom.getRoles() != null && !auditDom.getRoles().isEmpty()) {
            for (Role role : auditDom.getRoles().values()) {
                if (containsRoleMember(role.getRoleMembers(), principal)) {
                    orgs.add(AthenzUtils.extractRoleName(role.getName()));
                }
            }
        }
        if (!orgs.isEmpty()) {
            domainRoleMembersMap = new HashMap<>();
            List<String> domainNames = listDomains(null, 0);
            for (String domainName : domainNames) {
                DomainStruct domain = getDomainStruct(domainName);
                if (domain == null) {
                    continue;
                }
                if (domain.getMeta() != null && orgs.contains(domain.getMeta().getOrg())) {
                    DomainRoleMembers domainRoleMembers = new DomainRoleMembers();
                    domainRoleMembers.setDomainName(domain.getName());
                    List<DomainRoleMember>  domainRoleMemberList = new ArrayList<>();
                    domainRoleMembers.setMembers(domainRoleMemberList);
                    for (Role role : domain.getRoles().values()) {
                        for (RoleMember roleMember : role.getRoleMembers()) {
                            if (roleMember.getApproved() == Boolean.FALSE) {
                                DomainRoleMember domainRoleMember = new DomainRoleMember();
                                domainRoleMember.setMemberName(roleMember.getMemberName());
                                List<MemberRole> memberRoles = new ArrayList<>();
                                MemberRole memberRole = new MemberRole();
                                memberRole.setActive(false);
                                memberRole.setRoleName(AthenzUtils.extractRoleName(role.getName()));
                                memberRole.setExpiration(roleMember.getExpiration());
                                memberRoles.add(memberRole);
                                domainRoleMember.setMemberRoles(memberRoles);
                                domainRoleMemberList.add(domainRoleMember);
                            }
                        }
                    }
                    if (!domainRoleMemberList.isEmpty()) {
                        domainRoleMembersMap.put(domain.getName(), domainRoleMemberList);
                    }
                }
            }
        }
        return domainRoleMembersMap;
    }

    public  FileConnection(File rootDir, File quotaDir);

}