| | |
| | | import org.opends.sdk.*; |
| | | import org.opends.sdk.schema.Schema; |
| | | |
| | | import com.sun.opends.sdk.util.LocalizedIllegalArgumentException; |
| | | import com.sun.opends.sdk.util.Message; |
| | | import com.sun.opends.sdk.util.Validator; |
| | | |
| | | |
| | |
| | | if (entry == null) |
| | | { |
| | | // No change record found. |
| | | Message message = WARN_READ_LDIF_RECORD_NO_CHANGE_RECORD_FOUND |
| | | LocalizableMessage message = WARN_READ_LDIF_RECORD_NO_CHANGE_RECORD_FOUND |
| | | .get(); |
| | | throw new LocalizedIllegalArgumentException(message); |
| | | } |
| | |
| | | if (reader.readEntry() != null) |
| | | { |
| | | // Multiple change records found. |
| | | Message message = WARN_READ_LDIF_RECORD_MULTIPLE_CHANGE_RECORDS_FOUND |
| | | LocalizableMessage message = WARN_READ_LDIF_RECORD_MULTIPLE_CHANGE_RECORDS_FOUND |
| | | .get(); |
| | | throw new LocalizedIllegalArgumentException(message); |
| | | } |
| | |
| | | catch (IOException e) |
| | | { |
| | | // This should never happen for a String based reader. |
| | | Message message = WARN_READ_LDIF_RECORD_UNEXPECTED_IO_ERROR.get(e |
| | | LocalizableMessage message = WARN_READ_LDIF_RECORD_UNEXPECTED_IO_ERROR.get(e |
| | | .getMessage()); |
| | | throw new LocalizedIllegalArgumentException(message); |
| | | } |
| | |
| | | // Skip if branch containing the entry DN is excluded. |
| | | if (isBranchExcluded(entryDN)) |
| | | { |
| | | final Message message = Message |
| | | final LocalizableMessage message = LocalizableMessage |
| | | .raw("Skipping entry because it is in excluded branch"); |
| | | skipLDIFRecord(record, message); |
| | | continue; |
| | |
| | | // Skip if the entry is excluded by any filters. |
| | | if (isEntryExcluded(entry)) |
| | | { |
| | | final Message message = Message |
| | | final LocalizableMessage message = LocalizableMessage |
| | | .raw("Skipping entry due to exclusing filters"); |
| | | skipLDIFRecord(record, message); |
| | | continue; |