Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify a Bypass by Type #15

Open
kacrouse opened this issue Jul 26, 2018 · 1 comment
Open

Specify a Bypass by Type #15

kacrouse opened this issue Jul 26, 2018 · 1 comment

Comments

@kacrouse
Copy link

kacrouse commented Jul 26, 2018

It would be helpful to be able to specify a bypass by passing in a Type rather than a String.

Examples:
TriggerHandler.bypass(AccountTriggerHandler.class);
TriggerHandler.clearBypass(AccountTriggerHandler.class);
TriggerHandler.isBypassed(AccountTriggerHandler.class);

This would create a hard reference to the class being bypassed, so typos would no longer be a possibility and the bypasses could be updated or removed when renaming or deleting a trigger handler.

Storing bypassed handlers as Types instead of Strings might not be a bad idea as well, though it wouldn't be entirely necessary for the public bypass APIs.

@renatoliveira
Copy link
Contributor

I've added this feature to my fork. It is already available in a PR (#13) I opened a while ago.

Can you check this out @kevinohara80?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants