ALERT_TYPE_LDIF_CONNHANDLER_PARSE_ERROR, m);
break;
}
}
Operation operation = null;
if (changeRecord == null)
{
fullyProcessed = true;
break;
}
if (changeRecord instanceof AddChangeRecordEntry)
{
operation = conn.processAdd((AddChangeRecordEntry) changeRecord);
}
else if (changeRecord instanceof DeleteChangeRecordEntry)
{
operation = conn.processDelete(
(DeleteChangeRecordEntry) changeRecord);
}
else if (changeRecord instanceof ModifyChangeRecordEntry)
{
operation = conn.processModify(
(ModifyChangeRecordEntry) changeRecord);
}
else if (changeRecord instanceof ModifyDNChangeRecordEntry)
{
operation = conn.processModifyDN(
(ModifyDNChangeRecordEntry) changeRecord);
}
if (operation == null)
{
Message m = INFO_LDIF_CONNHANDLER_UNKNOWN_CHANGETYPE.get(
changeRecord.getChangeOperationType().getLDIFChangeType());
writer.writeComment(m, 78);
}
else
{
if (debugEnabled())
{
TRACER.debugInfo("Result Code: " +
operation.getResultCode().toString());
}
Message m = INFO_LDIF_CONNHANDLER_RESULT_CODE.get(
operation.getResultCode().getIntValue(),
operation.getResultCode().toString());
writer.writeComment(m, 78);
MessageBuilder errorMessage = operation.getErrorMessage();
if ((errorMessage != null) && (errorMessage.length() > 0))
{
m = INFO_LDIF_CONNHANDLER_ERROR_MESSAGE.get(errorMessage);
writer.writeComment(m, 78);
}
DN matchedDN = operation.getMatchedDN();
if (matchedDN != null)
{
m = INFO_LDIF_CONNHANDLER_MATCHED_DN.get(matchedDN.toString());
writer.writeComment(m, 78);
}
List<String> referralURLs = operation.getReferralURLs();
if ((referralURLs != null) && (! referralURLs.isEmpty()))
{
for (String url : referralURLs)
{
m = INFO_LDIF_CONNHANDLER_REFERRAL_URL.get(url);