package com.c2kernel.lookup; import com.c2kernel.common.ObjectCannotBeUpdated; import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.property.Property; import com.c2kernel.utils.Logger; import com.novell.ldap.LDAPAttribute; import com.novell.ldap.LDAPAttributeSet; import com.novell.ldap.LDAPDN; import com.novell.ldap.LDAPEntry; import com.novell.ldap.LDAPException; public class LegacyLDAPPropertyManager extends LDAPPropertyManager { public LegacyLDAPPropertyManager(LDAPLookup ldap) { super(ldap); } public void deleteProperty(EntityPath thisEntity, String name) throws ObjectNotFoundException, ObjectCannotBeUpdated { try { LDAPLookupUtils.delete(ldap.getConnection(), "cn="+name+","+thisEntity.getFullDN()); } catch (LDAPException ex) { Logger.error("Error deleting prop "+name+" from "+thisEntity.getSysKey()); Logger.error(ex); } } public String[] getPropertyNames(EntityPath thisEntity) throws ObjectNotFoundException { String props[]= LDAPLookupUtils.getChildrenDNs(ldap.getConnection(), thisEntity.getFullDN(), "objectclass=cristalproperty"); String names[] = new String[props.length]; for (int i=0; i