using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.BL.Entities; using Tango.BL.Enumerations; using Tango.BL.ValueObjects; namespace Tango.BL.ActionLogs { /// /// Represents an ActionLog manager which is responsible for inserting and comparing new action logs to a data store. /// public interface IActionLogManager { /// /// Gets or sets the action log comparer used to compare related objects. /// IActionLogComparer ActionLogComparer { get; set; } /// /// Gets or sets a value indicating whether to perform the logging operations asynchronously. /// bool IsAsync { get; set; } /// /// Inserts a new action log (main entry point). /// /// The type. /// The user unique identifier. /// Name of the related object. /// The related object unique identifier. /// The diffference node tree. /// The message. void InsertLog(ActionLogType type, String userGuid, String relatedObjectName, String relatedObjectGuid, ActionLogDifference diffference, String message = null); /// /// Inserts a new action log (comparison entry). /// /// The type. /// The user unique identifier. /// Name of the related object. /// The related object before the change. /// The related object after the change. /// The message. void InsertLog(ActionLogType type, String userGuid, String relatedObjectName, IActionLogComparable relatedObjectBefore, IActionLogComparable relatedObjectAfter, String message = null); /// /// Inserts a new action log (comparison entry). /// /// The type. /// The user. /// Name of the related object. /// The related object before the change. /// The related object after the change. /// The message. void InsertLog(ActionLogType type, User user, String relatedObjectName, IActionLogComparable relatedObjectBefore, IActionLogComparable relatedObjectAfter, String message = null); /// /// Inserts a new action log (deletion/creation entry). /// /// The type. /// The user. /// Name of the related object. /// The related object. /// The message. /// if set to true will create a one way difference tree (use when the related object was deleted and needs to be monitored). void InsertLog(ActionLogType type, User user, String relatedObjectName, IActionLogComparable relatedObject, String message = null, bool serializeRelatedObject = false); /// /// Inserts a new action log (creation entry). /// /// The type. /// The user unique identifier. /// Name of the related object. /// The related object unique identifier. /// The message. void InsertLog(ActionLogType type, String userGuid, String relatedObjectName, String relatedObjectGuid, String message = null); /// /// Inserts a new action log (neutral entry). /// /// The type. /// The user unique identifier. /// The message. void InsertLog(ActionLogType type, String userGuid, String message = null); /// /// Inserts a new action log (neutral entry). /// /// The type. /// The user. /// The message. void InsertLog(ActionLogType type, User user, String message = null); } }