Hermod
A cross-platform, modular and fully GDPR-compliant email archival solution!
|
EmailImporter plugin. More...
Public Member Functions | |||
EmailImporter () | |||
override void | OnConfigChanged (ConfigChangedEventArgs e) | ||
Method that is called when an application-wide configuration has been modified.
| |||
override void | OnConfigLoaded () | ||
Method that is called when the application-wide configurations have been loaded. | |||
override void | OnLoad (IPluginDelegator pluginDelegator) | ||
Method that is called once the plugin has been loaded. This may be used for pre-init purposes.
| |||
override void | OnStart () | ||
Method that is called once Hermod has completed its startup procedures and is ready to run. | |||
override void | OnStop () | ||
Method that is called when Hermod is shutting down. | |||
Public Member Functions inherited from Hermod.PluginFramework.Plugin | |||
Plugin (string pluginName, Version pluginVersion, params ICommand[] commands) | |||
Specialised constructor; allows inheriting classes to set their values immediately. | |||
abstract void | OnLoad (IPluginDelegator pluginDelegator) | ||
Method that is called once the plugin has been loaded. This may be used for pre-init purposes.
| |||
abstract void | OnStart () | ||
Method that is called once Hermod has completed its startup procedures and is ready to run. | |||
abstract void | OnStop () | ||
Method that is called when Hermod is shutting down. | |||
abstract void | OnConfigChanged (ConfigChangedEventArgs e) | ||
Method that is called when an application-wide configuration has been modified.
| |||
abstract void | OnConfigLoaded () | ||
Method that is called when the application-wide configurations have been loaded. | |||
void | OnLoad (IPluginDelegator pluginDelegator) | ||
Method that is called once the plugin has been loaded. This may be used for pre-init purposes. | |||
void | OnStart () | ||
Method that is called once Hermod has completed its startup procedures and is ready to run. | |||
void | OnStop () | ||
Method that is called when Hermod is shutting down. | |||
void | OnConfigChanged (ConfigChangedEventArgs e) | ||
Method that is called when an application-wide configuration has been modified. | |||
void | OnConfigLoaded () | ||
Method that is called when the application-wide configurations have been loaded. | |||
Private Member Functions | |
void | PluginDelegator_MessageReceived (object? sender, MessageReceivedEventArgs e) |
Event handler which is called when a message is received on a topic this plugin subscribed. | |
void | HandleAddDomainMessageReceived (string topic, object? message) |
void | DoWork () |
ICommandResult | Handle_GetDomains (params string[] args) |
ICommandResult | Handle_GetSingleDomain (params string[] args) |
ICommandResult | Handle_AddDomain (params string[] args) |
ICommandResult | Handle_RemoveDomain (params string[] args) |
ICommandResult | Handle_GetUsers (params string[] args) |
ICommandResult | Handle_GetUser (params string[] args) |
ICommandResult | Handle_AddUser (params string[] args) |
ICommandResult | Handle_RemoveUser (params string[] args) |
Private Attributes | |
readonly string[] | m_subscribeTopics |
The topic EmailImport subscribes to when a user is to be removed from a domain. | |
volatile bool | m_keepThreadAlive = false |
DatabaseConnector? | m_dbConnector |
IPluginDelegator? | m_pluginDelegator = null |
Thread? | m_importThread = null |
Static Private Attributes | |
const string | GetDomainTopicAllSuffix = "all" |
const string | AddDomainTopic = "/hermod/domain/add" |
const string | GetDomainTopic = "/hermod/domain/get/+" |
The topic EmailImport subscribes to add a new domain. | |
const string | RemoveDomainTopic = "/hermod/domain/remove/+" |
The topic EmailImport subscribes when another plugin requests a domain. | |
const string | GetDomainResponseTopic = "/hermod/domain/response" |
The topic EmailImport subscribes to when a domain shall be removed. | |
const string | GetDomainUserTopic = "/hermod/user/get" |
The topic EmailImport publishes to when a topic was requested. | |
const string | AddDomainUserTopic = "/hermod/user/add/+" |
The topic EmailImport subscribes to when a user is requested. | |
const string | RemoveDomainUserTopic = "/hermod/user/remove" |
The topic EmailImport subscribes to when a user is to be added to a domain. | |
Additional Inherited Members | |
Properties inherited from Hermod.PluginFramework.Plugin | |
Version | PluginVersion [get, protected set] |
Gets the version of the plugin. | |
string | PluginName [get, protected set] |
Gets the name of the plugin. | |
List< ICommand > | PluginCommands [get, protected set] |
A list of all commands this plugin provides. | |
Properties inherited from Hermod.PluginFramework.IPlugin | |
Version | PluginVersion [get] |
Gets the version of the plugin. | |
string | PluginName [get] |
Gets the name of the plugin. | |
List< ICommand > | PluginCommands [get] |
A list of all commands this plugin provides. | |
EmailImporter plugin.
Definition at line 7 of file EmailImport.MessageHandling.cs.
|
inline |
Definition at line 43 of file EmailImporter.cs.
References Hermod.EmailImport.EmailImporter.Handle_AddDomain(), Hermod.EmailImport.EmailImporter.Handle_AddUser(), Hermod.EmailImport.EmailImporter.Handle_GetDomains(), Hermod.EmailImport.EmailImporter.Handle_GetSingleDomain(), Hermod.EmailImport.EmailImporter.Handle_GetUser(), Hermod.EmailImport.EmailImporter.Handle_GetUsers(), Hermod.EmailImport.EmailImporter.Handle_RemoveDomain(), Hermod.EmailImport.EmailImporter.Handle_RemoveUser(), and Hermod.PluginFramework.Plugin.PluginCommands.
|
inlineprivate |
Definition at line 7 of file EmailImporter.BusinessLogic.cs.
Referenced by Hermod.EmailImport.EmailImporter.OnStart().
|
inlineprivate |
Definition at line 17 of file EmailImporter.CommandHandling.cs.
Referenced by Hermod.EmailImport.EmailImporter.EmailImporter().
|
inlineprivate |
Definition at line 33 of file EmailImporter.CommandHandling.cs.
Referenced by Hermod.EmailImport.EmailImporter.EmailImporter().
|
inlineprivate |
Definition at line 9 of file EmailImporter.CommandHandling.cs.
Referenced by Hermod.EmailImport.EmailImporter.EmailImporter().
|
inlineprivate |
Definition at line 13 of file EmailImporter.CommandHandling.cs.
Referenced by Hermod.EmailImport.EmailImporter.EmailImporter().
|
inlineprivate |
Definition at line 29 of file EmailImporter.CommandHandling.cs.
Referenced by Hermod.EmailImport.EmailImporter.EmailImporter().
|
inlineprivate |
Definition at line 25 of file EmailImporter.CommandHandling.cs.
Referenced by Hermod.EmailImport.EmailImporter.EmailImporter().
|
inlineprivate |
Definition at line 21 of file EmailImporter.CommandHandling.cs.
Referenced by Hermod.EmailImport.EmailImporter.EmailImporter().
|
inlineprivate |
Definition at line 37 of file EmailImporter.CommandHandling.cs.
Referenced by Hermod.EmailImport.EmailImporter.EmailImporter().
|
inlineprivate |
Definition at line 23 of file EmailImport.MessageHandling.cs.
Referenced by Hermod.EmailImport.EmailImporter.PluginDelegator_MessageReceived().
|
inlinevirtual |
Method that is called when an application-wide configuration has been modified.
e | The ConfigChangedEventArgs that are generated when a config was modified. |
Implements Hermod.PluginFramework.Plugin.
Definition at line 102 of file EmailImporter.cs.
|
inlinevirtual |
Method that is called when the application-wide configurations have been loaded.
Implements Hermod.PluginFramework.Plugin.
Definition at line 104 of file EmailImporter.cs.
|
inlinevirtual |
Method that is called once the plugin has been loaded. This may be used for pre-init purposes.
pluginDelegator | The delegator allocated to this plugin. |
Implements Hermod.PluginFramework.Plugin.
Definition at line 106 of file EmailImporter.cs.
References Hermod.Core.Delegation.IPluginDelegator.Debug(), Hermod.EmailImport.Data.JsonDatabaseConnector.GenerateNewAesKey(), Hermod.Core.AppInfo.GetLocalHermodDirectory(), Hermod.Core.Delegation.IPluginDelegator.Information(), Hermod.EmailImport.EmailImporter.m_dbConnector, Hermod.EmailImport.EmailImporter.m_pluginDelegator, Hermod.EmailImport.EmailImporter.m_subscribeTopics, and Hermod.Core.Delegation.IPluginDelegator.SubscribeTopics().
|
inlinevirtual |
Method that is called once Hermod has completed its startup procedures and is ready to run.
Implements Hermod.PluginFramework.Plugin.
Definition at line 162 of file EmailImporter.cs.
References Hermod.EmailImport.EmailImporter.DoWork(), Hermod.EmailImport.EmailImporter.m_importThread, and Hermod.EmailImport.EmailImporter.m_keepThreadAlive.
|
inlinevirtual |
Method that is called when Hermod is shutting down.
Implements Hermod.PluginFramework.Plugin.
Definition at line 168 of file EmailImporter.cs.
References Hermod.Core.Delegation.IPluginDelegator.Information(), Hermod.EmailImport.EmailImporter.m_keepThreadAlive, and Hermod.EmailImport.EmailImporter.m_pluginDelegator.
|
inlineprivate |
Event handler which is called when a message is received on a topic this plugin subscribed.
sender | The IPluginDelegator instance which raised the event. |
e | The message. |
Definition at line 15 of file EmailImport.MessageHandling.cs.
References Hermod.EmailImport.EmailImporter.AddDomainTopic, Hermod.EmailImport.EmailImporter.HandleAddDomainMessageReceived(), Hermod.Core.Delegation.MessageReceivedEventArgs.Message, and Hermod.Core.Delegation.MessageReceivedEventArgs.Topic.
|
staticprivate |
Definition at line 25 of file EmailImporter.cs.
Referenced by Hermod.EmailImport.EmailImporter.PluginDelegator_MessageReceived().
|
staticprivate |
The topic EmailImport subscribes to when a user is requested.
Definition at line 30 of file EmailImporter.cs.
|
staticprivate |
The topic EmailImport subscribes to when a domain shall be removed.
Definition at line 28 of file EmailImporter.cs.
|
staticprivate |
The topic EmailImport subscribes to add a new domain.
Definition at line 26 of file EmailImporter.cs.
|
staticprivate |
Definition at line 24 of file EmailImporter.cs.
|
staticprivate |
The topic EmailImport publishes to when a topic was requested.
Definition at line 29 of file EmailImporter.cs.
|
private |
Definition at line 39 of file EmailImporter.cs.
Referenced by Hermod.EmailImport.EmailImporter.OnLoad().
|
private |
Definition at line 41 of file EmailImporter.cs.
Referenced by Hermod.EmailImport.EmailImporter.OnStart().
|
private |
Definition at line 38 of file EmailImporter.cs.
Referenced by Hermod.EmailImport.EmailImporter.OnStart(), and Hermod.EmailImport.EmailImporter.OnStop().
|
private |
Definition at line 40 of file EmailImporter.cs.
Referenced by Hermod.EmailImport.EmailImporter.OnLoad(), and Hermod.EmailImport.EmailImporter.OnStop().
|
private |
The topic EmailImport subscribes to when a user is to be removed from a domain.
Definition at line 33 of file EmailImporter.cs.
Referenced by Hermod.EmailImport.EmailImporter.OnLoad().
|
staticprivate |
The topic EmailImport subscribes when another plugin requests a domain.
Definition at line 27 of file EmailImporter.cs.
|
staticprivate |
The topic EmailImport subscribes to when a user is to be added to a domain.
Definition at line 31 of file EmailImporter.cs.