Class TransferProcessorExtender
The base class implementation for all extenders of the ITransferProcessor.
Each extender is responsible for transferring a specific type of entity. The system ones already transfer IAllocationAmount, ITransactionAllocated, and IGLPostingAllocated
Inheritance
Inherited Members
Namespace: LemonEdge.API.Processors.Transactional
Assembly: API.dll
Syntax
public abstract class TransferProcessorExtender
Constructors
TransferProcessorExtender(ITransferProcessor)
Creates a new transfer processor extender with the specified transfer processor as the parent
Declaration
public TransferProcessorExtender(ITransferProcessor processor)
Parameters
Type | Name | Description |
---|---|---|
ITransferProcessor | processor | The transfer processor this extender is running within |
Properties
ProcessesTransferTypes
The type of item this extender transfers and the order in which it should be transferred
The core system transfers IAllocationAmount, ITransactionAllocated, and IGLPostingAllocated with order 1, 2, and 3 respectively
Custom extenders should start from 10 or aboveDeclaration
public abstract (EntityDescriptor Descriptor, short Order)[] ProcessesTransferTypes { get; }
Property Value
Type | Description |
---|---|
System.ValueTuple<EntityDescriptor, System.Int16>[] |
Processor
The parent transfer processor
Declaration
public ITransferProcessor Processor { get; }
Property Value
Type | Description |
---|---|
ITransferProcessor |
Methods
Init()
Initializes this transfer processor extender
Declaration
public virtual Task Init()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of this operation |
ProcessCancel(ITransactionalEntity, Boolean)
Enumerates all transferred items of the types this extender transfers and allows the extender to perform custom actions for cancelling those items
The BaseTransactionProcessor performs the standard cancel and correction functionality on all ITransactionalEntity
By default this does not do anything custom, but can be used for non transactional items that are transferred such as IAllocationAmount which are just deleted or corrected for cancel/correctsDeclaration
public virtual Task ProcessCancel(ITransactionalEntity cancellingRootItem, bool wasCorrected)
Parameters
Type | Name | Description |
---|---|---|
ITransactionalEntity | cancellingRootItem | The cancelled version of the root transactional entity |
System.Boolean | wasCorrected | Indicates if the original value was also corrected |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of this operation |
ProcessCorrect(ITransactionalEntity)
Enumerates all transferred items of the types this extender transfers and allows the extender to perform custom actions for correcting those items
The BaseTransactionProcessor performs the standard cancel and correction functionality on all ITransactionalEntity
By default this does not do anything custom, but can be used for non transactional items that are transferred such as IAllocationAmount which are just deleted or corrected for cancel/correctsDeclaration
public virtual Task ProcessCorrect(ITransactionalEntity correctingRootItem)
Parameters
Type | Name | Description |
---|---|---|
ITransactionalEntity | correctingRootItem | The corrected version of the root transactional entity |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of this operation |
ProcessItemsToTransfer(EntityDescriptor, DateTimeOffset, DateTimeOffset, AllocationTiming)
Transfers all itemType
records in the system that match the specifed parameters for the parent ITransferProcessor
Declaration
public abstract Task ProcessItemsToTransfer(EntityDescriptor itemType, DateTimeOffset startDate, DateTimeOffset endDate, AllocationTiming timing)
Parameters
Type | Name | Description |
---|---|---|
EntityDescriptor | itemType | The type of entity to transfer. Used if ProcessesTransferTypes contains more than one type of entity |
System.DateTimeOffset | startDate | The TransactionDate of the ITransfer |
System.DateTimeOffset | endDate | |
AllocationTiming | timing | The Timing |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |
Validate()
Runs any custom validation for this extender during the save process
Declaration
public virtual Task Validate()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |