// Fallthrough
case Add:
if ( ( entry.getEntry() == null ) )
{
throw new LdapException( I18n.err( I18n.ERR_12082 ) );
}
// Now, iterate through all the attributes
for ( Attribute attribute : entry.getEntry() )
{
sb.append( convertToLdif( attribute, length ) );
}
break;
case Delete:
if ( entry.getEntry() != null )
{
throw new LdapException( I18n.err( I18n.ERR_12081 ) );
}
break;
case ModDn:
case ModRdn:
if ( entry.getEntry() != null )
{
throw new LdapException( I18n.err( I18n.ERR_12083 ) );
}
// Stores the new Rdn
Attribute newRdn = new DefaultAttribute( "newrdn", entry.getNewRdn() );
sb.append( convertToLdif( newRdn, length ) );