/***********************************************************************************************************
 * Name         : ContentDocumentLinkTriggerHandler
 * Purpose      : Handler class for ContentDocumentLinkTrigger
 **********************************************************************************************************/
public with sharing class ContentDocumentLinkTriggerHandler {
    public static final String SELF = 'ContentDocumentLink';

    public static void onAfterInsert(List<ContentDocumentLink> newList) {
        if (TriggerControl.isTriggerEnabled(SELF, TriggerOperation.AFTER_INSERT)) {
            ContentDocumentLinkTriggerHelper.updateOpportunitiesOnAttachmentAdd(newList);
            ContentDocumentLinkTriggerHelper.updatePaymentsOnAttachmentAdd(newList);
        }
    }
    public static void onBeforeDelete(List<ContentDocumentLink> oldList) {
        if (TriggerControl.isTriggerEnabled(SELF, TriggerOperation.BEFORE_DELETE)) {
            ContentDocumentLinkTriggerHelper.handleDeletionsForAWAL(oldList);
        }
    }
}