throw new LdapLdifException( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2 ) );
}
modified = Strings.trim( line.substring( "add:".length() ) );
modificationType = ModificationOperation.ADD_ATTRIBUTE;
attribute = new DefaultAttribute( modified );
state = ATTRVAL_SPEC;
}
else if ( lowerLine.startsWith( "delete:" ) )
{
if ( ( state != MOD_SPEC ) && ( state != ATTRVAL_SPEC ) )
{
LOG.error( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2 ) );
throw new LdapLdifException( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2 ) );
}
modified = Strings.trim(line.substring("delete:".length()));
modificationType = ModificationOperation.REMOVE_ATTRIBUTE;
attribute = new DefaultAttribute( modified );
state = ATTRVAL_SPEC_OR_SEP;
}
else if ( lowerLine.startsWith( "replace:" ) )
{
if ( ( state != MOD_SPEC ) && ( state != ATTRVAL_SPEC ) )
{
LOG.error( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2 ) );
throw new LdapLdifException( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2 ) );
}
modified = Strings.trim(line.substring("replace:".length()));
modificationType = ModificationOperation.REPLACE_ATTRIBUTE;
attribute = new DefaultAttribute( modified );
state = ATTRVAL_SPEC_OR_SEP;
}
else
{