} else
if (msg instanceof ModifyMsg)
{
ModifyMsg modMsg = (ModifyMsg)msg;
InternalClientConnection conn =
InternalClientConnection.getRootConnection();
try
{
// Map the modMsg modifications to an LDIF string
// for the 'changes' attribute of the CL entry
ModifyOperation modifyOperation =
(ModifyOperation)modMsg.createOperation(conn);
String LDIFchanges = modToLDIF(modifyOperation.getModifications());
ArrayList<RawAttribute> eclAttributes = modMsg.getEclIncludes();
clEntry = createChangelogEntry(
eclmsg.getServiceId(),
eclmsg.getCookie().toString(),
DN.decode(modMsg.getDn()),
modMsg.getChangeNumber(),
LDIFchanges,
modMsg.getUniqueId(),
null, // real time current entry
eclAttributes, // entry attributes
eclmsg.getDraftChangeNumber(),
"modify",null);
}
catch(Exception e)
{
// Exceptions raised by createOperation for example
throw new DirectoryException(ResultCode.OTHER,
Message.raw(Category.SYNC, Severity.NOTICE,
" Server fails to create entry: "),e);
}
}
else if (msg instanceof ModifyDNMsg)
{
try
{
InternalClientConnection conn =
InternalClientConnection.getRootConnection();
ModifyDNMsg modDNMsg = (ModifyDNMsg)msg;
ArrayList<RawAttribute> eclAttributes = modDNMsg.getEclIncludes();
ModifyDNOperation modifyDNOperation =