Skip to content

Commit 48ea5fe

Browse files
authored
Improved fully qualified references to code in the Schema and System namespaces (#712)
* Moved the existing name-shadowing classes in the extra-tests directory to be in separate subdirectories (one for each namespace, Schema and System) - There's just so many of them now! * Added name-shadowing classes for several standard classes in the Schema and System namespaces & switched to using fully-qualified references for these classes: - Schema.ApexClass - Schema.ApexEmailNotification - Schema.ApexTrigger - Schema.AsyncApexJob - Schema.BatchApexErrorEvent - Schema.CustomPermission - Schema.DisplayType - Schema.FlowDefinitionView - Schema.FlowExecutionErrorEvent - Schema.FlowVersionView - Schema.PermissionSet - Schema.PermissionSetAssignment - Schema.SoapType - Schema.UserRecordAccess - Schema.UserRole - System.BatchableContext - System.Comparable - System.Database - System.EventBus - System.FinalizerContext - System.InstallHandler - System.JSON - System.Matcher - System.Pattern - System.PicklistEntry - System.Queueable - System.QueueableContext - System.Quiddity - System.Request - System.RestContext - System.RestRequest - System.RestResponse - System.Schedulable - System.SchedulableContext - System.Search - System.TriggerOperation - System.UUID * Scope creep: fixed some flaky tests in LogBatchPurgeController_Tests
1 parent c586ce1 commit 48ea5fe

232 files changed

Lines changed: 1583 additions & 903 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

66
The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.
77

8-
## Unlocked Package - v4.13.12
8+
## Unlocked Package - v4.13.13
99

10-
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oCkQAI)
11-
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oCkQAI)
10+
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oDsQAI)
11+
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oDsQAI)
1212
[![View Documentation](./images/btn-view-documentation.png)](https://jongpie.github.io/NebulaLogger/)
1313

14-
`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oCkQAI`
14+
`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oDsQAI`
1515

16-
`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000015oCkQAI`
16+
`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000015oDsQAI`
1717

1818
---
1919

docs/apex/Configuration/LoggerParameter.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ The name of the Platform Cache partition to use for caching (when platform cache
4848

4949
#### `QUERY_APEX_CLASS_DATA``Boolean`
5050

51-
Controls if Nebula Logger queries `ApexClass` data. When set to `false`, any `ApexClass` fields on `LogEntryEvent__e` and `Log__c` will not be populated Controlled by the custom metadata record `LoggerParameter.QueryApexClassData`, or `true` as the default
51+
Controls if Nebula Logger queries `Schema.ApexClass` data. When set to `false`, any `Schema.ApexClass` fields on `LogEntryEvent__e` and `Log__c` will not be populated Controlled by the custom metadata record `LoggerParameter.QueryApexClassData`, or `true` as the default
5252

5353
#### `QUERY_APEX_TRIGGER_DATA``Boolean`
5454

55-
Controls if Nebula Logger queries `ApexTrigger` data. When set to `false`, any `ApexTrigger` fields on `LogEntryEvent__e` and `Log__c` will not be populated Controlled by the custom metadata record `LoggerParameter.QueryApexTriggerData`, or `true` as the default
55+
Controls if Nebula Logger queries `Schema.ApexTrigger` data. When set to `false`, any `Schema.ApexTrigger` fields on `LogEntryEvent__e` and `Log__c` will not be populated Controlled by the custom metadata record `LoggerParameter.QueryApexTriggerData`, or `true` as the default
5656

5757
#### `QUERY_AUTH_SESSION_DATA``Boolean`
5858

@@ -64,7 +64,7 @@ Controls if Nebula Logger queries `Schema.AuthSession` data synchronously &
6464

6565
#### `QUERY_FLOW_DEFINITION_VIEW_DATA``Boolean`
6666

67-
Controls if Nebula Logger queries `FlowDefinitionView` data. When set to `false`, any `FlowDefinitionView` fields on `LogEntryEvent__e` and `Log__c` will not be populated Controlled by the custom metadata record `LoggerParameter.QueryFlowDefinitionViewData`, or `true` as the default
67+
Controls if Nebula Logger queries `Schema.FlowDefinitionView` data. When set to `false`, any `Schema.FlowDefinitionView` fields on `LogEntryEvent__e` and `Log__c` will not be populated Controlled by the custom metadata record `LoggerParameter.QueryFlowDefinitionViewData`, or `true` as the default
6868

6969
#### `QUERY_NETWORK_DATA``Boolean`
7070

@@ -102,6 +102,10 @@ Indicates if Nebula Logger will enforce scenario-based logging to be used. When
102102

103103
Indicates if Nebula Logger will send an error email notification if any internal exceptions occur. Controlled by the custom metadata record `LoggerParameter.SendErrorEmailNotifications`, or `true` as the default
104104

105+
#### `STORE_HEAP_SIZE_LIMIT``Boolean`
106+
107+
Indicates if Nebula Logger will store the transaction heap limits on `LogEntry__c`, retrieved from the class `System.Limits`. Controlled by the custom metadata record `LoggerParameter.StoreApexHeapSizeLimit`, or `true` as the default. Relies on `LoggerParameter.StoreTransactionLimits` to be true, as well.
108+
105109
#### `STORE_HTTP_RESPONSE_HEADER_VALUES``Boolean`
106110

107111
Indicates if Nebula Logger will store the header values when logging an instance of `System.HttpResponse`. Controlled by the custom metadata record `LoggerParameter.StoreHttpResponseHeaderValues`, or `true` as the default. Regardless of how this parameter is configured, Nebula Logger will still log the header keys of any instance of `System.HttpResponse` that is logged - this parameter only controls if the header values are stored.

docs/apex/Configuration/LoggerTriggerableContext.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Class used by the logging system for trigger contextual details
1616

1717
### Constructors
1818

19-
#### `LoggerTriggerableContext(Schema.SObjectType sobjectType, TriggerOperation triggerOperationType, List<SObject> triggerNew)`
19+
#### `LoggerTriggerableContext(Schema.SObjectType sobjectType, System.TriggerOperation triggerOperationType, List<SObject> triggerNew)`
2020

21-
#### `LoggerTriggerableContext(Schema.SObjectType sobjectType,TriggerOperation triggerOperationType,List<SObject> triggerNew,Map<Id, SObject> triggerNewMap,Map<Id, SObject> triggerOldMap)`
21+
#### `LoggerTriggerableContext(Schema.SObjectType sobjectType,System.TriggerOperation triggerOperationType,List<SObject> triggerNew,Map<Id, SObject> triggerNewMap,Map<Id, SObject> triggerOldMap)`
2222

2323
---
2424

@@ -34,7 +34,7 @@ Class used by the logging system for trigger contextual details
3434

3535
#### `triggerOldMap``Map<Id, SObject>`
3636

37-
#### `triggerOperationType``TriggerOperation`
37+
#### `triggerOperationType``System.TriggerOperation`
3838

3939
#### `triggerOperationTypeName``String`
4040

docs/apex/Log-Management/LogBatchPurgeController.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ Boolean
2424

2525
true if the current user has delete permission on the Log\_\_c object.
2626

27-
#### `getBatchPurgeJobRecords()``List<AsyncApexJob>`
27+
#### `getBatchPurgeJobRecords()``List<Schema.AsyncApexJob>`
2828

29-
Returns `List&lt;AsyncApexJob&gt;` to display logBatchPurger jobs details in a Datatable.
29+
Returns `List&lt;Schema.AsyncApexJob&gt;` to display logBatchPurger jobs details in a Datatable.
3030

3131
##### Return
3232

3333
**Type**
3434

35-
List&lt;AsyncApexJob&gt;
35+
List&lt;Schema.AsyncApexJob&gt;
3636

3737
**Description**
3838

39-
The instance of `List&lt;AsyncApexJob&gt;`, containing list of logBatchPurge jobs.
39+
The instance of `List&lt;Schema.AsyncApexJob&gt;`, containing list of logBatchPurge jobs.
4040

4141
#### `getMetrics(String dateFilterOption)``Map<String, Object>`
4242

@@ -84,7 +84,7 @@ String
8484

8585
**Description**
8686

87-
Returns the ID of the AsyncApexJob object associated with the LogBatchPurger job as a string
87+
Returns the ID of the Schema.AsyncApexJob object associated with the LogBatchPurger job as a string
8888

8989
---
9090

docs/apex/Log-Management/LogManagementDataSelector.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ List&lt;SObject&gt;
3131

3232
`List&lt;SObject&gt;` containing any records in the specified `SObjectType`
3333

34-
#### `getApexClasses(Set<String> apexClassNames)``List<ApexClass>`
34+
#### `getApexClasses(Set<String> apexClassNames)``List<Schema.ApexClass>`
3535

36-
Returns a list of `ApexClass` records
36+
Returns a list of `Schema.ApexClass` records
3737

3838
##### Parameters
3939

@@ -45,15 +45,15 @@ Returns a list of `ApexClass` records
4545

4646
**Type**
4747

48-
List&lt;ApexClass&gt;
48+
List&lt;Schema.ApexClass&gt;
4949

5050
**Description**
5151

52-
`List&lt;ApexClass&gt;` containing any matching records
52+
`List&lt;Schema.ApexClass&gt;` containing any matching records
5353

54-
#### `getApexTriggers(Set<String> apexTriggerNames)``List<ApexTrigger>`
54+
#### `getApexTriggers(Set<String> apexTriggerNames)``List<Schema.ApexTrigger>`
5555

56-
Returns a list of `ApexTrigger` records
56+
Returns a list of `Schema.ApexTrigger` records
5757

5858
##### Parameters
5959

@@ -65,11 +65,11 @@ Returns a list of `ApexTrigger` records
6565

6666
**Type**
6767

68-
List&lt;ApexTrigger&gt;
68+
List&lt;Schema.ApexTrigger&gt;
6969

7070
**Description**
7171

72-
`List&lt;ApexTrigger&gt;` containing any matching records
72+
`List&lt;Schema.ApexTrigger&gt;` containing any matching records
7373

7474
#### `getById(Schema.SObjectType sobjectType, Set<String> fieldNames, List<Id> recordIds)``List<SObject>`
7575

@@ -93,19 +93,19 @@ List&lt;SObject&gt;
9393

9494
`List&lt;SObject&gt;` containing any matching records in the specified `SObjectType`
9595

96-
#### `getCachedApexEmailNotifications()``List<ApexEmailNotification>`
96+
#### `getCachedApexEmailNotifications()``List<Schema.ApexEmailNotification>`
9797

98-
Returns a cached copy of the `ApexEmailNotification` records in the org
98+
Returns a cached copy of the `Schema.ApexEmailNotification` records in the org
9999

100100
##### Return
101101

102102
**Type**
103103

104-
List&lt;ApexEmailNotification&gt;
104+
List&lt;Schema.ApexEmailNotification&gt;
105105

106106
**Description**
107107

108-
The cached `List&lt;ApexEmailNotification&gt;` records
108+
The cached `List&lt;Schema.ApexEmailNotification&gt;` records
109109

110110
#### `getCachedRecentLogWithApiReleaseDetails()``Log__c`
111111

@@ -123,15 +123,15 @@ The cached `Log__c` record, or `null` if no match is found
123123

124124
#### `getCountOfAsyncApexJobs(String apexClassName, String apexMethodName, List<String> jobStatuses)``Integer`
125125

126-
Returns the count of `AsyncApexJob` records with the specified Apex class name, method name &amp; job status
126+
Returns the count of `Schema.AsyncApexJob` records with the specified Apex class name, method name &amp; job status
127127

128128
##### Parameters
129129

130-
| Param | Description |
131-
| ---------------- | --------------------------------------------------------------------------------- |
132-
| `apexClassName` | The fully-qualified name of the Apex class associated with `AsyncApexJob` |
133-
| `apexMethodName` | The specific method (if any) within the Apex class associated with `AsyncApexJob` |
134-
| `jobStatuses` | The list of job statuses that should be used to filter `AsynxApexJob` records |
130+
| Param | Description |
131+
| ---------------- | ---------------------------------------------------------------------------------------- |
132+
| `apexClassName` | The fully-qualified name of the Apex class associated with `Schema.AsyncApexJob` |
133+
| `apexMethodName` | The specific method (if any) within the Apex class associated with `Schema.AsyncApexJob` |
134+
| `jobStatuses` | The list of job statuses that should be used to filter `AsynxApexJob` records |
135135

136136
##### Return
137137

@@ -163,9 +163,9 @@ Integer
163163

164164
The `Integer` count of matching `LogEntry__c` records
165165

166-
#### `getDeleteableUserRecordAccess(List<Id> recordIds)``List<UserRecordAccess>`
166+
#### `getDeleteableUserRecordAccess(List<Id> recordIds)``List<Schema.UserRecordAccess>`
167167

168-
Returns the list of `UserRecordAccess` records for any of the specified record IDs that the current user can delete
168+
Returns the list of `Schema.UserRecordAccess` records for any of the specified record IDs that the current user can delete
169169

170170
##### Parameters
171171

@@ -177,15 +177,15 @@ Returns the list of `UserRecordAccess` records for any of the specified record I
177177

178178
**Type**
179179

180-
List&lt;UserRecordAccess&gt;
180+
List&lt;Schema.UserRecordAccess&gt;
181181

182182
**Description**
183183

184-
The matching `List&lt;UserRecordAccess&gt;` records
184+
The matching `List&lt;Schema.UserRecordAccess&gt;` records
185185

186-
#### `getFlowDefinitionViewsByFlowApiName(List<String> flowApiNames)``List<FlowDefinitionView>`
186+
#### `getFlowDefinitionViewsByFlowApiName(List<String> flowApiNames)``List<Schema.FlowDefinitionView>`
187187

188-
Returns a list of `FlowDefinitionView` records
188+
Returns a list of `Schema.FlowDefinitionView` records
189189

190190
##### Parameters
191191

@@ -197,15 +197,15 @@ Returns a list of `FlowDefinitionView` records
197197

198198
**Type**
199199

200-
List&lt;FlowDefinitionView&gt;
200+
List&lt;Schema.FlowDefinitionView&gt;
201201

202202
**Description**
203203

204-
`List&lt;FlowDefinitionView&gt;` containing any matching records
204+
`List&lt;Schema.FlowDefinitionView&gt;` containing any matching records
205205

206-
#### `getFlowVersionViewsByDurableId(List<String> durableIds)``List<FlowVersionView>`
206+
#### `getFlowVersionViewsByDurableId(List<String> durableIds)``List<Schema.FlowVersionView>`
207207

208-
Returns a list of `FlowVersionView` records description
208+
Returns a list of `Schema.FlowVersionView` records description
209209

210210
##### Parameters
211211

@@ -217,11 +217,11 @@ Returns a list of `FlowVersionView` records description
217217

218218
**Type**
219219

220-
List&lt;FlowVersionView&gt;
220+
List&lt;Schema.FlowVersionView&gt;
221221

222222
**Description**
223223

224-
`List&lt;FlowDefinitionView&gt;` containing any matching records
224+
`List&lt;Schema.FlowDefinitionView&gt;` containing any matching records
225225

226226
#### `getInstance()``LogManagementDataSelector`
227227

docs/apex/Log-Management/LoggerSettingsController.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Inner class used for sorting LoggerSettings\_\_c, used for 3 reasons: 1. Trying
185185

186186
###### `compareTo(Object compareTo)``Integer`
187187

188-
Implements sorting logic for the `Comparable` interface
188+
Implements sorting logic for the `System.Comparable` interface
189189

190190
####### Parameters
191191

0 commit comments

Comments
 (0)