Skip to content

Commit

Permalink
Moved new class LoggerFieldMapper to be part of the configuration lay…
Browse files Browse the repository at this point in the history
…er (instead of the log management layer)

It's only used by the log management layer, but since it (generically) manages field mappings, it's really part of the configuration layer
  • Loading branch information
jongpie committed Jul 7, 2024
1 parent e8eb17e commit 71af08d
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 5 deletions.
24 changes: 24 additions & 0 deletions docs/apex/Configuration/LoggerFieldMapper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
layout: default
---

## LoggerFieldMapper class

Maps fields values from custom fields on `LogEntryEvent__e` to equivalent fields on `Log__c`, `LogEntry__c`, and `LoggerScenario__c`

---

### Methods

#### `mapFieldValues(SObject sourceRecord, SObject targetRecord)``void`

Copies field values from the `sourceRecord` to the `targetRecord`, based on rules configured in `LoggerFieldMapping_t`

##### Parameters

| Param | Description |
| -------------- | ------------------------------------------------------------------------------- |
| `sourceRecord` | The source `SObject` record containing the data to copy |
| `targetRecord` | The target `SObject` record that should have fields & field values appended |

---
8 changes: 4 additions & 4 deletions docs/apex/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@ Controller class for the LWC `logViewer`, used to provided different views on a

Builds and sends email notifications when internal exceptions occur within the logging system

### [LoggerFieldMapper](Log-Management/LoggerFieldMapper)

Maps fields values from custom fields on `LogEntryEvent__e` to equivalent fields on `Log__c`, `LogEntry__c`, and `LoggerScenario__c`

### [LoggerHomeHeaderController](Log-Management/LoggerHomeHeaderController)

Controller class for the LWC `loggerHomeHeader`
Expand Down Expand Up @@ -154,6 +150,10 @@ Class used by the logging system for batch contextual details

Class used to cache query results returned by the selector classes

### [LoggerFieldMapper](Configuration/LoggerFieldMapper)

Maps fields values from custom fields on `LogEntryEvent__e` to equivalent fields on `Log__c`, `LogEntry__c`, and `LoggerScenario__c`

### [LoggerParameter](Configuration/LoggerParameter)

Provides a centralized way to load parameters for SObject handlers & plugins, and casts the parameters to common data types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//------------------------------------------------------------------------------------------------//

/**
* @group Log Management
* @group Configuration
* @description Maps fields values from custom fields on `LogEntryEvent__e`
* to equivalent fields on `Log__c`, `LogEntry__c`, and `LoggerScenario__c`
*/
Expand Down

0 comments on commit 71af08d

Please sign in to comment.