public override void Solve(
IFileSystemInfo localFileSystemInfo,
IObjectId remoteId,
ContentChangeType localContent,
ContentChangeType remoteContent)
{
var obj = this.Storage.GetObjectByRemoteId(remoteId.Id);
string oldName = (remoteId as ICmisObject).Name;
// Rename object
try {
(remoteId as ICmisObject).Rename(localFileSystemInfo.Name, true);
} catch (CmisConstraintException e) {
if (!Utils.IsValidISO885915(localFileSystemInfo.Name)) {
OperationsLogger.Warn(string.Format("Server denied to rename {0} to {1}, perhaps because it contains UTF-8 characters", oldName, localFileSystemInfo.Name));
throw new InteractionNeededException(string.Format("Server denied renaming of {0}", oldName), e) {
Title = string.Format("Server denied renaming of {0}", oldName),
Description = string.Format("Server denied to rename {0} to {1}, perhaps because it contains UTF-8 characters", oldName, localFileSystemInfo.Name)
};
}
throw;
} catch (CmisPermissionDeniedException) {
OperationsLogger.Warn(string.Format("Unable to renamed remote object from {0} to {1}: Permission Denied", oldName, localFileSystemInfo.Name));
return;
}
obj.Name = localFileSystemInfo.Name;
obj.Ignored = (remoteId as ICmisObject).AreAllChildrenIgnored();
this.Storage.SaveMappedObject(obj);
this.changeChangeSolver.Solve(localFileSystemInfo, remoteId, localContent, remoteContent);
}
}