EventService: refactoring

This commit is contained in:
Eric Espie
2022-03-15 17:50:13 +01:00
parent 5b52ca4776
commit 29c6b73d93
30 changed files with 914 additions and 889 deletions

View File

@@ -11,6 +11,224 @@
</profile>
</profiles>
</user_rights>
<events>
<event id="BeforeInsert" _delta="define">
<description>An object is about to be inserted in the database</description>
<replaces>DBObject::OnInsert</replaces>
<arguments>
<argument id="object">
<description>The object inserted</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="DBObjectKeyReady" _delta="define">
<description>A key (id) has been generated for an object inserted into the database (use GetKey() to read the new key)</description>
<replaces>DBObject::OnObjectKeyReady</replaces>
<arguments>
<argument id="object">
<description>The object inserted</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="AfterInsert" _delta="define">
<description>An object has been inserted into the database</description>
<replaces>DBObject::AfterInsert</replaces>
<arguments>
<argument id="object">
<description>The object inserted</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="BeforeUpdate" _delta="define">
<description>An object is about to be updated in the database</description>
<replaces>DBObject::OnUpdate</replaces>
<arguments>
<argument id="object">
<description>The object updated</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="AfterUpdate" _delta="define">
<description>An object has been updated into the database</description>
<replaces>DBObject::AfterUpdate</replaces>
<arguments>
<argument id="object">
<description>The object updated</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="BeforeDelete" _delta="define">
<description>An object is about to be deleted in the database</description>
<replaces>DBObject::OnDelete</replaces>
<arguments>
<argument id="object">
<description>The object deleted</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="AfterDelete" _delta="define">
<description>An object has been deleted into the database</description>
<replaces>DBObject::AfterDelete</replaces>
<arguments>
<argument id="object">
<description>The object deleted</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="BeforeApplyStimulus" _delta="define">
<description>A stimulus is about to be applied to an object</description>
<arguments>
<argument id="object">
<description>The object where the stimulus is to be applied</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="AfterApplyStimulus" _delta="define">
<description>A stimulus has been applied to an object</description>
<arguments>
<argument id="object">
<description>The object where the stimulus has been applied</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="DBObjectLoaded" _delta="define">
<description>An object has been loaded from the database</description>
<arguments>
<argument id="object">
<description>The object loaded</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="DBObjectNew" _delta="define">
<description>An object has been created in memory</description>
<arguments>
<argument id="object">
<description>The object created</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="DBObjectReload" _delta="define">
<description>An object has been re-loaded from the database</description>
<arguments>
<argument id="object">
<description>The object re-loaded</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="OnCheckToWrite" _delta="define">
<description>Check an object before it is written into the database</description>
<replaces>cmdbAbstractObject::DoCheckToWrite</replaces>
<arguments>
<argument id="object">
<description>The object to check</description>
<type>DBObject</type>
</argument>
<argument id="error_messages">
<description>Array of strings where all the errors found during the object checking are added</description>
<type>array</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="DoCheckToDelete" _delta="define">
<description>Check an object before it is deleted from the database</description>
<replaces>cmdbAbstractObject::DoCheckToDelete</replaces>
<arguments>
<argument id="object">
<description>The object to check</description>
<type>DBObject</type>
</argument>
<argument id="error_messages">
<description>Array of strings where all the errors found during the object checking are added</description>
<type>array</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="DownloadDocument" _delta="define">
<description>A document has been downloaded from the GUI</description>
<arguments>
<argument id="object">
<description>The object containing the document</description>
<type>DBObject</type>
</argument>
<argument id="document">
<description>The document downloaded</description>
<type>ormDocument</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
</events>
<meta>
<classes>
<class id="User" _delta="define">
@@ -269,223 +487,5 @@
</fields>
</class>
</classes>
<events>
<event id="BeforeInsert" _delta="define">
<description>An object is about to be inserted in the database</description>
<replaces>DBObject::OnInsert</replaces>
<arguments>
<argument id="object">
<description>The object inserted</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="DBObjectKeyReady" _delta="define">
<description>A key (id) has been generated for an object inserted into the database (use GetKey() to read the new key)</description>
<replaces>DBObject::OnObjectKeyReady</replaces>
<arguments>
<argument id="object">
<description>The object inserted</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="AfterInsert" _delta="define">
<description>An object has been inserted into the database</description>
<replaces>DBObject::AfterInsert</replaces>
<arguments>
<argument id="object">
<description>The object inserted</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="BeforeUpdate" _delta="define">
<description>An object is about to be updated in the database</description>
<replaces>DBObject::OnUpdate</replaces>
<arguments>
<argument id="object">
<description>The object updated</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="AfterUpdate" _delta="define">
<description>An object has been updated into the database</description>
<replaces>DBObject::AfterUpdate</replaces>
<arguments>
<argument id="object">
<description>The object updated</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="BeforeDelete" _delta="define">
<description>An object is about to be deleted in the database</description>
<replaces>DBObject::OnDelete</replaces>
<arguments>
<argument id="object">
<description>The object deleted</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="AfterDelete" _delta="define">
<description>An object has been deleted into the database</description>
<replaces>DBObject::AfterDelete</replaces>
<arguments>
<argument id="object">
<description>The object deleted</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="BeforeApplyStimulus" _delta="define">
<description>A stimulus is about to be applied to an object</description>
<arguments>
<argument id="object">
<description>The object where the stimulus is to be applied</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="AfterApplyStimulus" _delta="define">
<description>A stimulus has been applied to an object</description>
<arguments>
<argument id="object">
<description>The object where the stimulus has been applied</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="DBObjectLoaded" _delta="define">
<description>An object has been loaded from the database</description>
<arguments>
<argument id="object">
<description>The object loaded</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="DBObjectNew" _delta="define">
<description>An object has been created in memory</description>
<arguments>
<argument id="object">
<description>The object created</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="DBObjectReload" _delta="define">
<description>An object has been re-loaded from the database</description>
<arguments>
<argument id="object">
<description>The object re-loaded</description>
<type>DBObject</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="OnCheckToWrite" _delta="define">
<description>Check an object before it is written into the database</description>
<replaces>cmdbAbstractObject::DoCheckToWrite</replaces>
<arguments>
<argument id="object">
<description>The object to check</description>
<type>DBObject</type>
</argument>
<argument id="error_messages">
<description>Array of strings where all the errors found during the object checking are added</description>
<type>array</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="DoCheckToDelete" _delta="define">
<description>Check an object before it is deleted from the database</description>
<replaces>cmdbAbstractObject::DoCheckToDelete</replaces>
<arguments>
<argument id="object">
<description>The object to check</description>
<type>DBObject</type>
</argument>
<argument id="error_messages">
<description>Array of strings where all the errors found during the object checking are added</description>
<type>array</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
<event id="DownloadDocument" _delta="define">
<description>A document has been downloaded from the GUI</description>
<arguments>
<argument id="object">
<description>The object containing the document</description>
<type>DBObject</type>
</argument>
<argument id="document">
<description>The document downloaded</description>
<type>ormDocument</type>
</argument>
<argument id="debug_info">
<description>Debug string</description>
<type>string</type>
</argument>
</arguments>
</event>
</events>
</meta>
</itop_design>