ModificationItem[] mods = new ModificationItem[getLDAPArguments().getArguments().size()];
BasicAttribute attr;
PropertyIterator iter = getLDAPArguments().iterator();
int count = 0;
while (iter.hasNext()) {
LDAPArgument item = (LDAPArgument) iter.next().getObjectValue();
if ((item.getValue()).length()==0) {
attr = new BasicAttribute(item.getName());
} else {
attr = getBasicAttribute(item.getName(), item.getValue());
}
final String opcode = item.getOpcode();
if ("add".equals(opcode)) { // $NON-NLS-1$
mods[count++] = new ModificationItem(DirContext.ADD_ATTRIBUTE, attr);
} else if ("delete".equals(opcode) // $NON-NLS-1$
|| "remove".equals(opcode)) { // $NON-NLS-1$
mods[count++] = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, attr);