Interface IEntityDescriptorImportExtender
Represents a class that can be used for assisting with importing data into a specified entity type
By default the system automatically handles importing an entity through the property names and values from a
data source (such as a file) through our data integration and mapping tools.
However you can extend this behaviour to be able to import from other property names that are not actually
properties on the entity, or even to perform custom actions
Assembly: LemonEdge.API.dll
Syntax
public interface IEntityDescriptorImportExtender
Methods
AllowOpen(IBaseEntity)
Indicates if this item should be allowed to be viewed by the user
Declaration
bool AllowOpen(IBaseEntity item)
Parameters
Returns
GetImportOrder(EntityImportColDefinition)
Indicates the order properties should be updated in. Required if properties need to be set before other properties
can be updated.
Declaration
short GetImportOrder(EntityImportColDefinition col)
Parameters
Returns
GetValue(string)
Returns the value of the specified property
Declaration
object GetValue(string propName)
Parameters
Type |
Name |
Description |
string |
propName |
|
Returns
Init(IReadOnlyCache, UserInfo, Dictionary<string, Guid>)
Called when extender is created to initialize with cached items
Declaration
Task Init(IReadOnlyCache cache, UserInfo user, Dictionary<string, Guid> importedContextItemCache)
Parameters
Returns
OnContextChange(IEntityUpdater, IBaseEntity, (bool Loaded, bool SetToNull, bool Ignore, object Value)[], Func<string, int>)
Called whenever the item being imported is created/updated.
Alternatively called whenever SetValue returns true, indicating some property of the imported item has changed
requiring the context to be reloaded
Declaration
Task OnContextChange(IEntityUpdater updater, IBaseEntity item, (bool Loaded, bool SetToNull, bool Ignore, object Value)[] currentValues, Func<string, int> getCurrentValueIndexFromHeaderName)
Parameters
Returns
SetValue(string, object)
Sets the specified property on the item. returns true if the context needs updating.
Declaration
Task<bool> SetValue(string propName, object propValue)
Parameters
Returns
Extension Methods