ProductHandler
- Namespace:
PPDS.Migration.Import.Handlers - Assembly:
PPDS.Migration - Kind: Class
- Implements:
IRecordFilter,IStateTransitionHandler
Summary
Handles product records during import. Cascades skip to child products when a parent product fails, and handles state transitions for non-draft products.
Members
Methods
CanHandle
bool CanHandle(string entityLogicalName)
Determines whether this filter applies to the given entity.
-
Param
entityLogicalName: The entity logical name. -
Returns: True if this filter handles the entity.
GetTransition
StateTransitionData GetTransition(Entity record, ImportContext context)
Gets the state transition data for a record, or null if no transition is needed.
-
Param
record: The record to evaluate. -
Param
context: The import context. -
Returns: The state transition data, or null.
ShouldSkip
bool ShouldSkip(Entity record, ImportContext context)
Determines whether the given record should be skipped during import.
-
Param
record: The record to evaluate. -
Param
context: The import context. -
Returns: True if the record should be skipped.
TrackFailure
void TrackFailure(Guid productId)
Tracks a product record that failed during import. This enables cascade-skip for child products that reference this parent.
- Param
productId: The ID of the failed product.