Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit f329907

Browse files
authored
Summer '18 Release
* Upgraded all classes to Summer '18 (API v43.0) release * Renamed TriggerHandler.cls to SobjectTriggerHandler.cls and TriggerHandlerSettings__c.object to SobjectTriggerHandlerSettings__c.object * Optimized some of the internals of SobjectTriggerHandler * Added TestDataFactory.cls * Moved example implementation code to a separate folder, sampleUsage
1 parent 4d5ce74 commit f329907

19 files changed

Lines changed: 415 additions & 219 deletions

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
# Apex Trigger Framework
2-
<a target="_blank" href="https://githubsfdeploy.herokuapp.com?owner=jongpie&repo=ApexTriggerFramework">
3-
<img alt="Deploy to Salesforce" src="https://raw.githubusercontent.com/afawcett/githubsfdeploy/master/src/main/webapp/resources/img/deploy.png">
1+
# Nebula Trigger Framework
2+
[![Travis CI](https://img.shields.io/travis/jongpie/NebulaTriggerFramework/master.svg)](https://travis-ci.org/jongpie/NebulaTriggerFramework)
3+
4+
<a href="https://githubsfdeploy.herokuapp.com" target="_blank">
5+
<img alt="Deploy to Salesforce" src="https://raw.githubusercontent.com/afawcett/githubsfdeploy/master/deploy.png">
46
</a>
57

68
## Features
79
* Implements Salesforce best practices of 1 trigger per object & logicless triggers
8-
* The abstract class TriggerHandler.cls handles determining the current context and calling 1 of 7 protected methods - triggers only have to call the public execute() method
10+
* The abstract class SobjectTriggerHandler.cls handles determining the current context and calling 1 of 7 protected methods - triggers only have to call the public execute() method
911
* Provides recursion detection/prevention by checking the list of trigger records have already been processed
1012
* Allows triggers to be enabled/disabled both globally and individually at the org, profile and user levels (hierarchy custom setting)
1113
* Allows framework debug statements to be enabled/disabled
12-
* Recursion prevention: in the event that there is a recursive loop, each handler detects that it has already processed the records and skips duplicated execution
13-
14-
15-
### Example Implementation: LeadTriggerHandler.cls
14+
* Recursion prevention: in the event that there is a recursive loop, each handler detects that it has already processed the records and skips duplicated execution
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>40.0</apiVersion>
3+
<apiVersion>43.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>40.0</apiVersion>
3+
<apiVersion>43.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>

sampleUsage/package.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<types>
4+
<members>*</members>
5+
<name>ApexClass</name>
6+
</types>
7+
<types>
8+
<members>*</members>
9+
<name>ApexTrigger</name>
10+
</types>
11+
<version>43.0</version>
12+
</Package>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ApexTrigger xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>40.0</apiVersion>
3+
<apiVersion>43.0</apiVersion>
44
<status>Active</status>
55
</ApexTrigger>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/********************************************************************************************************
2+
* This file is part of the Nebula Framework project, released under the MIT License. *
3+
* See LICENSE file or go to https://github.com/jongpie/NebulaTriggerFramework for full license details. *
4+
********************************************************************************************************/
5+
public interface ISobjectTriggerHandler {
6+
7+
void execute();
8+
9+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>40.0</apiVersion>
3+
<apiVersion>43.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>

0 commit comments

Comments
 (0)