Exemplo n.º 1
0
        @Override
        public Person doMapFromContext(DirContextOperations context) {
          Person person = new Person();

          LdapName dn = LdapUtils.newLdapName(context.getDn());
          person.setCountry(LdapUtils.getStringValue(dn, 0));
          person.setCompany(LdapUtils.getStringValue(dn, 1));
          person.setFullName(context.getStringAttribute("cn"));
          person.setLastName(context.getStringAttribute("sn"));
          person.setDescription(context.getStringAttribute("description"));
          person.setPhone(context.getStringAttribute("telephoneNumber"));

          return person;
        }