Search Results for

    Show / Hide Table of Contents

    Class SplitTransactionProcessor

    Inheritance
    object
    BaseTransactionProcessor
    SplitTransactionProcessor
    Implements
    ICanBeRevertedTransactionProcessor
    ISplitTransactionProcessor
    IBaseDataSetProcessorWithDBSave
    IBaseDataSetProcessor
    ITaskProcessor
    IProcessor
    IDisposable
    ILockable
    Inherited Members
    BaseTransactionProcessor.RollbackChanges()
    BaseTransactionProcessor.ProcessOnDBSave()
    BaseTransactionProcessor.GetAllItemsInTransactionProcessor(bool)
    BaseTransactionProcessor.TaskInit(IEntityUpdater, IReadOnlyCache, UserInfo, BusyProgressReporter)
    BaseTransactionProcessor.StatusValidate(IHeaderTransactionalEntity, IEntityUpdater, IReadOnlyCache, UserInfo, IEntityDescriptorFactory, bool, bool)
    BaseTransactionProcessor.ForceLoad()
    BaseTransactionProcessor.ProcessTransaction()
    BaseTransactionProcessor.ExecuteFormula<T>(string, IBaseEntity)
    BaseTransactionProcessor.CustomUpdateCancelCorrectedItem(EntityDescriptor, ITransactionalEntity, ITransactionalEntity, bool)
    BaseTransactionProcessor.ProcessCancel(ITransactionalEntity, bool, BaseTransactionProcessor)
    BaseTransactionProcessor.ProcessCorrect(ITransactionalEntity, TransactionStatus, BaseTransactionProcessor)
    BaseTransactionProcessor.UpdateCalculatedProperties(ITransactionalEntity)
    BaseTransactionProcessor.UpdateFinacialDate(ITransactionalEntity)
    BaseTransactionProcessor.UpdateCommonProperties()
    BaseTransactionProcessor.UpdateCommonProperties(IHeaderTransactionalEntity, ITransactionalEntity)
    BaseTransactionProcessor.UpdateAllStatuses(IHeaderTransactionalEntity)
    BaseTransactionProcessor.Dispose(bool)
    BaseTransactionProcessor.DisposeUnManagedState()
    BaseTransactionProcessor.Dispose()
    BaseTransactionProcessor.Services
    BaseTransactionProcessor.FinancialDateCalculator
    BaseTransactionProcessor.CancelledItems
    BaseTransactionProcessor.CorrectedItems
    BaseTransactionProcessor.RootCorrectedEntity
    BaseTransactionProcessor.RootCancelledEntity
    BaseTransactionProcessor.CanCancel
    BaseTransactionProcessor.CommitToFinalizeRequiresTask
    BaseTransactionProcessor.Reporter
    BaseTransactionProcessor.Updater
    BaseTransactionProcessor.Cache
    BaseTransactionProcessor.User
    BaseTransactionProcessor.IgnoreEvents
    BaseTransactionProcessor.Order
    BaseTransactionProcessor.SaveProcessed
    BaseTransactionProcessor.CanLock
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.API.Core.FinancialServices.Processors.Transactional
    Assembly: LemonEdge.API.Core.FinancialServices.dll
    Syntax
    [ServerTask("Recalculate Split Transaction", "D59BA82B-3E8F-42BC-BD98-BE68E4B5595A", typeof(SplitProcessParameter), DefaultForHasSaveProcessingTask = typeof(ISplitTransaction))]
    public class SplitTransactionProcessor : BaseTransactionProcessor, ICanBeRevertedTransactionProcessor, ISplitTransactionProcessor, IBaseDataSetProcessorWithDBSave, IBaseDataSetProcessor, ITaskProcessor, IProcessor, IDisposable, ILockable

    Constructors

    SplitTransactionProcessor(IEntityUpdater, IReadOnlyCache, UserInfo, IServiceContext, IPathSplitIdProvider, IRuleAmountUpdaterFactory)

    Declaration
    public SplitTransactionProcessor(IEntityUpdater updater, IReadOnlyCache cache, UserInfo user, IServiceContext services, IPathSplitIdProvider pathSplitProvider, IRuleAmountUpdaterFactory ruleAmountUpdaterFactory)
    Parameters
    Type Name Description
    IEntityUpdater updater
    IReadOnlyCache cache
    UserInfo user
    IServiceContext services
    IPathSplitIdProvider pathSplitProvider
    IRuleAmountUpdaterFactory ruleAmountUpdaterFactory

    SplitTransactionProcessor(IServiceContext)

    Declaration
    public SplitTransactionProcessor(IServiceContext services)
    Parameters
    Type Name Description
    IServiceContext services

    Fields

    AUTO_BLEND_TRANSACTION_DESC_PREFIX

    Declaration
    public const string AUTO_BLEND_TRANSACTION_DESC_PREFIX = "Auto: "
    Field Value
    Type Description
    string

    Properties

    AnyChangeRequiresTaskRecalc

    If this root transaction item implements IHasSaveProcessingTask then the system will automatically create a task for any existing SavedTaskParam configured for the root transaction

    It will modify this task if performing a cancel, cancel/correct or moving to finalized depending on CommitToFinalizeRequiresTask

    This indicates that any normal change not against this root entity should not result in it recreating a task stored against SavedTaskParam. By default this is false so it only recreates the task when the root item itself has changed and thus SavedTaskParam will have too.
    Declaration
    protected override bool AnyChangeRequiresTaskRecalc { get; }
    Property Value
    Type Description
    bool
    Overrides
    BaseTransactionProcessor.AnyChangeRequiresTaskRecalc

    Lines

    The set of lines for dictating how to split the transaction

    Declaration
    public IEnumerable<ISplitTransactionLine> Lines { get; }
    Property Value
    Type Description
    IEnumerable<ISplitTransactionLine>

    Loaded

    Flag to indicate if the processor has been fully loaded

    Declaration
    public override bool Loaded { get; }
    Property Value
    Type Description
    bool
    Overrides
    BaseTransactionProcessor.Loaded

    RootTransactionEntity

    The root transaction entity for this transaction processor

    Declaration
    public override IHeaderTransactionalEntity RootTransactionEntity { get; }
    Property Value
    Type Description
    IHeaderTransactionalEntity
    Overrides
    BaseTransactionProcessor.RootTransactionEntity

    SourceTransactionProcessor

    The processor for the source transaction

    Declaration
    public ITransactionProcessor SourceTransactionProcessor { get; }
    Property Value
    Type Description
    ITransactionProcessor

    SplitTransaction

    The split transaction that is being processed by this processor

    Declaration
    public ISplitTransaction SplitTransaction { get; }
    Property Value
    Type Description
    ISplitTransaction

    SplitTransactionsProccessor

    The transaction processor for the split transactions

    Declaration
    public ITransactionProcessor SplitTransactionsProccessor { get; }
    Property Value
    Type Description
    ITransactionProcessor

    SubProcessors

    An enumeration of all sub processors for this processor

    For instance the IBlendTransactionProcessor will have sub processors for processing each transaction it creates

    Declaration
    public override IEnumerable<BaseTransactionProcessor> SubProcessors { get; }
    Property Value
    Type Description
    IEnumerable<BaseTransactionProcessor>
    Overrides
    BaseTransactionProcessor.SubProcessors

    Switches

    Declaration
    public IEnumerable<ISplitTransactionSwitch> Switches { get; }
    Property Value
    Type Description
    IEnumerable<ISplitTransactionSwitch>

    Methods

    AddToDataSetToProcess(IBaseEntity, EntityOperation)

    If a modified item belongs in the processor (IsChangedItemPartOfDataSet(IBaseEntity)), this adds the item to the processor if it already isn't a member of it

    Declaration
    public override void AddToDataSetToProcess(IBaseEntity item, EntityOperation operationType)
    Parameters
    Type Name Description
    IBaseEntity item

    The item to add to the processor

    EntityOperation operationType

    The type of operation that modified the item. Useful as deleted items can often be treated differently in a processor.

    Overrides
    BaseTransactionProcessor.AddToDataSetToProcess(IBaseEntity, EntityOperation)

    Calculate()

    Declaration
    public Task Calculate()
    Returns
    Type Description
    Task

    CanWrite(IBaseEntity)

    Indicates if the processor allows items to be written to depending on the users permission and transaction status

    Declaration
    public override bool CanWrite(IBaseEntity baseEntity)
    Parameters
    Type Name Description
    IBaseEntity baseEntity
    Returns
    Type Description
    bool
    Overrides
    BaseTransactionProcessor.CanWrite(IBaseEntity)

    DisposeManagedState()

    Declaration
    protected override void DisposeManagedState()
    Overrides
    BaseTransactionProcessor.DisposeManagedState()

    GetAllItemsInThisProcessorExcludingSubProcessors()

    Returns all items in this base processor - Used by the system when reverting the status of a finalized transaction back to in progress

    Declaration
    public override IEnumerable<IBaseEntity> GetAllItemsInThisProcessorExcludingSubProcessors()
    Returns
    Type Description
    IEnumerable<IBaseEntity>

    An enumeration of all items in this transactional processor

    Overrides
    BaseTransactionProcessor.GetAllItemsInThisProcessorExcludingSubProcessors()

    GetAllPaths()

    Declaration
    public Task<IEnumerable<IAllocationPath>> GetAllPaths()
    Returns
    Type Description
    Task<IEnumerable<IAllocationPath>>

    GetSplitQueryPaths(SQLWrapperExecuter)

    Declaration
    public Task<IEnumerable<IAllocationPath>> GetSplitQueryPaths(SQLWrapperExecuter queryExecutor)
    Parameters
    Type Name Description
    SQLWrapperExecuter queryExecutor
    Returns
    Type Description
    Task<IEnumerable<IAllocationPath>>

    GetSplitQueryWithReprocessedPaths()

    Declaration
    public Task<SQLWrapperExecuter> GetSplitQueryWithReprocessedPaths()
    Returns
    Type Description
    Task<SQLWrapperExecuter>

    GetTransactionInfo(ITransaction)

    Declaration
    public static (bool IsTransferTransactionType, Guid TrnsactionSourceID) GetTransactionInfo(ITransaction splitTransaction)
    Parameters
    Type Name Description
    ITransaction splitTransaction
    Returns
    Type Description
    (bool IsTransferTransactionType, Guid TrnsactionSourceID)

    Init(ITaskRunner, ServerTaskParameter)

    Initializes the task processor with the parameters for processing the task

    Declaration
    public Task Init(ITaskRunner runner, ServerTaskParameter ProcessTaskParameter)
    Parameters
    Type Name Description
    ITaskRunner runner

    The context within which the task is being processed

    ServerTaskParameter ProcessTaskParameter

    The parameter for running this task

    Returns
    Type Description
    Task

    A task indicating the completion of the operationn

    IsChangedItemPartOfDataSet(IBaseEntity)

    This function returns true if the specified modified item belongs in this processor.

    Non modified items will just automatically be loaded by the processor anyway, this is more to keep track of items as they are changed and should be added to the processor without having to reload

    Declaration
    public override bool IsChangedItemPartOfDataSet(IBaseEntity item)
    Parameters
    Type Name Description
    IBaseEntity item

    The item to check if it belongs in this processor

    Returns
    Type Description
    bool

    True if the specified item belongs in this processor

    Overrides
    BaseTransactionProcessor.IsChangedItemPartOfDataSet(IBaseEntity)

    IsLocked(IBaseEntity)

    Indicates if this item is currently locked. True if status is finalized or cancelled. Can be changed by the user in the UI to modify finalized transactions which this will process as a cancel/correct

    Declaration
    public override bool IsLocked(IBaseEntity baseEntity)
    Parameters
    Type Name Description
    IBaseEntity baseEntity
    Returns
    Type Description
    bool

    true if it can be unlocked to enable updates, otherwise false

    Overrides
    BaseTransactionProcessor.IsLocked(IBaseEntity)

    KeepTransactionDateConsistent()

    Declaration
    protected override bool KeepTransactionDateConsistent()
    Returns
    Type Description
    bool
    Overrides
    BaseTransactionProcessor.KeepTransactionDateConsistent()

    Load()

    A thread safe implementation to load all required data for the processor

    Once completed Loaded should return true.

    Declaration
    public override Task Load()
    Returns
    Type Description
    Task

    A task indicating the completion of the load operation

    Overrides
    BaseTransactionProcessor.Load()

    ProcessTask(CancellationToken)

    A function that implements the process for this task using the parameters provided during Init(ITaskRunner, ServerTaskParameter)

    Declaration
    public Task<object> ProcessTask(CancellationToken cancel)
    Parameters
    Type Name Description
    CancellationToken cancel

    A cancellation token for cancelling any long running task

    Returns
    Type Description
    Task<object>

    An optional object detailing the result which can be converted using ITaskResultHandler into a ServerTaskResult, or is a ServerTaskResult itself

    RegisterDeleteLine(ISplitTransactionLine)

    registers removing a transaction line

    Declaration
    public void RegisterDeleteLine(ISplitTransactionLine line)
    Parameters
    Type Name Description
    ISplitTransactionLine line

    RegisterDeleteSwitch(ISplitTransactionSwitch)

    Declaration
    public void RegisterDeleteSwitch(ISplitTransactionSwitch splitSwitch)
    Parameters
    Type Name Description
    ISplitTransactionSwitch splitSwitch

    RegisterNewLine(ISplitTransactionLine)

    Registers a new split transaction line

    Declaration
    public void RegisterNewLine(ISplitTransactionLine line)
    Parameters
    Type Name Description
    ISplitTransactionLine line

    RegisterNewSwitch(ISplitTransactionSwitch)

    Declaration
    public void RegisterNewSwitch(ISplitTransactionSwitch splitSwitch)
    Parameters
    Type Name Description
    ISplitTransactionSwitch splitSwitch

    SetLock(IBaseEntity, bool)

    Sets the locked status IBaseEntity

    Declaration
    public override void SetLock(IBaseEntity baseEntity, bool value)
    Parameters
    Type Name Description
    IBaseEntity baseEntity
    bool value
    Overrides
    BaseTransactionProcessor.SetLock(IBaseEntity, bool)

    Validate()

    Performs custom validation to validate this processor and all transactional entities within it

    Throws an error for any validation failure

    Declaration
    public override Task Validate()
    Returns
    Type Description
    Task

    A task indicating the completion of this operation

    Overrides
    BaseTransactionProcessor.Validate()

    Implements

    ICanBeRevertedTransactionProcessor
    ISplitTransactionProcessor
    IBaseDataSetProcessorWithDBSave
    IBaseDataSetProcessor
    ITaskProcessor
    IProcessor
    IDisposable
    ILockable

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.