public HttpResponseMessage ResolveConflict(string filename, ConflictResolutionStrategy strategy)
        {
            var canonicalFilename = FileHeader.Canonize(filename);

            if (Log.IsDebugEnabled)
            {
                Log.Debug("Resolving conflict of a file '{0}' by using {1} strategy", filename, strategy);
            }

            switch (strategy)
            {
            case ConflictResolutionStrategy.CurrentVersion:

                Storage.Batch(accessor =>
                {
                    var localMetadata = accessor.GetFile(canonicalFilename, 0, 0).Metadata;
                    var conflict      = accessor.GetConfigurationValue <ConflictItem>(RavenFileNameHelper.ConflictConfigNameForFile(canonicalFilename));

                    ConflictResolver.ApplyCurrentStrategy(canonicalFilename, conflict, localMetadata);

                    accessor.UpdateFileMetadata(canonicalFilename, localMetadata, null);

                    ConflictArtifactManager.Delete(canonicalFilename, accessor);
                });

                Publisher.Publish(new ConflictNotification
                {
                    FileName = canonicalFilename,
                    Status   = ConflictStatus.Resolved
                });

                break;

            case ConflictResolutionStrategy.RemoteVersion:

                Storage.Batch(accessor =>
                {
                    var localMetadata = accessor.GetFile(canonicalFilename, 0, 0).Metadata;
                    var conflict      = accessor.GetConfig(RavenFileNameHelper.ConflictConfigNameForFile(canonicalFilename)).JsonDeserialization <ConflictItem>();

                    ConflictResolver.ApplyRemoteStrategy(canonicalFilename, conflict, localMetadata);

                    accessor.UpdateFileMetadata(canonicalFilename, localMetadata, null);
                    accessor.SetConfig(RavenFileNameHelper.ConflictConfigNameForFile(canonicalFilename), JsonExtensions.ToJObject(conflict));

                    // ConflictArtifactManager.Delete(canonicalFilename, accessor); - intentionally not deleting, conflict item will be removed when a remote file is put
                });

                SynchronizationTask.Context.NotifyAboutWork();

                break;

            default:
                throw new NotSupportedException(string.Format("{0} is not the valid strategy to resolve a conflict", strategy));
            }

            return(GetEmptyMessage(HttpStatusCode.NoContent));
        }