Hi.
I'm using iPlanet Directory Server 5.1 and so far so good, but I want to be able to read the attributes modifyTimeStamp and createTimeStamp but if I try to read it using a DirContextAdapter I get a null, the System.out.println from the following code prints a null.
Is it possible to get those attributes?
Thanks!Code:private static class PersonContextMapper implements ContextMapper { public Object mapFromContext(Object ctx) { DirContextAdapter context = (DirContextAdapter) ctx; // DistinguishedName dn = new DistinguishedName(context.getDn()); Person person = new Person(); person.setObjectClasses(context.getStringAttributes("objectclass")); person.setDn(context.getDn().toString()); person.setName(context.getStringAttribute("givenName")); person.setLastName(context.getStringAttribute("sn")); person.setEmail(context.getStringAttribute("mail")); person.setPhone(context.getStringAttribute("telephoneNumber")); person.setCountry(context.getStringAttribute("c")); person.setUserPassword((byte[]) context .getObjectAttribute("userPassword")); person.setGessouid(context.getStringAttribute("gessouid")); person.setCn(context.getStringAttribute("cn")); person.setSso(context.getStringAttribute("uid")); System.out.println(context.getStringAttribute("modifytimestamp")); return person; } }


Reply With Quote