-
Notifications
You must be signed in to change notification settings - Fork 13
LogTriggerHandler
STATUS: ACTIVE
Class handles the post-insert processing of Log events
Extends the TriggerFramework class
Enables the user to define if this handler should silently
ignore errors thrown by dml, or if it should throw a log
exception
Inheritance
TriggerFramework > LogTriggerHandler
Constructor, called by trigger.
Param | Description |
---|---|
logs |
Logs to process |
shouldThrow |
if true, this class will throw a log exception when DML errors occur. |
convenience constructor, calls previous constructor but will not throw a log exception on dml errors
Param | Description |
---|---|
logs |
logs to process |
Inherited
a set of handler names that are bypassed
Inherited
TESTVISIBLE
the current context of the trigger, override-able in tests
Overridden from TriggerFramework. TriggerFramework executes this method when the trigger context is after insert
Exception | Description |
---|---|
LogException |
on Database.insert failure isSuccess is false |
Inherited
This is main brokering method that is called by the trigger. It's responsible for determining the proper context, and calling the correct method
AccountTriggerFramework.run();
Inherited
A method to guard against invalid execution contexts
Type | Description |
---|---|
Boolean | true if the execution context is invalid or if this trigger handler is bypassed |
Inherited
Allows developers to prevent trigger loops, or allow a limited number of them by setting the maximum number of times this trigger is called.
Param | Description |
---|---|
max |
A valid number (generally 1) of times you'd like to allow the trigger to run. |
In the context of a TriggerFramework class,
this.setMaxLoopCount(5);
Inherited
Allows developers to turn off the max loop count
In the context of a TriggerFramework class,
this.clearMaxLoopCount();
Inherited
Allows developers to conditionally bypass (disable) other triggers that also implement this TriggerFramework
Param | Description |
---|---|
handlerName |
Class name (String) of the trigger handler to bypass |
TriggerFramework.bypass('AccountTriggerFramework');
Inherited
Removes a given trigger handler class name from the list of bypassed trigger handlers.
Param | Description |
---|---|
handlerName |
Handler class name to remove from the bypass list |
TriggerFramework.clearBypass('AccountTriggerFramework');
Inherited
Allows developers to check whether a given trigger handler class is currently bypassed.
Param | Description |
---|---|
handlerName |
The name of the trigger handler class to check for |
Type | Description |
---|---|
Boolean | Boolean |
TriggerFramework.isBypassed('AccountTriggerFramework');
Inherited
removes all classes from the bypass list
TriggerFramework.clearAllBypasses();
Inherited
TESTVISIBLE
private instance methods
Inherited
TESTVISIBLE
Returns the string version of the handler class being invoked
Type | Description |
---|---|
String |
String Name of the Handler |
Inherited
TESTVISIBLE
SUPPRESSWARNINGS
context methods
Inherited
TESTVISIBLE
SUPPRESSWARNINGS
Virtual method for the implementing class to override
Inherited
TESTVISIBLE
SUPPRESSWARNINGS
Virtual method for the implementing class to override
Inherited
TESTVISIBLE
SUPPRESSWARNINGS
Virtual method for the implementing class to override
Inherited
TESTVISIBLE
SUPPRESSWARNINGS
Virtual method for the implementing class to override
Inherited
TESTVISIBLE
SUPPRESSWARNINGS
Virtual method for the implementing class to override