![]() | GenericExportHandlerT, E, I Class |
Namespace: CTExtensions.ExportCore.ExportHandler
public abstract class GenericExportHandler<T, E, I> : EventExtension<T>, IGenericExportHandler where T : CTExtension where E : new(), ExportItem where I : new(), RowItemizer
The GenericExportHandlerT, E, I type exposes the following members.
Name | Description | |
---|---|---|
![]() | GenericExportHandlerT, E, I |
Constuctor.
|
Name | Description | |
---|---|---|
![]() | CurrentExportCase |
This this generic handles supports normal export, export in PDM and silent export,
it's often important to know which case is the current one.
|
![]() | ExportSucceeded |
True if user implementation of Export(ListE) retuned true, or if implementation of SecondPhaseExport(ListE)
returns true.
|
![]() | HandleExport |
A flag that is set to true when user loads an Export Profile bound to this handler.
False otherwise and when user has exited the Export. Used to define whether specific
events should be handled or not.
|
![]() | Itemizer |
RowItemizer that defines which export rows are unique items and which ones are attachments of those unique items.
|
![]() | SilentMode |
True when the export core requests Silent Export.
When this is true, export handling is expected to be
fully automatic and must not have any user interaction.
|
![]() | WriteBackHandler |
Name | Description | |
---|---|---|
![]() | CancelConversionsFromUnaffectedItems |
Checks if items are affected by currently set conversion rules, and if not, set cancelled flag.
|
![]() | CheckWritebackAccessInPrefill | |
![]() | DeserializeSecondPhase |
Deserialize this object and its items.
|
![]() | DiscardExcludedFromBOMItems |
This function discards all excluded from BOM components from items.
It's called after UpdateItemsPreFilling(ListE) but before UpdateItemsPostFilling(ListE).
It's safe to call also during overridden implementation of UpdateItemsPreFilling(ListE) in case
excluded from BOM components can be completely discarded by the implementation.
|
![]() | Export |
User has clicked the Export button, and the items are prepared for the export.
Remember to check the export case using CurrentExportCase and if
SilentMode is set.
|
![]() | FinalizeSecondPhase | |
![]() | GetAdditionalColumnsSetup | |
![]() | GetAdditionalColumnsSetup2 | |
![]() | GetExportProfile |
Getter for current export profile.
|
![]() | GetItemizer |
Getter for loosly typed Itemizer, mostly for internal puposes.
|
![]() | GetParent |
Getter for Parent Extension, mostly for internal puposes.
|
![]() | GetRoots |
Get all non-excluded root items from the last itemized structure.
|
![]() | Hook |
Event subscribtions, called by the framework if T is
inheritant of ExportBaseFIELDSETTINGSTYPE, EXPORTSETTINGSTYPE, PROFILESETTINGSTYPE, USERSETTINGSTYPE and
this extension is provided with GetEventExtensions.
If this event extension is used directly, then also Hook(CTInterface) must be called manually at T's implementation of Hook(CTInterface).
(Overrides EventExtensionHook(CTInterface).) |
![]() | Init |
Initialization, called by the framework if T is
inheritant of ExportBaseFIELDSETTINGSTYPE, EXPORTSETTINGSTYPE, PROFILESETTINGSTYPE, USERSETTINGSTYPE and
this extension is provided with GetEventExtensions.
If this event extension is used directly, then also Init(T) must be called immediately after this class is instantiated.
(Overrides EventExtension.Init``1(UMP).) |
![]() | InitExport |
Initialization of this class for Export procedure, or to disable or handling; depending if the
typename of the given export profile matches the indentifying name of the parent extension.
|
![]() | Log |
Log everything that happends.
|
![]() | ManipulateExportDataBeforeItemization |
Override this function to do anything you like for the data before it's being itemized.
Note that this is invoked for all exported configurations separately.
|
![]() | NeedsSecondsPhase |
Indicates is second phase is required or not. By default it IS needed if we are outside
SW context, the first phase succeeded and any of the items has cached writebacks or has not
cancelled its conversions.
|
![]() | OnCloseCustomStructureDlg |
Resets this class by calling InitExport(ICTExportProfile, Boolean, Boolean, Int64, Int32) with nulls and defaults.
|
![]() | OnPostFileConversion | |
![]() | OnQueryCancelExportConversions | |
![]() | PerformWritebacksWithCheckoutAndCheckin |
Collects all cached writeback requests from the items, requests
write access to each individual file (causes check-out in PDM),
applies the writebacks, and then releases the obtained write accesses
(causes check-in to PDM) and clears cached writebacks.
|
![]() | QueryExportSuccess | |
![]() | RefreshItems | |
![]() | RefreshItems(ListE) | |
![]() | SecondPhaseExport |
This function is called during the second phase Export. At this point
all conversions are done and collected, and writebacks are already done to files. This is mostly desined for
sending converted documents to the target system, however, it is also possible to handle the whole Export Process
silently within this function.
To write addtitional writebacks to files, call PerformWritebacksWithCheckoutAndCheckin(ListE) after
caching the writebacks to items. Note that PerformWritebacksWithCheckoutAndCheckin(ListE) is already
called once during SecondPhaseInitialized(ListE) so if there were writebacks added at the first
export phase, some items might get multiple versions checked-in. You can override SecondPhaseInitialized(ListE)
to not call
/// |
![]() | SecondPhaseInitialized |
Called after deserialization is done and this class and all items have all data
available. Calls PerformWritebacksWithCheckoutAndCheckin(ListE) to write
pending value writebacks as the conversions are performed after this and it might
be important to have updated values visible in converted documents.
|
![]() | SerializeForSecondPhase |
Serialize this object and its Items.
|
![]() | ShowExportDoneMessage | |
![]() | ShowProcessContinuesToSecondPhaseMessage | |
![]() | UnHook |
Event unsubscribtions, called by the framework if T is
inheritant of ExportBaseFIELDSETTINGSTYPE, EXPORTSETTINGSTYPE, PROFILESETTINGSTYPE, USERSETTINGSTYPE and
this extension is provided with GetEventExtensions.
If this event extension is used directly, then also UnHook(CTInterface) must be called manually at T's implementation of UnHook(CTInterface).
(Overrides EventExtensionUnHook(CTInterface).) |
![]() | UpdateItemsPostFilling |
All the same operations should be doable in UpdateItemsPreFilling(ListE), which recommended over this function.
If there for some reason is a need to directly manipulate ListView rows, it can be done here.
|
![]() | UpdateItemsPreFilling |
Do possible queries to target systems to map the items etc.
Supports setting field and bom field values, colors and everything even before
the actual list view items are added to the list.
|
![]() | VerifyFieldHandler |
Name | Description | |
---|---|---|
![]() | mbCollectConvertedDocs |
Flag to collect converted documents for items during export.
|
![]() | mlExporWindowHandle |
Window handle for the Export Dialog
|
![]() | moExportListViews |
Dictinary from source configration to List View in different export tabs.
|
![]() | moExportProfile |
Export profile that is being processed.
|
![]() | moExportProfileDatas |
Dictionary from source configuration to Export Profile data in different export tabs.
|
![]() | moParent |
Parent Extensions that intantiates this Export Handler
|
![]() | moRightClickItems |
Right click menu for items.
The row must be detected as an item (rather than an attachment) to have right click menu.
Dictionary key is the ID, followed by a list of tuples, where Item1 is
the menuitem text than the Item2 is the action to invoke.
|