├── fflib2-forcedi-triggerhandling └── README.md ├── fflib-soc-basics ├── images │ ├── domain.png │ ├── service.png │ ├── selector.png │ ├── new-file-accountsimp.png │ ├── new-file-contactsimp.png │ ├── new-file-accountsservice.png │ ├── new-file-accounttrigger.png │ ├── new-file-accountfeaturetest.png │ ├── new-file-accountsserviceimp.png │ ├── new-file-contactsselectorImp.png │ ├── implement-accountsservice-methods.png │ └── issue-accountsimp.accountsservice.png ├── IntelliJ templates │ └── fileTemplates │ │ ├── Apex Class - No Constructor.cls │ │ ├── includes │ │ └── Apex File Header.cls │ │ ├── Apex Class - Queueable.cls │ │ ├── Apex Unit-Test Class.cls │ │ ├── Apex Class - Schedulable.cls │ │ ├── Apex WebserviceClass.cls │ │ ├── Apex SandboxPostCopy.cls │ │ ├── Apex Class - Singleton.cls │ │ ├── Apex Class - Batch.cls │ │ ├── Apex EmailService.cls │ │ ├── Apex WebServiceMock.cls │ │ ├── Apex Class - ControllerExtension.cls │ │ ├── Apex Class - Iterator.cls │ │ ├── Apex RestResource.cls │ │ ├── Apex Domain Class.cls │ │ ├── Apex Selector Class.cls │ │ ├── Apex HttpCalloutMock.cls │ │ └── Apex Class - Application.cls ├── .vscode │ ├── settings.json │ ├── extensions.json │ └── launch.json ├── sfdx-source │ ├── apex-mocks │ │ ├── main │ │ │ └── classes │ │ │ │ ├── fflib_Match.cls-meta.xml │ │ │ │ ├── fflib_IDGenerator.cls-meta.xml │ │ │ │ ├── fflib_IMatcher.cls-meta.xml │ │ │ │ ├── fflib_Inheritor.cls-meta.xml │ │ │ │ ├── fflib_ApexMocksUtils.cls-meta.xml │ │ │ │ ├── fflib_MethodArgValues.cls-meta.xml │ │ │ │ ├── fflib_MethodReturnValue.cls-meta.xml │ │ │ │ ├── fflib_QualifiedMethod.cls-meta.xml │ │ │ │ ├── fflib_MatcherDefinitions.cls-meta.xml │ │ │ │ ├── fflib_MatchersReturnValue.cls-meta.xml │ │ │ │ ├── fflib_MethodCountRecorder.cls-meta.xml │ │ │ │ ├── fflib_MethodReturnValueRecorder.cls-meta.xml │ │ │ │ ├── fflib_Answer.cls-meta.xml │ │ │ │ ├── fflib_InOrder.cls-meta.xml │ │ │ │ ├── fflib_System.cls-meta.xml │ │ │ │ ├── fflib_AnyOrder.cls-meta.xml │ │ │ │ ├── fflib_ApexMocks.cls-meta.xml │ │ │ │ ├── fflib_ApexMocksConfig.cls-meta.xml │ │ │ │ ├── fflib_ArgumentCaptor.cls-meta.xml │ │ │ │ ├── fflib_InvocationOnMock.cls-meta.xml │ │ │ │ ├── fflib_MethodVerifier.cls-meta.xml │ │ │ │ ├── fflib_VerificationMode.cls-meta.xml │ │ │ │ ├── fflib_QualifiedMethodAndArgValues.cls-meta.xml │ │ │ │ ├── fflib_Inheritor.cls │ │ │ │ ├── fflib_Answer.cls │ │ │ │ ├── fflib_ApexMocksConfig.cls │ │ │ │ ├── fflib_QualifiedMethodAndArgValues.cls │ │ │ │ └── fflib_MethodCountRecorder.cls │ │ └── test │ │ │ └── classes │ │ │ ├── fflib_MatchTest.cls-meta.xml │ │ │ ├── fflib_IDGeneratorTest.cls-meta.xml │ │ │ ├── fflib_InheritorTest.cls-meta.xml │ │ │ ├── fflib_ApexMocksUtilsTest.cls-meta.xml │ │ │ ├── fflib_MatcherDefinitionsTest.cls-meta.xml │ │ │ ├── fflib_MethodArgValuesTest.cls-meta.xml │ │ │ ├── fflib_QualifiedMethodTest.cls-meta.xml │ │ │ ├── fflib_MyList.cls-meta.xml │ │ │ ├── fflib_AnswerTest.cls-meta.xml │ │ │ ├── fflib_AnyOrderTest.cls-meta.xml │ │ │ ├── fflib_InOrderTest.cls-meta.xml │ │ │ ├── fflib_SystemTest.cls-meta.xml │ │ │ ├── mocks │ │ │ └── fflib_Mocks.cls-meta.xml │ │ │ ├── fflib_ApexMocksTest.cls-meta.xml │ │ │ ├── fflib_ArgumentCaptorTest.cls-meta.xml │ │ │ ├── fflib_InheritorTest.cls │ │ │ └── fflib_MyList.cls │ ├── apex-common │ │ ├── test │ │ │ └── classes │ │ │ │ ├── fflib_ApplicationTest.cls-meta.xml │ │ │ │ ├── fflib_QueryFactoryTest.cls-meta.xml │ │ │ │ ├── fflib_SObjectDescribeTest.cls-meta.xml │ │ │ │ ├── fflib_SObjectDomainTest.cls-meta.xml │ │ │ │ ├── fflib_SObjectSelectorTest.cls-meta.xml │ │ │ │ ├── fflib_SObjectUnitOfWorkTest.cls-meta.xml │ │ │ │ ├── fflib_SecurityUtilsTest.cls-meta.xml │ │ │ │ ├── fflib_StringBuilderTest.cls-meta.xml │ │ │ │ └── mocks │ │ │ │ └── fflib_SObjectMocks.cls-meta.xml │ │ └── main │ │ │ └── classes │ │ │ ├── fflib_Application.cls-meta.xml │ │ │ ├── fflib_ISObjectDomain.cls-meta.xml │ │ │ ├── fflib_ISObjectSelector.cls-meta.xml │ │ │ ├── fflib_QueryFactory.cls-meta.xml │ │ │ ├── fflib_SObjectDescribe.cls-meta.xml │ │ │ ├── fflib_SObjectDomain.cls-meta.xml │ │ │ ├── fflib_SObjectSelector.cls-meta.xml │ │ │ ├── fflib_SecurityUtils.cls-meta.xml │ │ │ ├── fflib_StringBuilder.cls-meta.xml │ │ │ ├── fflib_ISObjectUnitOfWork.cls-meta.xml │ │ │ └── fflib_SObjectUnitOfWork.cls-meta.xml │ └── force-app │ │ └── main │ │ └── default │ │ ├── classes │ │ ├── Accounts.cls-meta.xml │ │ ├── AccountsImp.cls-meta.xml │ │ ├── Application.cls-meta.xml │ │ ├── Contacts.cls-meta.xml │ │ ├── ContactsImp.cls-meta.xml │ │ ├── AccountsService.cls-meta.xml │ │ ├── ContactsSelector.cls-meta.xml │ │ ├── AccountFeatureTest.cls-meta.xml │ │ ├── AccountTriggerHandler.cls-meta.xml │ │ ├── AccountsServiceImp.cls-meta.xml │ │ ├── ContactsSelectorImp.cls-meta.xml │ │ ├── AccountTriggerHandlerImp.cls-meta.xml │ │ ├── AccountTriggerHandler.cls │ │ ├── Accounts.cls │ │ ├── ContactsSelector.cls │ │ ├── Contacts.cls │ │ ├── AccountsService.cls │ │ ├── ContactsSelectorImp.cls │ │ └── ContactsImp.cls │ │ └── triggers │ │ ├── AccountTrigger.trigger-meta.xml │ │ └── AccountTrigger.trigger ├── .prettierignore ├── scripts │ ├── soql │ │ └── account.soql │ └── apex │ │ └── hello.apex ├── .prettierrc ├── .idea │ └── copyright │ │ ├── profiles_settings.xml │ │ └── AEP_Training.xml ├── .eslintignore ├── .forceignore ├── sfdx-project.json ├── config │ └── project-scratch-def.json ├── .gitignore └── package.json ├── .idea └── codeStyles │ └── codeStyleConfig.xml ├── SoC ├── force-app │ └── main │ │ ├── default │ │ ├── classes │ │ │ ├── Application.cls-meta.xml │ │ │ ├── domains │ │ │ │ ├── Accounts.cls-meta.xml │ │ │ │ ├── Contacts.cls-meta.xml │ │ │ │ ├── interfaces │ │ │ │ │ ├── IAccounts.cls-meta.xml │ │ │ │ │ ├── IContacts.cls-meta.xml │ │ │ │ │ ├── IContacts.cls │ │ │ │ │ └── IAccounts.cls │ │ │ │ └── Contacts.cls │ │ │ ├── dataObjects │ │ │ │ ├── PartnerContact.cls-meta.xml │ │ │ │ └── PartnerContact.cls │ │ │ ├── factories │ │ │ │ ├── ContactsFactory.cls-meta.xml │ │ │ │ └── ContactsFactory.cls │ │ │ ├── selectors │ │ │ │ ├── AccountsSelector.cls-meta.xml │ │ │ │ ├── CasesSelector.cls-meta.xml │ │ │ │ ├── ContactsSelector.cls-meta.xml │ │ │ │ ├── ContactsSelectorTest.cls-meta.xml │ │ │ │ ├── interfaces │ │ │ │ │ ├── ICasesSelector.cls-meta.xml │ │ │ │ │ ├── IAccountsSelector.cls-meta.xml │ │ │ │ │ ├── IContactsSelector.cls-meta.xml │ │ │ │ │ ├── ICasesSelector.cls │ │ │ │ │ ├── IAccountsSelector.cls │ │ │ │ │ └── IContactsSelector.cls │ │ │ │ ├── CasesSelector.cls │ │ │ │ ├── AccountsSelector.cls │ │ │ │ └── ContactsSelectorTest.cls │ │ │ ├── services │ │ │ │ ├── AccountsService.cls-meta.xml │ │ │ │ ├── IAccountsService.cls-meta.xml │ │ │ │ ├── AccountsServiceImpl.cls-meta.xml │ │ │ │ ├── IAccountsService.cls │ │ │ │ └── AccountsService.cls │ │ │ ├── controllers │ │ │ │ ├── AccountRatingWebService.cls-meta.xml │ │ │ │ ├── AccountViewController.cls-meta.xml │ │ │ │ └── AccountViewController.cls │ │ │ └── triggerHandlers │ │ │ │ ├── AccountsTriggerHandler.cls-meta.xml │ │ │ │ ├── ContactsTriggerHandler.cls-meta.xml │ │ │ │ ├── ContactsTriggerHandler.cls │ │ │ │ └── AccountsTriggerHandler.cls │ │ └── triggers │ │ │ ├── Accounts.trigger-meta.xml │ │ │ └── Accounts.trigger │ │ └── tests │ │ └── classes │ │ ├── domains │ │ ├── AccountsTest.cls-meta.xml │ │ ├── ContactsTest.cls-meta.xml │ │ └── ContactsTest.cls │ │ ├── services │ │ └── AccountsServiceImplTest.cls-meta.xml │ │ ├── controllers │ │ ├── AccountViewControllerTest.cls-meta.xml │ │ ├── AccountRatingWebServiceTest.cls-meta.xml │ │ └── AccountViewControllerTest.cls │ │ └── featureTests │ │ └── AccountsTriggerHandlerTest.cls-meta.xml └── config │ └── project-scratch-def.json ├── fflib2-classic-triggerhandling ├── sfdx-source │ ├── apex-mocks │ │ ├── main │ │ │ └── classes │ │ │ │ ├── fflib_IMatcher.cls-meta.xml │ │ │ │ ├── fflib_Match.cls-meta.xml │ │ │ │ ├── fflib_IDGenerator.cls-meta.xml │ │ │ │ ├── fflib_Inheritor.cls-meta.xml │ │ │ │ ├── fflib_ApexMocksUtils.cls-meta.xml │ │ │ │ ├── fflib_MatcherDefinitions.cls-meta.xml │ │ │ │ ├── fflib_MethodArgValues.cls-meta.xml │ │ │ │ ├── fflib_MethodReturnValue.cls-meta.xml │ │ │ │ ├── fflib_QualifiedMethod.cls-meta.xml │ │ │ │ ├── fflib_MatchersReturnValue.cls-meta.xml │ │ │ │ ├── fflib_MethodCountRecorder.cls-meta.xml │ │ │ │ ├── fflib_MethodReturnValueRecorder.cls-meta.xml │ │ │ │ ├── fflib_Answer.cls-meta.xml │ │ │ │ ├── fflib_AnyOrder.cls-meta.xml │ │ │ │ ├── fflib_InOrder.cls-meta.xml │ │ │ │ ├── fflib_System.cls-meta.xml │ │ │ │ ├── fflib_ApexMocks.cls-meta.xml │ │ │ │ ├── fflib_ApexMocksConfig.cls-meta.xml │ │ │ │ ├── fflib_ArgumentCaptor.cls-meta.xml │ │ │ │ ├── fflib_InvocationOnMock.cls-meta.xml │ │ │ │ ├── fflib_MethodVerifier.cls-meta.xml │ │ │ │ ├── fflib_VerificationMode.cls-meta.xml │ │ │ │ ├── fflib_QualifiedMethodAndArgValues.cls-meta.xml │ │ │ │ ├── fflib_Inheritor.cls │ │ │ │ ├── fflib_Answer.cls │ │ │ │ ├── fflib_ApexMocksConfig.cls │ │ │ │ └── fflib_QualifiedMethodAndArgValues.cls │ │ └── test │ │ │ └── classes │ │ │ ├── fflib_MatchTest.cls-meta.xml │ │ │ ├── fflib_ApexMocksUtilsTest.cls-meta.xml │ │ │ ├── fflib_IDGeneratorTest.cls-meta.xml │ │ │ ├── fflib_InheritorTest.cls-meta.xml │ │ │ ├── fflib_MatcherDefinitionsTest.cls-meta.xml │ │ │ ├── fflib_MethodArgValuesTest.cls-meta.xml │ │ │ ├── fflib_QualifiedMethodTest.cls-meta.xml │ │ │ ├── fflib_MyList.cls-meta.xml │ │ │ ├── fflib_AnswerTest.cls-meta.xml │ │ │ ├── fflib_AnyOrderTest.cls-meta.xml │ │ │ ├── fflib_ApexMocksTest.cls-meta.xml │ │ │ ├── fflib_InOrderTest.cls-meta.xml │ │ │ ├── fflib_SystemTest.cls-meta.xml │ │ │ ├── mocks │ │ │ └── fflib_Mocks.cls-meta.xml │ │ │ ├── fflib_ArgumentCaptorTest.cls-meta.xml │ │ │ ├── fflib_InheritorTest.cls │ │ │ └── fflib_MyList.cls │ ├── apex-common │ │ ├── test │ │ │ └── classes │ │ │ │ ├── fflib_ApplicationTest.cls-meta.xml │ │ │ │ ├── fflib_QueryFactoryTest.cls-meta.xml │ │ │ │ ├── fflib_SObjectDomainTest.cls-meta.xml │ │ │ │ ├── fflib_SecurityUtilsTest.cls-meta.xml │ │ │ │ ├── fflib_StringBuilderTest.cls-meta.xml │ │ │ │ ├── fflib_SObjectDescribeTest.cls-meta.xml │ │ │ │ ├── fflib_SObjectSelectorTest.cls-meta.xml │ │ │ │ ├── fflib_SObjectUnitOfWorkTest.cls-meta.xml │ │ │ │ ├── mocks │ │ │ │ └── fflib_SObjectMocks.cls-meta.xml │ │ │ │ ├── events │ │ │ │ ├── fflib_EventEmitterImpTest.cls-meta.xml │ │ │ │ ├── fflib_EventFeatureTest.cls-meta.xml │ │ │ │ └── fflib_SObjectEventListenerTest.cls-meta.xml │ │ │ │ └── application │ │ │ │ ├── fflib_ClassicBindingResolverTest.cls-meta.xml │ │ │ │ ├── fflib_ClassicDomainBindingResolverTest.cls-meta.xml │ │ │ │ └── fflib_ClassicSelectorBindingResolverTest.cls-meta.xml │ │ ├── main │ │ │ └── classes │ │ │ │ ├── fflib_Domain.cls-meta.xml │ │ │ │ ├── fflib_Objects.cls-meta.xml │ │ │ │ ├── fflib_Application.cls-meta.xml │ │ │ │ ├── fflib_QueryFactory.cls-meta.xml │ │ │ │ ├── fflib_SObjects.cls-meta.xml │ │ │ │ ├── fflib_DomainConstructor.cls-meta.xml │ │ │ │ ├── fflib_ISObjectSelector.cls-meta.xml │ │ │ │ ├── fflib_SObjectDescribe.cls-meta.xml │ │ │ │ ├── fflib_SObjectSelector.cls-meta.xml │ │ │ │ ├── fflib_SObjectUnitOfWork.cls-meta.xml │ │ │ │ ├── fflib_SecurityUtils.cls-meta.xml │ │ │ │ ├── fflib_StringBuilder.cls-meta.xml │ │ │ │ ├── fflib_ISObjectUnitOfWork.cls-meta.xml │ │ │ │ ├── fflib_Domain.cls │ │ │ │ └── fflib_DomainConstructor.cls │ │ ├── events │ │ │ ├── main │ │ │ │ └── classes │ │ │ │ │ ├── fflib_ApexEvent.cls-meta.xml │ │ │ │ │ ├── fflib_EventEmitterImp.cls-meta.xml │ │ │ │ │ ├── fflib_SObjectEvent.cls-meta.xml │ │ │ │ │ ├── interface │ │ │ │ │ ├── fflib_Event.cls-meta.xml │ │ │ │ │ ├── fflib_EventEmitter.cls-meta.xml │ │ │ │ │ ├── fflib_EventListener.cls-meta.xml │ │ │ │ │ └── fflib_Event.cls │ │ │ │ │ ├── fflib_EventListenerConfig.cls-meta.xml │ │ │ │ │ ├── fflib_SObjectEventListener.cls-meta.xml │ │ │ │ │ └── fflib_QueueableEventListener.cls-meta.xml │ │ │ └── application-factory │ │ │ │ ├── classes │ │ │ │ ├── fflib_ApplicationEventEmitterImp.cls-meta.xml │ │ │ │ ├── fflib_MetadataEventListenerSelector.cls-meta.xml │ │ │ │ └── interfaces │ │ │ │ │ ├── fflib_ApplicationEventEmitter.cls-meta.xml │ │ │ │ │ ├── fflib_EventListenerSelector.cls-meta.xml │ │ │ │ │ └── fflib_EventListenerSelector.cls │ │ │ │ └── objects │ │ │ │ └── fflib_EventListener__mdt │ │ │ │ ├── fflib_EventListener__mdt.object-meta.xml │ │ │ │ └── fields │ │ │ │ ├── QueuedAction__c.field-meta.xml │ │ │ │ ├── InterfaceType__c.field-meta.xml │ │ │ │ ├── EventName__c.field-meta.xml │ │ │ │ ├── AppName__c.field-meta.xml │ │ │ │ └── Priority__c.field-meta.xml │ │ ├── deprecated │ │ │ └── classes │ │ │ │ ├── fflib_ISObjectDomain.cls-meta.xml │ │ │ │ └── fflib_SObjectDomain.cls-meta.xml │ │ ├── force-di │ │ │ ├── test │ │ │ │ └── classes │ │ │ │ │ ├── fflib_TestAccounts.cls-meta.xml │ │ │ │ │ ├── fflib_TestAccountsMock.cls-meta.xml │ │ │ │ │ ├── fflib_ForceDiDomainBindingResolverTest.cls-meta.xml │ │ │ │ │ ├── fflib_TestAccountsMock.cls │ │ │ │ │ └── fflib_TestAccounts.cls │ │ │ └── main │ │ │ │ ├── classes │ │ │ │ ├── fflib_BindingsSelector.cls-meta.xml │ │ │ │ ├── fflib_CustomMetaDataModule.cls-meta.xml │ │ │ │ ├── fflib_ForceDiBindingResolver.cls-meta.xml │ │ │ │ ├── fflib_ForceDiDomainBindingResolver.cls-meta.xml │ │ │ │ └── fflib_ForceDiSelectorBindingResolver.cls-meta.xml │ │ │ │ ├── objects │ │ │ │ └── fflib_Binding__mdt │ │ │ │ │ ├── fflib_Binding__mdt.object-meta.xml │ │ │ │ │ └── fields │ │ │ │ │ ├── To__c.field-meta.xml │ │ │ │ │ ├── AppName__c.field-meta.xml │ │ │ │ │ ├── BindingObject__c.field-meta.xml │ │ │ │ │ ├── SubType__c.field-meta.xml │ │ │ │ │ ├── BindingObjectAlternate__c.field-meta.xml │ │ │ │ │ └── Type__c.field-meta.xml │ │ │ │ ├── objectTranslations │ │ │ │ └── fflib_Binding__mdt-en_US │ │ │ │ │ └── fflib_Binding__mdt-en_US.objectTranslation-meta.xml │ │ │ │ └── customMetadata │ │ │ │ └── di_Binding.ApexEnterprisePatternsModule.md-meta.xml │ │ └── application │ │ │ └── classes │ │ │ ├── interface │ │ │ ├── fflib_BindingResolver.cls-meta.xml │ │ │ ├── fflib_DomainBindingResolver.cls-meta.xml │ │ │ └── fflib_SelectorBindingResolver.cls-meta.xml │ │ │ └── classic │ │ │ ├── fflib_ClassicBindingResolver.cls-meta.xml │ │ │ ├── fflib_ClassicDomainBindingResolver.cls-meta.xml │ │ │ └── fflib_ClassicSelectorBindingResolver.cls-meta.xml │ ├── force-di │ │ ├── main │ │ │ ├── classes │ │ │ │ ├── di_NamespaceClass.cls │ │ │ │ ├── di_Flow.cls-meta.xml │ │ │ │ ├── di_Binding.cls-meta.xml │ │ │ │ ├── di_Module.cls-meta.xml │ │ │ │ ├── di_BindingConfigWrapper.cls-meta.xml │ │ │ │ ├── di_Injector.cls-meta.xml │ │ │ │ ├── di_BindingParam.cls-meta.xml │ │ │ │ ├── di_PlatformCache.cls-meta.xml │ │ │ │ ├── di_InjectorComponentFlowProxyController.cls-meta.xml │ │ │ │ ├── di_NamespaceClass.cls-meta.xml │ │ │ │ ├── di_InjectorController.cls-meta.xml │ │ │ │ └── di_InjectorComponentController.cls-meta.xml │ │ │ ├── components │ │ │ │ ├── di_injector.component-meta.xml │ │ │ │ └── di_injectorFlowProxy.component-meta.xml │ │ │ ├── aura │ │ │ │ ├── di_injectorFlowProxy │ │ │ │ │ ├── di_injectorFlowProxy.cmp-meta.xml │ │ │ │ │ ├── di_injectorFlowProxyHelper.js │ │ │ │ │ └── di_injectorFlowProxy.cmp │ │ │ │ ├── di_injector │ │ │ │ │ ├── di_injector.cmp-meta.xml │ │ │ │ │ └── di_injector.cmp │ │ │ │ ├── di_injectorAttribute │ │ │ │ │ ├── di_injectorAttribute.cmp-meta.xml │ │ │ │ │ └── di_injectorAttribute.cmp │ │ │ │ └── di_injectorFlowProxyStatusChanged │ │ │ │ │ ├── di_injectorFlowProxyStatusChanged.evt-meta.xml │ │ │ │ │ └── di_injectorFlowProxyStatusChanged.evt │ │ │ └── objects │ │ │ │ ├── di_Binding__mdt │ │ │ │ ├── di_Binding__mdt.object-meta.xml │ │ │ │ ├── fields │ │ │ │ │ ├── To__c.field-meta.xml │ │ │ │ │ ├── BindingSequence__c.field-meta.xml │ │ │ │ │ ├── BindingObject__c.field-meta.xml │ │ │ │ │ ├── BindingObjectAlternate__c.field-meta.xml │ │ │ │ │ └── Type__c.field-meta.xml │ │ │ │ ├── listViews │ │ │ │ │ └── All.listView-meta.xml │ │ │ │ └── validationRules │ │ │ │ │ └── BindObj_Or_BindObjAlt.validationRule-meta.xml │ │ │ │ └── di_Configurations__c │ │ │ │ ├── di_Configurations__c.object-meta.xml │ │ │ │ └── fields │ │ │ │ ├── UsePlatformCacheToStoreBindings__c.field-meta.xml │ │ │ │ └── OrgCachePartitionName__c.field-meta.xml │ │ └── test │ │ │ └── classes │ │ │ ├── di_BindingParamTest.cls-meta.xml │ │ │ ├── di_FlowTest.cls-meta.xml │ │ │ ├── di_BindingTest.cls-meta.xml │ │ │ ├── di_InjectorTest.cls-meta.xml │ │ │ ├── di_ModuleTest.cls-meta.xml │ │ │ ├── di_InjectorControllerTest.cls-meta.xml │ │ │ ├── di_InjectorComponentControllerTest.cls-meta.xml │ │ │ ├── di_InjectorCMPFlowProxyControllerTest.cls-meta.xml │ │ │ ├── di_InjectorCMPFlowProxyControllerTest.cls │ │ │ └── di_ModuleTest.cls │ └── force-app │ │ ├── main │ │ └── default │ │ │ ├── classes │ │ │ ├── Application.cls-meta.xml │ │ │ ├── domains │ │ │ │ ├── Accounts.cls-meta.xml │ │ │ │ ├── AccountsImp.cls-meta.xml │ │ │ │ ├── Opportunities.cls-meta.xml │ │ │ │ ├── OpportunitiesImp.cls-meta.xml │ │ │ │ ├── Opportunities.cls │ │ │ │ ├── Accounts.cls │ │ │ │ └── OpportunitiesImp.cls │ │ │ ├── selector │ │ │ │ ├── AccountsSelectorImp.cls-meta.xml │ │ │ │ ├── OpportunitiesSelectorImp.cls-meta.xml │ │ │ │ ├── AccountsSelectorImp.cls │ │ │ │ └── OpportunitiesSelectorImp.cls │ │ │ └── EventListeners │ │ │ │ ├── OnChangeOppLogActivityOnRelatedAccImp.cls-meta.xml │ │ │ │ ├── OnChangeOppLogActivityOnRelatedAccounts.cls-meta.xml │ │ │ │ └── OnChangeOppLogActivityOnRelatedAccounts.cls │ │ │ ├── service │ │ │ ├── OpportunitiesServiceImp.cls-meta.xml │ │ │ ├── interface │ │ │ │ ├── OpportunitiesService.cls-meta.xml │ │ │ │ └── OpportunitiesService.cls │ │ │ └── OpportunitiesServiceImp.cls │ │ │ └── triggers │ │ │ ├── OpportunityTrigger.trigger-meta.xml │ │ │ └── OpportunityTrigger.trigger │ │ └── test │ │ └── classes │ │ └── LastOpportunityActivityFeatureTest.cls-meta.xml ├── sfdx-project.json └── .forceignore └── README.md /fflib2-forcedi-triggerhandling/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fflib-soc-basics/images/domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wimvelzeboer/fflib-training-sessions/HEAD/fflib-soc-basics/images/domain.png -------------------------------------------------------------------------------- /fflib-soc-basics/images/service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wimvelzeboer/fflib-training-sessions/HEAD/fflib-soc-basics/images/service.png -------------------------------------------------------------------------------- /fflib-soc-basics/images/selector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wimvelzeboer/fflib-training-sessions/HEAD/fflib-soc-basics/images/selector.png -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex Class - No Constructor.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | public class ${NAME} 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /fflib-soc-basics/images/new-file-accountsimp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wimvelzeboer/fflib-training-sessions/HEAD/fflib-soc-basics/images/new-file-accountsimp.png -------------------------------------------------------------------------------- /fflib-soc-basics/images/new-file-contactsimp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wimvelzeboer/fflib-training-sessions/HEAD/fflib-soc-basics/images/new-file-contactsimp.png -------------------------------------------------------------------------------- /fflib-soc-basics/images/new-file-accountsservice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wimvelzeboer/fflib-training-sessions/HEAD/fflib-soc-basics/images/new-file-accountsservice.png -------------------------------------------------------------------------------- /fflib-soc-basics/images/new-file-accounttrigger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wimvelzeboer/fflib-training-sessions/HEAD/fflib-soc-basics/images/new-file-accounttrigger.png -------------------------------------------------------------------------------- /fflib-soc-basics/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "search.exclude": { 3 | "**/node_modules": true, 4 | "**/bower_components": true, 5 | "**/.sfdx": true 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /fflib-soc-basics/images/new-file-accountfeaturetest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wimvelzeboer/fflib-training-sessions/HEAD/fflib-soc-basics/images/new-file-accountfeaturetest.png -------------------------------------------------------------------------------- /fflib-soc-basics/images/new-file-accountsserviceimp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wimvelzeboer/fflib-training-sessions/HEAD/fflib-soc-basics/images/new-file-accountsserviceimp.png -------------------------------------------------------------------------------- /fflib-soc-basics/images/new-file-contactsselectorImp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wimvelzeboer/fflib-training-sessions/HEAD/fflib-soc-basics/images/new-file-contactsselectorImp.png -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/images/implement-accountsservice-methods.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wimvelzeboer/fflib-training-sessions/HEAD/fflib-soc-basics/images/implement-accountsservice-methods.png -------------------------------------------------------------------------------- /fflib-soc-basics/images/issue-accountsimp.accountsservice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wimvelzeboer/fflib-training-sessions/HEAD/fflib-soc-basics/images/issue-accountsimp.accountsservice.png -------------------------------------------------------------------------------- /fflib-soc-basics/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "salesforce.salesforcedx-vscode", 4 | "redhat.vscode-xml", 5 | "dbaeumer.vscode-eslint", 6 | "esbenp.prettier-vscode" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/includes/Apex File Header.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: ${NAME} 3 | * Description: 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wvelzebo@its.jnj.com 6 | */ -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_Match.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_IDGenerator.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_IMatcher.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_Inheritor.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_MatchTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/test/classes/fflib_ApplicationTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_ApexMocksUtils.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_MethodArgValues.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_MethodReturnValue.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_QualifiedMethod.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_IDGeneratorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_InheritorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/Application.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_MatcherDefinitions.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_MatchersReturnValue.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_MethodCountRecorder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_ApexMocksUtilsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_MatcherDefinitionsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_MethodArgValuesTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_QualifiedMethodTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_IMatcher.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_Match.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/domains/Accounts.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/domains/Contacts.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_MethodReturnValueRecorder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_IDGenerator.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_Inheritor.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_MatchTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/triggers/Accounts.trigger-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/tests/classes/domains/AccountsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/tests/classes/domains/ContactsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/fflib_ApplicationTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_ApexMocksUtils.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_MatcherDefinitions.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_MethodArgValues.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_MethodReturnValue.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_QualifiedMethod.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_ApexMocksUtilsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_IDGeneratorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_InheritorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/classes/di_NamespaceClass.cls: -------------------------------------------------------------------------------- 1 | public without sharing class di_NamespaceClass 2 | { 3 | public static final String CURRENTNAMESPACE = di_NamespaceClass.class.getName().substringBefore('.'); 4 | } 5 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/dataObjects/PartnerContact.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/factories/ContactsFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/selectors/AccountsSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/selectors/CasesSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/selectors/ContactsSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/services/AccountsService.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/services/IAccountsService.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex Class - Queueable.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | public class ${NAME} implements Queueable 4 | { 5 | public void execute(QueueableContext context) 6 | { 7 | //Do some action here 8 | } 9 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_MatchersReturnValue.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_MethodCountRecorder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_MatcherDefinitionsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_MethodArgValuesTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_QualifiedMethodTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/domains/interfaces/IAccounts.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/domains/interfaces/IContacts.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/selectors/ContactsSelectorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/services/AccountsServiceImpl.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/tests/classes/services/AccountsServiceImplTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_Answer.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_InOrder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 30.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_System.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_MyList.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_MethodReturnValueRecorder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | 5 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/controllers/AccountRatingWebService.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/controllers/AccountViewController.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/selectors/interfaces/ICasesSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/tests/classes/controllers/AccountViewControllerTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/.prettierignore: -------------------------------------------------------------------------------- 1 | # List files or directories below to ignore them when running prettier 2 | # More information: https://prettier.io/docs/en/ignore.html 3 | # 4 | 5 | **/staticresources/** 6 | .localdevserver 7 | .sfdx 8 | .vscode 9 | 10 | coverage/ -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/main/classes/fflib_Application.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_AnyOrder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_ApexMocks.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 39.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_AnswerTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_AnyOrderTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_InOrderTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 30.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_SystemTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/mocks/fflib_Mocks.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/Accounts.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/AccountsImp.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/Application.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/Contacts.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/ContactsImp.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/selectors/interfaces/IAccountsSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/selectors/interfaces/IContactsSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/triggerHandlers/AccountsTriggerHandler.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/triggerHandlers/ContactsTriggerHandler.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/tests/classes/controllers/AccountRatingWebServiceTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/tests/classes/featureTests/AccountsTriggerHandlerTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/main/classes/fflib_ISObjectDomain.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/main/classes/fflib_ISObjectSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/main/classes/fflib_QueryFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/main/classes/fflib_SObjectDomain.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/main/classes/fflib_SecurityUtils.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/main/classes/fflib_StringBuilder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/test/classes/fflib_QueryFactoryTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_ApexMocksConfig.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_ArgumentCaptor.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_InvocationOnMock.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_MethodVerifier.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_VerificationMode.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_ApexMocksTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/AccountsService.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/ContactsSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/main/classes/fflib_ISObjectUnitOfWork.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/main/classes/fflib_SObjectUnitOfWork.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/test/classes/fflib_SObjectDescribeTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/test/classes/fflib_SObjectDomainTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/test/classes/fflib_StringBuilderTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-common/test/classes/mocks/fflib_SObjectMocks.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_ArgumentCaptorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/AccountFeatureTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/AccountTriggerHandler.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/AccountsServiceImp.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/ContactsSelectorImp.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_Domain.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_Objects.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_Answer.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_AnyOrder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_InOrder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 30.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_System.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_MyList.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/classes/di_Flow.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_QualifiedMethodAndArgValues.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/AccountTriggerHandlerImp.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/triggers/AccountTrigger.trigger-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_Application.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_QueryFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_SObjects.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_ApexMocks.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 39.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_AnswerTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_AnyOrderTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_ApexMocksTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_InOrderTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 30.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_SystemTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/mocks/fflib_Mocks.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/Application.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/classes/di_Binding.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/classes/di_Module.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/test/classes/di_BindingParamTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/scripts/soql/account.soql: -------------------------------------------------------------------------------- 1 | // Use .soql files to store SOQL queries. 2 | // You can execute queries in VS Code by selecting the 3 | // query text and running the command: 4 | // SFDX: Execute SOQL Query with Currently Selected Text 5 | 6 | SELECT Id, Name FROM Account 7 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/main/classes/fflib_ApexEvent.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_DomainConstructor.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_ISObjectSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_SObjectUnitOfWork.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_SecurityUtils.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_StringBuilder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/fflib_QueryFactoryTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/fflib_SObjectDomainTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/fflib_StringBuilderTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_ApexMocksConfig.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_ArgumentCaptor.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_InvocationOnMock.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_MethodVerifier.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_VerificationMode.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_ArgumentCaptorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/domains/Accounts.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/classes/di_BindingConfigWrapper.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 45.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/classes/di_Injector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/test/classes/di_FlowTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 45.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/deprecated/classes/fflib_ISObjectDomain.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/deprecated/classes/fflib_SObjectDomain.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/main/classes/fflib_EventEmitterImp.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/main/classes/fflib_SObjectEvent.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/main/classes/interface/fflib_Event.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/test/classes/fflib_TestAccounts.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_ISObjectUnitOfWork.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/fflib_SObjectDescribeTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/mocks/fflib_SObjectMocks.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/domains/AccountsImp.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/domains/Opportunities.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/classes/di_BindingParam.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/test/classes/di_BindingTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/test/classes/di_InjectorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/test/classes/di_ModuleTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/main/classes/fflib_EventListenerConfig.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/main/classes/fflib_SObjectEventListener.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/classes/fflib_BindingsSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/test/classes/fflib_TestAccountsMock.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/events/fflib_EventEmitterImpTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/events/fflib_EventFeatureTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_QualifiedMethodAndArgValues.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/domains/OpportunitiesImp.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/service/OpportunitiesServiceImp.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/triggers/OpportunityTrigger.trigger-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/test/classes/LastOpportunityActivityFeatureTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/classes/di_PlatformCache.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex Unit-Test Class.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | @IsTest 4 | private class ${NAME} 5 | { 6 | 7 | static testMethod void itShould() 8 | { 9 | // GIVEN - 10 | 11 | 12 | // WHEN - 13 | 14 | 15 | // THEN - 16 | 17 | } 18 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageDirectories": [ 3 | { 4 | "path": "sfdx-source/force-app", 5 | "default": true 6 | } 7 | ], 8 | "namespace": "", 9 | "sfdcLoginUrl": "https://login.salesforce.com", 10 | "sourceApiVersion": "50.0" 11 | } 12 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/application/classes/interface/fflib_BindingResolver.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/main/classes/fflib_QueueableEventListener.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/main/classes/interface/fflib_EventEmitter.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/main/classes/interface/fflib_EventListener.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/classes/fflib_CustomMetaDataModule.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/classes/fflib_ForceDiBindingResolver.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/events/fflib_SObjectEventListenerTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/selector/AccountsSelectorImp.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/service/interface/OpportunitiesService.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/classes/di_InjectorComponentFlowProxyController.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/classes/di_NamespaceClass.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/components/di_injector.component-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/application/classes/classic/fflib_ClassicBindingResolver.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/classes/fflib_ForceDiDomainBindingResolver.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/selector/OpportunitiesSelectorImp.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/classes/di_InjectorController.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/components/di_injectorFlowProxy.component-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "none", 3 | "overrides": [ 4 | { 5 | "files": "**/lwc/**/*.html", 6 | "options": { "parser": "lwc" } 7 | }, 8 | { 9 | "files": "*.{cmp,page,component}", 10 | "options": { "parser": "html" } 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/application/classes/interface/fflib_DomainBindingResolver.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/application/classes/interface/fflib_SelectorBindingResolver.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/classes/fflib_ForceDiSelectorBindingResolver.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/test/classes/fflib_ForceDiDomainBindingResolverTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/application/fflib_ClassicBindingResolverTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/test/classes/di_InjectorControllerTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex Class - Schedulable.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | public class ${NAME} implements Schedulable 4 | { 5 | public void execute(SchedulableContext sc) 6 | { 7 | //MyBatchClass b = new MyBatchClass(); 8 | //database.executebatch(b); 9 | } 10 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/application/classes/classic/fflib_ClassicDomainBindingResolver.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/application/classes/classic/fflib_ClassicSelectorBindingResolver.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/application/fflib_ClassicDomainBindingResolverTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/test/classes/application/fflib_ClassicSelectorBindingResolverTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/application-factory/classes/fflib_ApplicationEventEmitterImp.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/application-factory/classes/fflib_MetadataEventListenerSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/EventListeners/OnChangeOppLogActivityOnRelatedAccImp.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/classes/di_InjectorComponentController.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/application-factory/classes/interfaces/fflib_ApplicationEventEmitter.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/application-factory/classes/interfaces/fflib_EventListenerSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/EventListeners/OnChangeOppLogActivityOnRelatedAccounts.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/test/classes/di_InjectorComponentControllerTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /fflib-soc-basics/.eslintignore: -------------------------------------------------------------------------------- 1 | **/lwc/**/*.css 2 | **/lwc/**/*.html 3 | **/lwc/**/*.json 4 | **/lwc/**/*.svg 5 | **/lwc/**/*.xml 6 | **/aura/**/*.auradoc 7 | **/aura/**/*.cmp 8 | **/aura/**/*.css 9 | **/aura/**/*.design 10 | **/aura/**/*.evt 11 | **/aura/**/*.json 12 | **/aura/**/*.svg 13 | **/aura/**/*.tokens 14 | **/aura/**/*.xml 15 | .sfdx -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/aura/di_injectorFlowProxy/di_injectorFlowProxy.cmp-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | injectorFlowProxy 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/test/classes/di_InjectorCMPFlowProxyControllerTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 45.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/domains/interfaces/IContacts.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: IContacts 3 | * Description: 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | public interface IContacts extends fflib_ISObjects 8 | { 9 | void setMailingCountryByAccountId(Map stringsByIds); 10 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/aura/di_injector/di_injector.cmp-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | A Lightning Component Bundle 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/objects/di_Binding__mdt/di_Binding__mdt.object-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bindings 5 | Public 6 | 7 | -------------------------------------------------------------------------------- /SoC/config/project-scratch-def.json: -------------------------------------------------------------------------------- 1 | { 2 | "orgName": "SoC", 3 | "edition": "Developer", 4 | "features": ["EnableSetPasswordInApi"], 5 | "settings": { 6 | "lightningExperienceSettings": { 7 | "enableS1DesktopEnabled": true 8 | }, 9 | "mobileSettings": { 10 | "enableS1EncryptedStoragePref2": false 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/selectors/interfaces/ICasesSelector.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: ICasesSelector 3 | * Description: Method signature definitions for Case selector classes 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | public interface ICasesSelector extends fflib_ISObjectSelector 8 | { 9 | 10 | } -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex WebserviceClass.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | global class ${NAME} 4 | { 5 | 6 | webservice String parameter { get; set; } 7 | 8 | 9 | public ${NAME}() 10 | { 11 | this.parameter = 'value'; 12 | } 13 | 14 | 15 | webservice static String serviceName() 16 | { 17 | return ''; 18 | } 19 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/aura/di_injectorAttribute/di_injectorAttribute.cmp-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | A Lightning Component Bundle 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/aura/di_injectorFlowProxyStatusChanged/di_injectorFlowProxyStatusChanged.evt-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46.0 4 | injectorFlowProxyStatusChanged 5 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/objects/fflib_Binding__mdt/fflib_Binding__mdt.object-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enterprise Pattern Bindings 5 | Public 6 | 7 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/aura/di_injectorFlowProxyStatusChanged/di_injectorFlowProxyStatusChanged.evt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/application-factory/objects/fflib_EventListener__mdt/fflib_EventListener__mdt.object-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Event Listeners 5 | Public 6 | 7 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/selectors/interfaces/IAccountsSelector.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: IAccountsSelector 3 | * Description: Method signature definitions for Account selector classes 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | public interface IAccountsSelector extends fflib_ISObjectSelector 8 | { 9 | List selectById(Set idSet); 10 | } -------------------------------------------------------------------------------- /SoC/force-app/main/default/triggers/Accounts.trigger: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: Accounts 3 | * Description: 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | trigger Accounts on Account 8 | (before insert, before update, before delete, after insert, after update, after delete, after undelete) 9 | { 10 | fflib_SObjectDomain.triggerHandler(AccountsTriggerHandler.class); 11 | } -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/factories/ContactsFactory.cls: -------------------------------------------------------------------------------- 1 | public with sharing class ContactsFactory 2 | { 3 | public static List generatePartnerContacts(List contacts) 4 | { 5 | List result = new List(); 6 | for (Contact record : contacts) 7 | { 8 | result.add( 9 | new PartnerContact(record) 10 | ); 11 | } 12 | return result; 13 | } 14 | } -------------------------------------------------------------------------------- /fflib-soc-basics/.forceignore: -------------------------------------------------------------------------------- 1 | # List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status 2 | # More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm 3 | # 4 | 5 | package.xml 6 | 7 | # LWC configuration files 8 | **/jsconfig.json 9 | **/.eslintrc.json 10 | 11 | # LWC Jest 12 | **/__tests__/** -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/.forceignore: -------------------------------------------------------------------------------- 1 | # List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status 2 | # More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm 3 | # 4 | 5 | package.xml 6 | 7 | # LWC configuration files 8 | **/jsconfig.json 9 | **/.eslintrc.json 10 | 11 | # LWC Jest 12 | **/__tests__/** -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/application-factory/classes/interfaces/fflib_EventListenerSelector.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: fflib_EventListenerSelector 3 | * Description: 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wvelzebo@its.jnj.com 6 | */ 7 | public interface fflib_EventListenerSelector 8 | { 9 | List getEventListeners(String namespace, String eventName); 10 | } -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex SandboxPostCopy.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | global class ${NAME} implements SandboxPostCopy 4 | { 5 | global void runApexClass(SandboxContext context) 6 | { 7 | System.debug('Organization Id: ' + context.organizationId()); 8 | System.debug('Sandbox Id: ' + context.sandboxId()); 9 | System.debug('Sandbox Name: ' + context.sandboxName()); 10 | } 11 | } -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex Class - Singleton.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | public with sharing class ${NAME} 4 | { 5 | private static ${NAME} classInstance; 6 | 7 | 8 | static { 9 | classInstance = new ${NAME}(); 10 | } 11 | 12 | 13 | private ${NAME}() 14 | { 15 | 16 | } 17 | 18 | 19 | public static ${NAME} getInstance() 20 | { 21 | return classInstance; 22 | } 23 | } -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageDirectories": [ 3 | { 4 | "path": "sfdx-source/force-app", 5 | "default": true 6 | }, 7 | { 8 | "path": "sfdx-source/apex-mocks", 9 | "default": false 10 | }, 11 | { 12 | "path": "sfdx-source/apex-common", 13 | "default": false 14 | } 15 | ], 16 | "namespace": "", 17 | "sfdcLoginUrl": "https://login.salesforce.com", 18 | "sourceApiVersion": "49.0" 19 | } 20 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_Inheritor.cls: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | @isTest 5 | public class fflib_Inheritor implements IA, IB, IC 6 | { 7 | public interface IA {String doA();} 8 | public interface IB {String doB();} 9 | public interface IC {String doC();} 10 | 11 | public String doA(){return 'Did A';} 12 | public String doB(){return 'Did B';} 13 | public String doC(){return 'Did C';} 14 | } -------------------------------------------------------------------------------- /fflib-soc-basics/scripts/apex/hello.apex: -------------------------------------------------------------------------------- 1 | // Use .apex files to store anonymous Apex. 2 | // You can execute anonymous Apex in VS Code by selecting the 3 | // apex text and running the command: 4 | // SFDX: Execute Anonymous Apex with Currently Selected Text 5 | // You can also execute the entire file by running the command: 6 | // SFDX: Execute Anonymous Apex with Editor Contents 7 | 8 | string tempvar = 'Enter_your_name_here'; 9 | System.debug('Hello World!'); 10 | System.debug('My name is ' + tempvar); -------------------------------------------------------------------------------- /fflib-soc-basics/config/project-scratch-def.json: -------------------------------------------------------------------------------- 1 | { 2 | "orgName": "fflib-soc-basics-training", 3 | "edition": "Developer", 4 | "hasSampleData": false, 5 | "features": [], 6 | "settings": { 7 | "lightningExperienceSettings": { 8 | "enableS1DesktopEnabled": true 9 | }, 10 | "securitySettings": { 11 | "passwordPolicies": { 12 | "enableSetPasswordInApi": true 13 | } 14 | }, 15 | "mobileSettings": { 16 | "enableS1EncryptedStoragePref2": false 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/objects/di_Binding__mdt/fields/To__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | To__c 4 | false 5 | SubscriberControlled 6 | 7 | 255 8 | true 9 | Text 10 | false 11 | 12 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/objects/di_Configurations__c/di_Configurations__c.object-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hierarchy 4 | Settings used to configure the Force-DI framework operations. 5 | false 6 | 7 | Public 8 | 9 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_Inheritor.cls: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | @isTest 5 | public class fflib_Inheritor implements IA, IB, IC 6 | { 7 | public interface IA {String doA();} 8 | public interface IB {String doB();} 9 | public interface IC {String doC();} 10 | 11 | public String doA(){return 'Did A';} 12 | public String doB(){return 'Did B';} 13 | public String doC(){return 'Did C';} 14 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/objects/fflib_Binding__mdt/fields/To__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | To__c 4 | false 5 | SubscriberControlled 6 | 7 | 255 8 | true 9 | Text 10 | false 11 | 12 | -------------------------------------------------------------------------------- /fflib-soc-basics/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Launch Apex Replay Debugger", 9 | "type": "apex-replay", 10 | "request": "launch", 11 | "logFile": "${command:AskForLogFileName}", 12 | "stopOnEntry": true, 13 | "trace": true 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex Class - Batch.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | public class ${NAME} implements Database.Batchable { 4 | 5 | 6 | public ${NAME}() { 7 | 8 | } 9 | 10 | public Database.QueryLocator start(Database.BatchableContext BC) { 11 | return Database.getQueryLocator( INSERT_SELECTOR_METHOD_HERE ); 12 | } 13 | 14 | 15 | public void execute(Database.BatchableContext BC, List scope) { 16 | 17 | } 18 | 19 | 20 | public void finish(Database.BatchableContext BC) { 21 | 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/objects/di_Binding__mdt/listViews/All.listView-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | All 4 | MasterLabel 5 | BindingObject__c 6 | BindingObjectAlternate__c 7 | BindingSequence__c 8 | To__c 9 | Type__c 10 | Everything 11 | 12 | 13 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/objects/di_Binding__mdt/fields/BindingSequence__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | BindingSequence__c 4 | false 5 | SubscriberControlled 6 | 7 | 18 8 | false 9 | 0 10 | Number 11 | false 12 | 13 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/objectTranslations/fflib_Binding__mdt-en_US/fflib_Binding__mdt-en_US.objectTranslation-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | Enterprise Pattern Binding 6 | 7 | 8 | true 9 | Enterprise Pattern Bindings 10 | 11 | Consonant 12 | 13 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/application-factory/objects/fflib_EventListener__mdt/fields/QueuedAction__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | QueuedAction__c 4 | false 5 | Run this listener in its own execution context using Queueable Apex 6 | false 7 | SubscriberControlled 8 | 9 | Checkbox 10 | 11 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/domains/interfaces/IAccounts.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: IAccounts 3 | * Description: Method signature definitions for Account domain class 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | public interface IAccounts extends fflib_ISObjects 8 | { 9 | List getAccounts(); 10 | void setRating(String value); 11 | Set getShippingCountries(); 12 | IAccounts selectByNumberOfEmployeesGreaterThan(Integer amount); 13 | IAccounts selectByNumberOfEmployeesLessThan(Integer amount); 14 | IAccounts recalculateRating(); 15 | 16 | Map getShippingCountryById(); 17 | } -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/selectors/interfaces/IContactsSelector.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: IContactsSelector 3 | * Description: Method signature definitions for Contact selector classes 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | public interface IContactsSelector extends fflib_ISObjectSelector 8 | { 9 | List selectByAccountId(Set accountIds); 10 | List selectByLeadSource(Set leadSources); 11 | List selectByIdWithCases(Set raceIds); 12 | List selectByIdWithAccount(Set raceIds); 13 | List selectPartnersById(Set idSet); 14 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/application-factory/objects/fflib_EventListener__mdt/fields/InterfaceType__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | InterfaceType__c 4 | The name of the interface of the listener 5 | false 6 | DeveloperControlled 7 | 8 | 255 9 | true 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex EmailService.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | global class ${NAME} implements Messaging.InboundEmailHandler 4 | { 5 | 6 | global Messaging.InboundEmailResult handleInboundEmail(Messaging.inboundEmail email, 7 | Messaging.InboundEnvelope env) 8 | { 9 | 10 | // Create an InboundEmailResult object for returning the result of the 11 | // Apex Email Service 12 | 13 | Messaging.InboundEmailResult result = new Messaging.InboundEmailResult(); 14 | 15 | String myPlainText= ''; 16 | myPlainText = email.plainTextBody; 17 | 18 | result.success = true; 19 | return result; 20 | } 21 | } -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_Answer.cls: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | 5 | /** 6 | * Interface for the answering framework. 7 | * This interface must be implemented inside the test class and implement the call back method answer. 8 | * @group Core 9 | */ 10 | public interface fflib_Answer 11 | { 12 | /** 13 | * Method to be implemented in the test class to implement the call back method. 14 | * @param invocation The invocation on the mock. 15 | * @throws The exception to be thrown. 16 | * @return The value to be returned. 17 | */ 18 | Object answer(fflib_InvocationOnMock invocation); 19 | } -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex WebServiceMock.cls: -------------------------------------------------------------------------------- 1 | //#parse("Apex File Header.cls") 2 | 3 | @IsTest 4 | public class ${NAME} implements WebServiceMock 5 | { 6 | public void doInvoke( 7 | Object stub, 8 | Object request, 9 | Map response, 10 | String endpoint, 11 | String soapAction, 12 | String requestName, 13 | String responseNS, 14 | String responseName, 15 | String responseType) 16 | { 17 | 18 | // Create response element from the autogenerated class. 19 | // Populate response element. 20 | // Add response element to the response parameter, as follows: 21 | //response.put('response_x', responseElement); 22 | } 23 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_Answer.cls: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | 5 | /** 6 | * Interface for the answering framework. 7 | * This interface must be implemented inside the test class and implement the call back method answer. 8 | * @group Core 9 | */ 10 | public interface fflib_Answer 11 | { 12 | /** 13 | * Method to be implemented in the test class to implement the call back method. 14 | * @param invocation The invocation on the mock. 15 | * @throws The exception to be thrown. 16 | * @return The value to be returned. 17 | */ 18 | Object answer(fflib_InvocationOnMock invocation); 19 | } -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex Class - ControllerExtension.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | public with sharing class ${NAME} { 4 | 5 | private final sObject mysObject; 6 | 7 | // The extension constructor initializes the private member 8 | // variable mysObject by using the getRecord method from the standard 9 | // controller. 10 | public ${NAME}(ApexPages.StandardController stdController) 11 | { 12 | this.mysObject = (sObject)stdController.getRecord(); 13 | } 14 | 15 | 16 | public String getRecordName() 17 | { 18 | return 'Hello ' + (String)mysObject.get('name') + ' (' + (Id)mysObject.get('Id') + ')'; 19 | } 20 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/objects/di_Binding__mdt/fields/BindingObject__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | BindingObject__c 4 | false 5 | SubscriberControlled 6 | 7 | EntityDefinition 8 | Bindings 9 | Bindings 10 | false 11 | MetadataRelationship 12 | false 13 | 14 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/application-factory/objects/fflib_EventListener__mdt/fields/EventName__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | EventName__c 4 | The name of the event the listener 5 | false 6 | DeveloperControlled 7 | The name of the event the listener. This field is case sensitive 8 | 9 | 255 10 | true 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/test/classes/di_InjectorCMPFlowProxyControllerTest.cls: -------------------------------------------------------------------------------- 1 | @isTest 2 | private with sharing class di_InjectorCMPFlowProxyControllerTest { 3 | 4 | @isTest 5 | private static void givenValueWhenGetInjectThenThrowException(){ 6 | String FlowNameValue = 'AccountRecordFlow'; 7 | Object InputVariablesValue = 'Account'; 8 | di_InjectorComponentFlowProxyController newObj = new di_InjectorComponentFlowProxyController(); 9 | try { 10 | newObj.getInject(); 11 | } catch(Exception e){ 12 | System.assertEquals(e.getMessage().contains('Invalid value for property name'), true, 'correct Exception is thrown'); 13 | } 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex Class - Iterator.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | // Click on each word below, click CONTROL-COMMAND-G, change it into the desired name and remove this comment afterwards 4 | // OBJECTNAME 5 | 6 | public class ${NAME} implements Iterator { 7 | 8 | OBJECTNAME[] results { get;set; } 9 | Integer index { get;set; } 10 | String query; 11 | 12 | public ${NAME}() 13 | { 14 | index = 0; 15 | results = Database.query(query); 16 | } 17 | 18 | public Boolean hasNext() 19 | { 20 | return results != null && !results.isEmpty() && index < results.size(); 21 | } 22 | 23 | public OBJECTNAME next() 24 | { 25 | return results[index++]; 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_ApexMocksConfig.cls: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | @IsTest 5 | public class fflib_ApexMocksConfig 6 | { 7 | /** 8 | * When false, stubbed behaviour and invocation counts are shared among all test spies. 9 | * - See fflib_ApexMocksTest.thatMultipleInstancesCanBeMockedDependently 10 | * - This is the default for backwards compatibility. 11 | * When true, each test spy instance has its own stubbed behaviour and invocations. 12 | * - See fflib_ApexMocksTest.thatMultipleInstancesCanBeMockedIndependently 13 | */ 14 | public static Boolean HasIndependentMocks {get; set;} 15 | 16 | static 17 | { 18 | HasIndependentMocks = false; 19 | } 20 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_ApexMocksConfig.cls: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | @IsTest 5 | public class fflib_ApexMocksConfig 6 | { 7 | /** 8 | * When false, stubbed behaviour and invocation counts are shared among all test spies. 9 | * - See fflib_ApexMocksTest.thatMultipleInstancesCanBeMockedDependently 10 | * - This is the default for backwards compatibility. 11 | * When true, each test spy instance has its own stubbed behaviour and invocations. 12 | * - See fflib_ApexMocksTest.thatMultipleInstancesCanBeMockedIndependently 13 | */ 14 | public static Boolean HasIndependentMocks {get; set;} 15 | 16 | static 17 | { 18 | HasIndependentMocks = false; 19 | } 20 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/service/interface/OpportunitiesService.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: OpportunitiesService 3 | * Description: 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer 6 | */ 7 | public interface OpportunitiesService 8 | { 9 | void logLastActivityDateOnParentAccount(Set opportunityIds); 10 | void logLastActivityDateOnParentAccount(List opportunityRecords); 11 | void logLastActivityDateOnParentAccount(Opportunities opportunities); 12 | void logLastActivityDateOnParentAccount(Opportunities opportunities, Accounts accounts); 13 | 14 | void logLastActivityDateOnParentAccount( 15 | fflib_ISObjectUnitOfWork unitOfWork, 16 | Opportunities opportunities, 17 | Accounts accounts 18 | ); 19 | } -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/services/IAccountsService.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: IAccountsService 3 | * Description: 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | public interface IAccountsService 8 | { 9 | void copyShippingCountryToContacts(Set accountIds); 10 | void copyShippingCountryToContacts(List records); 11 | void copyShippingCountryToContacts(IAccounts accounts); 12 | void copyShippingCountryToContacts(fflib_ISObjectUnitOfWork unitOfWork, IAccounts accounts); 13 | 14 | void recalculateRating(Set accountIds); 15 | void recalculateRating(List records); 16 | void recalculateRating(IAccounts accounts); 17 | void recalculateRating(fflib_ISObjectUnitOfWork unitOfWork, IAccounts accounts); 18 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/application-factory/objects/fflib_EventListener__mdt/fields/AppName__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AppName__c 4 | The name of the application. Use only when namespaces are not used 5 | false 6 | DeveloperControlled 7 | The name of the application the listener. This field is case sensitive 8 | 9 | 255 10 | true 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/application-factory/objects/fflib_EventListener__mdt/fields/Priority__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Priority__c 4 | 0 5 | The order of priority, used while calling the listeners for an event. The highest number will be called first. 6 | false 7 | DeveloperControlled 8 | 9 | 18 10 | true 11 | 0 12 | Number 13 | false 14 | 15 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/objects/fflib_Binding__mdt/fields/AppName__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | When no Namespace is used, provide here the name for the application/package 4 | AppName__c 5 | false 6 | SubscriberControlled 7 | When no Namespace is used, provide here the name for the application/package 8 | 9 | 40 10 | false 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/selector/AccountsSelectorImp.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: AccountsSelectorImp 3 | * Description: Selector implementation for the SObjectType Schema.Account 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer 6 | */ 7 | public class AccountsSelectorImp extends fflib_SObjectSelector 8 | { 9 | public List getSObjectFieldList() 10 | { 11 | return new List 12 | { 13 | Account.Id, 14 | Account.Description 15 | }; 16 | } 17 | 18 | public Schema.SObjectType getSObjectType() 19 | { 20 | return Account.SObjectType; 21 | } 22 | 23 | public List selectById(Set idSet) 24 | { 25 | return (List) selectSObjectsById(idSet); 26 | } 27 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # fflib-training-sessions 2 | Examples used in Apex Enterprise Patterns training sessions 3 | 4 | [Basics of Separation Of Concern](fflib-soc-basics/README.md) 5 | Source that will show how to develop a simple user story into code using the Apex Enterprise Patterns 6 | 7 | [Classic Handling trigger logic with AEP 2.0](fflib2-classic-triggerhandling/README.md) 8 | Example of how to develop business logic that need to be triggered on record changes. 9 | It is using the classic approach with Application Factories based on Maps using AEP 2.0 10 | 11 | [Handling trigger logic with AEP 2.0 and Force-Di](fflib2-forcedi-triggerhandling/README.md) 12 | Example of how to develop business logic that need to be triggered on record changes. 13 | It is using Force-di bindings with AEP 2.0 14 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/objects/fflib_Binding__mdt/fields/BindingObject__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | The controlling SObject linked to this binding 4 | BindingObject__c 5 | false 6 | DeveloperControlled 7 | 8 | EntityDefinition 9 | Bindings 10 | fflib_Bindings 11 | false 12 | MetadataRelationship 13 | false 14 | 15 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/objects/di_Binding__mdt/validationRules/BindObj_Or_BindObjAlt.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | BindObj_Or_BindObjAlt 4 | true 5 | This validation rule ensures that only the "Binding Object" or the "Binding Object Alternate" field is specified and not both. 6 | NOT( ISBLANK( BindingObject__c ) ) && NOT( ISBLANK( BindingObjectAlternate__c ) ) 7 | Only specify the "Binding Object" field or the "Binding Object Alternate" field; not both. 8 | 9 | -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex RestResource.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | @RestResource(urlMapping='/{{ url }}') 4 | global with sharing class ${NAME} 5 | { 6 | 7 | @HttpGet 8 | global static {{ object_name }} show() 9 | { 10 | 11 | {{ object_name }} obj; 12 | 13 | return obj; 14 | 15 | } 16 | 17 | 18 | @HttpPost 19 | global static {{ object_name }} create() 20 | { 21 | 22 | {{ object_name }} obj; 23 | 24 | return obj; 25 | 26 | } 27 | 28 | 29 | @HttpPut 30 | global static {{ object_name }} updateObject() 31 | { 32 | 33 | {{ object_name }} obj; 34 | 35 | return obj; 36 | 37 | } 38 | 39 | 40 | @HttpDelete 41 | global static void remove() 42 | { 43 | 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/selector/OpportunitiesSelectorImp.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: OpportunitiesSelectorImp 3 | * Description: Selector implementation for the SObjectType Schema.Opportunity 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer 6 | */ 7 | public class OpportunitiesSelectorImp extends fflib_SObjectSelector 8 | { 9 | public List getSObjectFieldList() 10 | { 11 | return new List 12 | { 13 | Opportunity.Id, 14 | Opportunity.AccountId 15 | }; 16 | } 17 | 18 | public Schema.SObjectType getSObjectType() 19 | { 20 | return Opportunity.SObjectType; 21 | } 22 | 23 | public List selectById(Set idSet) 24 | { 25 | return (List) selectSObjectsById(idSet); 26 | } 27 | } -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex Domain Class.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | // Click on each word below, click CONTROL-COMMAND-G, change it into the desired name and remove this comment afterwards 4 | // SOBJECTNAME 5 | 6 | public class ${NAME} extends fflib_SObjectDomain 7 | { 8 | 9 | public ${NAME}(List records) 10 | { 11 | super(records, Schema.SOBJECTNAME.SObjectType); 12 | } 13 | 14 | 15 | public class Constructor implements fflib_SObjectDomain.IConstructable2 16 | { 17 | public fflib_SObjectDomain construct(List sObjectList) 18 | { 19 | return new ${NAME}(sObjectList); 20 | } 21 | 22 | public fflib_SObjectDomain construct(List sObjectList, SObjectType sObjectType) 23 | { 24 | return new ${NAME}(sObjectList); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /fflib-soc-basics/.gitignore: -------------------------------------------------------------------------------- 1 | # This file is used for Git repositories to specify intentionally untracked files that Git should ignore. 2 | # If you are not using git, you can delete this file. For more information see: https://git-scm.com/docs/gitignore 3 | # For useful gitignore templates see: https://github.com/github/gitignore 4 | 5 | # Salesforce cache 6 | .sfdx/ 7 | .localdevserver/ 8 | 9 | # LWC VSCode autocomplete 10 | **/lwc/jsconfig.json 11 | 12 | # LWC Jest coverage reports 13 | coverage/ 14 | 15 | # Logs 16 | logs 17 | *.log 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | 22 | # Dependency directories 23 | node_modules/ 24 | 25 | # Eslint cache 26 | .eslintcache 27 | 28 | # MacOS system files 29 | .DS_Store 30 | 31 | # Windows system files 32 | Thumbs.db 33 | ehthumbs.db 34 | [Dd]esktop.ini 35 | $RECYCLE.BIN/ 36 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/aura/di_injectorAttribute/di_injectorAttribute.cmp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 12 | 13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/test/classes/fflib_TestAccountsMock.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: fflib_TestAccounts 3 | * Description: Mock Accounts Domain class to be used in unit-tests 4 | * @author: architect ir. Wilhelmus G.J. Velzeboer 5 | */ 6 | @IsTest 7 | public class fflib_TestAccountsMock extends fflib_SObjectDomain 8 | { 9 | public fflib_TestAccountsMock(List records) 10 | { 11 | super(records); 12 | } 13 | 14 | public class Constructor implements fflib_SObjectDomain.IConstructable2 15 | { 16 | public fflib_SObjectDomain construct(List sObjectList) 17 | { 18 | return new fflib_TestAccountsMock(sObjectList); 19 | } 20 | 21 | public fflib_SObjectDomain construct(List sObjectList, SObjectType sObjectType) 22 | { 23 | return new fflib_TestAccountsMock(sObjectList); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/objects/fflib_Binding__mdt/fields/SubType__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SubType__c 4 | false 5 | SubscriberControlled 6 | 7 | false 8 | Picklist 9 | 10 | true 11 | 12 | false 13 | 14 | Elevated 15 | true 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/objects/di_Configurations__c/fields/UsePlatformCacheToStoreBindings__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | UsePlatformCacheToStoreBindings__c 4 | false 5 | If checked, and a Platform Cache partition is specified, then Force-DI will store all bindings in the Platform Cache system on Salesforce. 6 | false 7 | If checked, and a Platform Cache partition is specified, then Force-DI will store all bindings in the Platform Cache system on Salesforce. 8 | 9 | false 10 | Checkbox 11 | 12 | -------------------------------------------------------------------------------- /fflib-soc-basics/.idea/copyright/AEP_Training.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/objects/di_Configurations__c/fields/OrgCachePartitionName__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | OrgCachePartitionName__c 4 | The partition name to store the binding records to. If this value is not specified, the bindings will be stored to the main Org Platform Cache. 5 | false 6 | The partition name to store the binding records to. If this value is not specified, the bindings will be stored to the main Org Platform Cache. 7 | 8 | 255 9 | false 10 | false 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/controllers/AccountViewController.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: AccountViewController 3 | * Description: 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | public with sharing class AccountViewController 8 | { 9 | private Account accountRecord; 10 | 11 | public AccountViewController(ApexPages.StandardController stdController) 12 | { 13 | this.accountRecord = (Account) stdController.getRecord(); 14 | } 15 | 16 | public PageReference onRecalculateRatingButtonClick() 17 | { 18 | System.Savepoint savePoint = Database.setSavepoint(); 19 | try 20 | { 21 | AccountsService.recalculateRating(new List { this.accountRecord }); 22 | } 23 | catch (Exception e) 24 | { 25 | Database.rollback(savePoint); 26 | ApexPages.addMessages(e); 27 | } 28 | return null; 29 | } 30 | } -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/AccountTriggerHandler.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: AccountsImp 3 | * Description: 4 | * 5 | * This file is part of an Apex EnterPrise Training. 6 | * 7 | * You can redistribute it and/or modify it under the terms of the 8 | * GNU General Public License as published by the Free Software 9 | * Foundation, either version 3 of the License, or any later version. 10 | * 11 | * This file is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Foobar. If not, see . 18 | * 19 | * @author: architect ir. Wilhelmus G.J. Velzeboer 20 | */ 21 | public interface AccountTriggerHandler extends fflib_ISObjectDomain 22 | { 23 | } -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/selectors/CasesSelector.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: CasesSelector 3 | * Description: Selector implementation for Case records 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | public virtual inherited sharing class CasesSelector 8 | extends fflib_SObjectSelector 9 | implements ICasesSelector 10 | { 11 | public static ICasesSelector newInstance() 12 | { 13 | return (ICasesSelector) Application.Selector.newInstance(Schema.Case.SObjectType); 14 | } 15 | 16 | public List getSObjectFieldList() 17 | { 18 | return new List 19 | { 20 | Case.Id, 21 | Case.CaseNumber, 22 | Case.Priority, 23 | Case.Status, 24 | Case.Subject 25 | }; 26 | } 27 | 28 | public Schema.SObjectType getSObjectType() 29 | { 30 | return Case.SObjectType; 31 | } 32 | 33 | public List selectById(Set idSet) 34 | { 35 | return (List) selectSObjectsById(idSet); 36 | } 37 | } -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex Selector Class.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | // Click on each word below, click CONTROL-COMMAND-G, change it into the desired name and remove this comment afterwards 4 | // SOBJECTNAME 5 | 6 | public class ${NAME} extends fflib_SObjectSelector 7 | { 8 | public List getSObjectFieldList() 9 | { 10 | return new List { 11 | SOBJECTNAME.Id 12 | }; 13 | } 14 | 15 | public Schema.SObjectType getSObjectType() 16 | { 17 | return SOBJECTNAME.SObjectType; 18 | } 19 | 20 | public List selectById(Set idSet) 21 | { 22 | return (List) selectSObjectsById(idSet); 23 | } 24 | 25 | public List selectBySomethingElse(List names) 26 | { 27 | return (List) Database.query( 28 | newQueryFactory() 29 | .selectField('Name') 30 | .setCondition('Name IN :names') 31 | .toSOQL() 32 | ); 33 | } 34 | } -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/Accounts.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: Accounts 3 | * Description: 4 | * 5 | * This file is part of an Apex EnterPrise Training. 6 | * 7 | * You can redistribute it and/or modify it under the terms of the 8 | * GNU General Public License as published by the Free Software 9 | * Foundation, either version 3 of the License, or any later version. 10 | * 11 | * This file is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Foobar. If not, see . 18 | * 19 | * @author: architect ir. Wilhelmus G.J. Velzeboer 20 | */ 21 | public interface Accounts 22 | { 23 | Map getShippingCountryById(); 24 | Set getRecordIds(); 25 | } -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/ContactsSelector.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: ContactsSelector 3 | * Description: 4 | * 5 | * This file is part of an Apex EnterPrise Training. 6 | * 7 | * You can redistribute it and/or modify it under the terms of the 8 | * GNU General Public License as published by the Free Software 9 | * Foundation, either version 3 of the License, or any later version. 10 | * 11 | * This file is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Foobar. If not, see . 18 | * 19 | * @author: architect ir. Wilhelmus G.J. Velzeboer 20 | */ 21 | public interface ContactsSelector 22 | { 23 | List selectByAccountId(Set accountIds); 24 | } -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/Contacts.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: Contacts 3 | * Description: 4 | * 5 | * This file is part of an Apex EnterPrise Training. 6 | * 7 | * You can redistribute it and/or modify it under the terms of the 8 | * GNU General Public License as published by the Free Software 9 | * Foundation, either version 3 of the License, or any later version. 10 | * 11 | * This file is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Foobar. If not, see . 18 | * 19 | * @author: architect ir. Wilhelmus G.J. Velzeboer 20 | */ 21 | public interface Contacts extends fflib_ISObjectDomain 22 | { 23 | void setMailingCountryByAccountId(Map shippingCountryById); 24 | } -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex HttpCalloutMock.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | @IsTest 4 | public class ${NAME} implements HttpCalloutMock 5 | { 6 | 7 | protected Integer code; 8 | protected String status; 9 | protected String body; 10 | protected Map responseHeaders; 11 | 12 | 13 | public ${NAME}(Integer code, String status, String body, Map responseHeaders) 14 | { 15 | this.code = code; 16 | this.status = status; 17 | this.body = body; 18 | this.responseHeaders = responseHeaders; 19 | } 20 | 21 | 22 | public HTTPResponse respond(HTTPRequest req) 23 | { 24 | 25 | HttpResponse res = new HttpResponse(); 26 | for (String key : this.responseHeaders.keySet()) { 27 | res.setHeader(key, this.responseHeaders.get(key)); 28 | } 29 | res.setBody(this.body); 30 | res.setStatusCode(this.code); 31 | res.setStatus(this.status); 32 | return res; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_QualifiedMethodAndArgValues.cls: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016-2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | 5 | /** 6 | * @group Core 7 | */ 8 | public with sharing class fflib_QualifiedMethodAndArgValues 9 | { 10 | private final fflib_QualifiedMethod qm; 11 | private final fflib_MethodArgValues args; 12 | private final Object mockInstance; 13 | 14 | public fflib_QualifiedMethodAndArgValues(fflib_QualifiedMethod qm, fflib_MethodArgValues args, Object mockInstance) 15 | { 16 | this.qm = qm; 17 | this.args = args; 18 | this.mockInstance = mockInstance; 19 | } 20 | 21 | public fflib_QualifiedMethod getQualifiedMethod() 22 | { 23 | return qm; 24 | } 25 | 26 | public fflib_MethodArgValues getMethodArgValues() 27 | { 28 | return args; 29 | } 30 | 31 | public Object getMockInstance() 32 | { 33 | return mockInstance; 34 | } 35 | 36 | public override String toString() 37 | { 38 | return qm + ' with args: [' + String.join(args.argValues, '],[') + ']'; 39 | } 40 | } -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/triggerHandlers/ContactsTriggerHandler.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: ContactsTriggerHandler 3 | * Description: 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | public class ContactsTriggerHandler extends fflib_SObjectDomain 8 | { 9 | 10 | public ContactsTriggerHandler(List records) 11 | { 12 | super(records, Schema.Contact.SObjectType); 13 | } 14 | 15 | public override void onAfterInsert() 16 | { 17 | increaseNumberOfEmployees(); 18 | } 19 | 20 | private void increaseNumberOfEmployees() 21 | { 22 | // ContactsService.increaseAccountNumberOfEmployees(); 23 | } 24 | 25 | public class Constructor implements fflib_SObjectDomain.IConstructable2 26 | { 27 | public fflib_SObjectDomain construct(List sObjectList) 28 | { 29 | return new ContactsTriggerHandler(sObjectList); 30 | } 31 | 32 | public fflib_SObjectDomain construct(List sObjectList, SObjectType sObjectType) 33 | { 34 | return new ContactsTriggerHandler(sObjectList); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/main/classes/fflib_QualifiedMethodAndArgValues.cls: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016-2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | 5 | /** 6 | * @group Core 7 | */ 8 | public with sharing class fflib_QualifiedMethodAndArgValues 9 | { 10 | private final fflib_QualifiedMethod qm; 11 | private final fflib_MethodArgValues args; 12 | private final Object mockInstance; 13 | 14 | public fflib_QualifiedMethodAndArgValues(fflib_QualifiedMethod qm, fflib_MethodArgValues args, Object mockInstance) 15 | { 16 | this.qm = qm; 17 | this.args = args; 18 | this.mockInstance = mockInstance; 19 | } 20 | 21 | public fflib_QualifiedMethod getQualifiedMethod() 22 | { 23 | return qm; 24 | } 25 | 26 | public fflib_MethodArgValues getMethodArgValues() 27 | { 28 | return args; 29 | } 30 | 31 | public Object getMockInstance() 32 | { 33 | return mockInstance; 34 | } 35 | 36 | public override String toString() 37 | { 38 | return qm + ' with args: [' + String.join(args.argValues, '],[') + ']'; 39 | } 40 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/objects/di_Binding__mdt/fields/BindingObjectAlternate__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | BindingObjectAlternate__c 4 | Use this field to specify the SObject API name to bind to when the "Binding Object" field does not list that particular SObject. Only specify the "Binding Object" field or this one; not both. 5 | false 6 | SubscriberControlled 7 | Use this field to specify the SObject API name to bind to when the "Binding Object" field does not list that particular SObject. Only specify the "Binding Object" field or this one; not both. 8 | 9 | 255 10 | false 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/objects/fflib_Binding__mdt/fields/BindingObjectAlternate__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | BindingObjectAlternate__c 4 | Use this field to specify the SObject API name to bind to when the "Binding Object" field does not list that particular SObject. Only specify the "Binding Object" field or this one; not both. 5 | false 6 | SubscriberControlled 7 | Use this field to specify the SObject API name to bind to when the "Binding Object" field does not list that particular SObject. Only specify the "Binding Object" field or this one; not both. 8 | 9 | 255 10 | false 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/selectors/AccountsSelector.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: AccountsSelector 3 | * Description: Selector implementation for Account records 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | public virtual inherited sharing class AccountsSelector 8 | extends fflib_SObjectSelector 9 | implements IAccountsSelector 10 | { 11 | public static IAccountsSelector newInstance() 12 | { 13 | return (IAccountsSelector) Application.Selector.newInstance(Schema.Account.SObjectType); 14 | } 15 | 16 | public List getSObjectFieldList() 17 | { 18 | return new List 19 | { 20 | Account.Id, 21 | Account.AccountNumber, 22 | Account.Name, 23 | Account.NumberOfEmployees, 24 | Account.Rating, 25 | Account.ShippingCountry 26 | }; 27 | } 28 | 29 | public Schema.SObjectType getSObjectType() 30 | { 31 | return Account.SObjectType; 32 | } 33 | 34 | public List selectById(Set idSet) 35 | { 36 | return (List) selectSObjectsById(idSet); 37 | } 38 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/customMetadata/di_Binding.ApexEnterprisePatternsModule.md-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | BindingObjectAlternate__c 7 | 8 | 9 | 10 | BindingObject__c 11 | 12 | 13 | 14 | BindingSequence__c 15 | 10.0 16 | 17 | 18 | To__c 19 | fflib_CustomMetaDataModule 20 | 21 | 22 | Type__c 23 | Module 24 | 25 | 26 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/triggers/AccountTrigger.trigger: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: AccountTrigger 3 | * Description: 4 | * 5 | * This file is part of an Apex EnterPrise Training. 6 | * 7 | * You can redistribute it and/or modify it under the terms of the 8 | * GNU General Public License as published by the Free Software 9 | * Foundation, either version 3 of the License, or any later version. 10 | * 11 | * This file is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Foobar. If not, see . 18 | * 19 | * @author: architect ir. Wilhelmus G.J. Velzeboer 20 | */ 21 | trigger AccountTrigger on Account 22 | (before insert, before update, before delete, after insert, after update, after delete, after undelete) 23 | { 24 | fflib_SObjectDomain.triggerHandler(AccountTriggerHandlerImp.class); 25 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/test/classes/fflib_TestAccounts.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: fflib_TestAccounts 3 | * Description: Accounts Domain class to be used in unit-tests 4 | * @author: architect ir. Wilhelmus G.J. Velzeboer 5 | */ 6 | @IsTest 7 | public class fflib_TestAccounts extends fflib_SObjectDomain 8 | { 9 | public fflib_TestAccounts(List records) 10 | { 11 | super(records); 12 | } 13 | 14 | public class InvalidConstructor 15 | { 16 | } 17 | 18 | public class Constructor implements fflib_SObjectDomain.IConstructable2 19 | { 20 | public fflib_SObjectDomain construct(List sObjectList) 21 | { 22 | return new fflib_TestAccounts(sObjectList); 23 | } 24 | 25 | public fflib_SObjectDomain construct(List sObjectList, SObjectType sObjectType) 26 | { 27 | return new fflib_TestAccounts(sObjectList); 28 | } 29 | } 30 | 31 | public class LegacyConstructor implements fflib_SObjectDomain.IConstructable 32 | { 33 | public fflib_SObjectDomain construct(List sObjectList) 34 | { 35 | return new fflib_TestAccounts(sObjectList); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/EventListeners/OnChangeOppLogActivityOnRelatedAccounts.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: OnChangeOppLogActivityOnRelatedAccounts 3 | * Description: Event Listener interface on Opportunities to log the last Activity date on the related Account records 4 | * 5 | * This file is part of an Apex EnterPrise Patterns Training. 6 | * 7 | * You can redistribute it and/or modify it under the terms of the 8 | * GNU General Public License as published by the Free Software 9 | * Foundation, either version 3 of the License, or any later version. 10 | * 11 | * This file is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Foobar. If not, see . 18 | * 19 | * @author: architect ir. Wilhelmus G.J. Velzeboer 20 | */ 21 | public interface OnChangeOppLogActivityOnRelatedAccounts 22 | { 23 | 24 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/domains/Opportunities.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: Opportunities 3 | * Description: Domain interface class for the SObjectType Schema.Opportunity 4 | * 5 | * This file is part of an Apex EnterPrise Patterns Training. 6 | * 7 | * You can redistribute it and/or modify it under the terms of the 8 | * GNU General Public License as published by the Free Software 9 | * Foundation, either version 3 of the License, or any later version. 10 | * 11 | * This file is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Foobar. If not, see . 18 | * 19 | * @author: architect ir. Wilhelmus G.J. Velzeboer 20 | */ 21 | public interface Opportunities extends fflib_Domain 22 | { 23 | /* Getters */ 24 | Map getByAccountId(); 25 | Datetime getMostRecentLastModifiedData(); 26 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/triggers/OpportunityTrigger.trigger: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: OpportunityTrigger 3 | * Description: Trigger for Opportunities emitting a SObjectEvent 4 | * 5 | * This file is part of an Apex EnterPrise Patterns Training. 6 | * 7 | * You can redistribute it and/or modify it under the terms of the 8 | * GNU General Public License as published by the Free Software 9 | * Foundation, either version 3 of the License, or any later version. 10 | * 11 | * This file is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Foobar. If not, see . 18 | * 19 | * @author: architect ir. Wilhelmus G.J. Velzeboer 20 | */ 21 | trigger OpportunityTrigger on Opportunity 22 | (before insert, before update, before delete, after insert, after update, after delete, after undelete) 23 | { 24 | Application.EventEmitter.emit(new fflib_SObjectEvent()); 25 | } -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/AccountsService.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: AccountsService 3 | * Description: 4 | * 5 | * This file is part of an Apex EnterPrise Training. 6 | * 7 | * You can redistribute it and/or modify it under the terms of the 8 | * GNU General Public License as published by the Free Software 9 | * Foundation, either version 3 of the License, or any later version. 10 | * 11 | * This file is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Foobar. If not, see . 18 | * 19 | * @author: architect ir. Wilhelmus G.J. Velzeboer 20 | */ 21 | public interface AccountsService 22 | { 23 | void copyShippingCountryToContacts(Set idSet); 24 | void copyShippingCountryToContacts(List records); 25 | void copyShippingCountryToContacts(Accounts accounts); 26 | void copyShippingCountryToContacts(fflib_ISObjectUnitOfWork unitOfWork, Accounts accounts); 27 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/aura/di_injectorFlowProxy/di_injectorFlowProxyHelper.js: -------------------------------------------------------------------------------- 1 | ({ 2 | /** 3 | * Given a the data type from an injector attribute component, 4 | * infers the corresponding Flow data type. 5 | * 6 | * https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_flow_tips_map.htm 7 | * https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_primitives.htm 8 | */ 9 | getFlowDataTypeForApexDataType: function( apexDataType ) { 10 | 11 | // TODO support collection types 12 | 13 | var flowDataTypeMappings = { 14 | 'integer' : 'Number', 15 | 'long' : 'Number', 16 | 'double' : 'Number', 17 | 'decimal' : 'Number', 18 | 'string' : 'String', 19 | 'boolean' : 'Boolean', 20 | 'date' : 'Date', 21 | 'datetime' : 'DateTime' 22 | }; 23 | 24 | var flowDataType = flowDataTypeMappings[apexDataType.toLowerCase()]; 25 | 26 | if ( $A.util.isEmpty( flowDataType ) ) { 27 | flowDataType = 'SObject'; // default 28 | } 29 | 30 | return flowDataType; 31 | } 32 | }) -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/domains/Accounts.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: Accounts 3 | * Description: Domain interface class for the SObjectType Schema.Account 4 | * 5 | * This file is part of an Apex EnterPrise Patterns Training. 6 | * 7 | * You can redistribute it and/or modify it under the terms of the 8 | * GNU General Public License as published by the Free Software 9 | * Foundation, either version 3 of the License, or any later version. 10 | * 11 | * This file is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Foobar. If not, see . 18 | * 19 | * @author: architect ir. Wilhelmus G.J. Velzeboer 20 | */ 21 | public interface Accounts extends fflib_Domain 22 | { 23 | /* Getters */ 24 | List getAccounts(); 25 | 26 | /* Setters */ 27 | void setDescription(String value); 28 | 29 | /* Business Logic */ 30 | void updateOpportunityActivity(); 31 | 32 | void setLastOpportunityRaisedDate(Map datesByIds); 33 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/aura/di_injectorFlowProxy/di_injectorFlowProxy.cmp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /SoC/force-app/main/tests/classes/controllers/AccountViewControllerTest.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: AccountViewControllerTest 3 | * Description: 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | @IsTest 8 | private class AccountViewControllerTest 9 | { 10 | @IsTest 11 | static void testBehavior() 12 | { 13 | // GIVEN - a Race record 14 | Account record = new Account(Id = fflib_IDGenerator.generate(Schema.Account.SObjectType)); 15 | 16 | ApexPages.StandardController standardController = 17 | new ApexPages.StandardController(record); 18 | 19 | fflib_ApexMocks mocks = new fflib_ApexMocks(); 20 | IAccountsService serviceMock = (IAccountsService) mocks.mock(IAccountsService.class); 21 | Application.Service.setMock(IAccountsService.class, serviceMock); 22 | 23 | // WHEN - The UI calls the controller method onRecalculateRating 24 | PageReference result = 25 | new AccountViewController(standardController) 26 | .onRecalculateRatingButtonClick(); 27 | 28 | // THEN - The controller called the service class and returned a null value 29 | ((IAccountsService) mocks.verify(serviceMock)).recalculateRating(new List{ record }); 30 | System.assertEquals(null, result, 'Incorrect returned result'); 31 | } 32 | } -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_InheritorTest.cls: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | @isTest 5 | public class fflib_InheritorTest 6 | { 7 | @isTest 8 | public static void canInstantiateMultipleInterfaceInheritor() 9 | { 10 | fflib_ApexMocks mocks = new fflib_ApexMocks(); 11 | Object inheritor = mocks.mock(fflib_Inheritor.class); 12 | System.assert(inheritor instanceof fflib_Inheritor.IA); 13 | System.assert(inheritor instanceof fflib_Inheritor.IB); 14 | System.assert(inheritor instanceof fflib_Inheritor.IC); 15 | } 16 | 17 | @isTest 18 | public static void canStubMultipleInterfaceInheritor() 19 | { 20 | fflib_ApexMocks mocks = new fflib_ApexMocks(); 21 | fflib_Inheritor inheritor = (fflib_Inheritor)mocks.mock(fflib_Inheritor.class); 22 | 23 | mocks.startStubbing(); 24 | mocks.when(inheritor.doA()).thenReturn('Did not do A'); 25 | mocks.when(inheritor.doB()).thenReturn('Did not do B'); 26 | mocks.when(inheritor.doC()).thenReturn('Did not do C'); 27 | mocks.stopStubbing(); 28 | 29 | System.assertEquals('Did not do A', inheritor.doA()); 30 | System.assertEquals('Did not do B', inheritor.doB()); 31 | System.assertEquals('Did not do C', inheritor.doC()); 32 | } 33 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_InheritorTest.cls: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | @isTest 5 | public class fflib_InheritorTest 6 | { 7 | @isTest 8 | public static void canInstantiateMultipleInterfaceInheritor() 9 | { 10 | fflib_ApexMocks mocks = new fflib_ApexMocks(); 11 | Object inheritor = mocks.mock(fflib_Inheritor.class); 12 | System.assert(inheritor instanceof fflib_Inheritor.IA); 13 | System.assert(inheritor instanceof fflib_Inheritor.IB); 14 | System.assert(inheritor instanceof fflib_Inheritor.IC); 15 | } 16 | 17 | @isTest 18 | public static void canStubMultipleInterfaceInheritor() 19 | { 20 | fflib_ApexMocks mocks = new fflib_ApexMocks(); 21 | fflib_Inheritor inheritor = (fflib_Inheritor)mocks.mock(fflib_Inheritor.class); 22 | 23 | mocks.startStubbing(); 24 | mocks.when(inheritor.doA()).thenReturn('Did not do A'); 25 | mocks.when(inheritor.doB()).thenReturn('Did not do B'); 26 | mocks.when(inheritor.doC()).thenReturn('Did not do C'); 27 | mocks.stopStubbing(); 28 | 29 | System.assertEquals('Did not do A', inheritor.doA()); 30 | System.assertEquals('Did not do B', inheritor.doB()); 31 | System.assertEquals('Did not do C', inheritor.doC()); 32 | } 33 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/force-di/main/objects/fflib_Binding__mdt/fields/Type__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Type__c 4 | false 5 | SubscriberControlled 6 | 7 | true 8 | Picklist 9 | 10 | true 11 | 12 | false 13 | 14 | Domain 15 | true 16 | 17 | 18 | 19 | Service 20 | false 21 | 22 | 23 | 24 | Selector 25 | false 26 | 27 | 28 | 29 | Other 30 | false 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/dataObjects/PartnerContact.cls: -------------------------------------------------------------------------------- 1 | public with sharing class PartnerContact 2 | { 3 | private Contact record; 4 | 5 | public Id recordId 6 | { 7 | get { return this.record.Id; } 8 | set { this.record.Id = value; } 9 | } 10 | 11 | public Id accountId 12 | { 13 | get { return this.record.AccountId; } 14 | set { this.record.Id = value; } 15 | } 16 | 17 | public String assistantName 18 | { 19 | get { return this.record.AssistantName; } 20 | set { this.record.AssistantName = value; } 21 | } 22 | 23 | public String assistantPhone 24 | { 25 | get { return this.record.AssistantPhone; } 26 | set { this.record.AssistantPhone = value; } 27 | } 28 | 29 | public String email 30 | { 31 | get { return this.record.Email; } 32 | set { this.record.Email = value; } 33 | } 34 | 35 | public String firstName 36 | { 37 | get { return this.record.FirstName; } 38 | set { this.record.FirstName = value; } 39 | } 40 | 41 | public String lastName 42 | { 43 | get { return this.record.LastName; } 44 | set { this.record.LastName = value; } 45 | } 46 | 47 | public Id reportsToId 48 | { 49 | get { return this.record.ReportsToId; } 50 | set { this.record.ReportsToId = value; } 51 | } 52 | 53 | public String title 54 | { 55 | get { return this.record.Title; } 56 | set { this.record.Title = value; } 57 | } 58 | 59 | public PartnerContact(Contact record) 60 | { 61 | this.record = record; 62 | } 63 | } -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/services/AccountsService.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: MyWebService 3 | * Description: 4 | * 5 | * @author : architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | public with sharing class AccountsService 8 | { 9 | private AccountsService() {} 10 | 11 | public static void copyShippingCountryToContacts(Set accountIds) 12 | { 13 | service().copyShippingCountryToContacts(accountIds); 14 | } 15 | 16 | public static void copyShippingCountryToContacts(List records) 17 | { 18 | service().copyShippingCountryToContacts(records); 19 | } 20 | 21 | public static void copyShippingCountryToContacts(IAccounts accounts) 22 | { 23 | service().copyShippingCountryToContacts(accounts); 24 | } 25 | 26 | public static void copyShippingCountryToContacts(fflib_ISObjectUnitOfWork unitOfWork, IAccounts accounts) 27 | { 28 | service().copyShippingCountryToContacts(unitOfWork, accounts); 29 | } 30 | 31 | public static void recalculateRating(Set accountIds) 32 | { 33 | service().recalculateRating(accountIds); 34 | } 35 | 36 | public static void recalculateRating(List records) 37 | { 38 | service().recalculateRating(records); 39 | } 40 | 41 | public static void recalculateRating(IAccounts accounts) 42 | { 43 | service().recalculateRating(accounts); 44 | } 45 | 46 | private static IAccountsService service() 47 | { 48 | return (IAccountsService) Application.Service.newInstance(IAccountsService.class); 49 | } 50 | } -------------------------------------------------------------------------------- /fflib-soc-basics/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "salesforce-app", 3 | "private": true, 4 | "version": "1.0.0", 5 | "description": "Salesforce App", 6 | "scripts": { 7 | "lint": "npm run lint:lwc && npm run lint:aura", 8 | "lint:aura": "eslint **/aura/**", 9 | "lint:lwc": "eslint **/lwc/**", 10 | "test": "npm run test:unit", 11 | "test:unit": "sfdx-lwc-jest", 12 | "test:unit:watch": "sfdx-lwc-jest --watch", 13 | "test:unit:debug": "sfdx-lwc-jest --debug", 14 | "test:unit:coverage": "sfdx-lwc-jest --coverage", 15 | "prettier": "prettier --write \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"", 16 | "prettier:verify": "prettier --list-different \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"" 17 | }, 18 | "devDependencies": { 19 | "@prettier/plugin-xml": "^0.10.0", 20 | "@salesforce/eslint-config-lwc": "^0.7.0", 21 | "@salesforce/eslint-plugin-aura": "^1.4.0", 22 | "@salesforce/sfdx-lwc-jest": "^0.9.2", 23 | "eslint": "^7.6.0", 24 | "eslint-config-prettier": "^6.11.0", 25 | "husky": "^4.2.1", 26 | "lint-staged": "^10.0.7", 27 | "prettier": "^2.0.5", 28 | "prettier-plugin-apex": "^1.6.0" 29 | }, 30 | "husky": { 31 | "hooks": { 32 | "pre-commit": "lint-staged" 33 | } 34 | }, 35 | "lint-staged": { 36 | "**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}": [ 37 | "prettier --write" 38 | ], 39 | "**/{aura|lwc}/**": [ 40 | "eslint" 41 | ] 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /SoC/force-app/main/tests/classes/domains/ContactsTest.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: ContactsTest 3 | * Description: 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | @IsTest 8 | private class ContactsTest 9 | { 10 | @IsTest 11 | static void itShouldGetTheMailingCountryById() 12 | { 13 | // GIVEN a Domain with contacts related to accounts 14 | Id accountIdA = fflib_IDGenerator.generate(Schema.Account.SObjectType); 15 | Id accountIdB = fflib_IDGenerator.generate(Schema.Account.SObjectType); 16 | 17 | List contactRecords = new List 18 | { 19 | new Contact(Id = fflib_IDGenerator.generate(Schema.Contact.SObjectType), AccountId = accountIdA), 20 | new Contact(Id = fflib_IDGenerator.generate(Schema.Contact.SObjectType), AccountId = accountIdA), 21 | new Contact(Id = fflib_IDGenerator.generate(Schema.Contact.SObjectType), AccountId = accountIdB) 22 | }; 23 | IContacts domain = Contacts.newInstance(contactRecords); 24 | 25 | Map countryByAccountId = new Map 26 | { 27 | accountIdA => 'Ireland', 28 | accountIdB => 'Holland' 29 | }; 30 | 31 | // WHEN 32 | System.Test.startTest(); 33 | domain.setMailingCountryByAccountId(countryByAccountId); 34 | List result = (List) domain.getRecords(); 35 | System.Test.stopTest(); 36 | 37 | // THEN 38 | for (Contact contact : result) 39 | { 40 | System.assertEquals( 41 | countryByAccountId.get(contact.AccountId), 42 | contact.MailingCountry 43 | ); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/test/classes/fflib_MyList.cls: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | 5 | /** 6 | * @nodoc 7 | */ 8 | @isTest 9 | public with sharing class fflib_MyList implements IList 10 | { 11 | public interface IList 12 | { 13 | void add(String value); 14 | void add(String value1, String value2, String value3, String value4); 15 | void addMore(String value); 16 | void add(String[] value); // Test methods with the same name and number of params 17 | String get(Integer index); 18 | String get2(Integer index, String value); // This is just a method signature to allow me to test stubbing a method with multiple arguments 19 | void clear(); 20 | Boolean isEmpty(); 21 | void set(Integer index, Object value); 22 | } 23 | 24 | public void add(String[] value) 25 | { 26 | } 27 | 28 | public void add(String value) 29 | { 30 | } 31 | 32 | public void add(String value1, String value2, String value3, String value4) 33 | { 34 | } 35 | 36 | public void addMore(String value) 37 | { 38 | } 39 | 40 | public String get(Integer index) 41 | { 42 | return 'fred'; 43 | } 44 | 45 | public void clear() 46 | { 47 | } 48 | 49 | public Boolean isEmpty() 50 | { 51 | return true; 52 | } 53 | 54 | public void set(Integer index, Object value) 55 | { 56 | } 57 | 58 | public String get2(Integer index, String value) 59 | { 60 | return 'mary'; 61 | } 62 | 63 | public static String getStubClassName() 64 | { 65 | return fflib_ApexMocks.extractTypeName(new fflib_ApexMocks().mock(fflib_MyList.class)); 66 | } 67 | } -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/domains/Contacts.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: Contacts 3 | * Description: Domain implementation for Contact records 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | public with sharing class Contacts 8 | extends fflib_SObjects 9 | implements IContacts 10 | { 11 | // Class constructor 12 | @TestVisible 13 | private Contacts(List records) 14 | { 15 | super(records, Schema.Contact.SObjectType); 16 | } 17 | 18 | // Method to create new domain instances via record Ids 19 | public static IContacts newInstance(Set ids) 20 | { 21 | return (IContacts) Application.Domain.newInstance(ids); 22 | } 23 | 24 | // Method to create new domain instances via records 25 | public static IContacts newInstance(List records) 26 | { 27 | return (IContacts) Application.Domain.newInstance(records, Schema.Contact.SObjectType); 28 | } 29 | 30 | public List getContacts() 31 | { 32 | return (List) getRecords(); 33 | } 34 | 35 | public void setMailingCountryByAccountId(Map countryByAccountId) 36 | { 37 | for (Contact record : getContacts()) 38 | { 39 | if (countryByAccountId.containsKey(record.AccountId)) 40 | { 41 | record.MailingCountry = countryByAccountId.get(record.AccountId); 42 | } 43 | } 44 | } 45 | 46 | // Sub-class constructor 47 | public class Constructor implements fflib_IDomainConstructor 48 | { 49 | public fflib_IDomain construct(List objectList) 50 | { 51 | return (fflib_IDomain) new Contacts((List) objectList); 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-mocks/test/classes/fflib_MyList.cls: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | 5 | /** 6 | * @nodoc 7 | */ 8 | @isTest 9 | public with sharing class fflib_MyList implements IList 10 | { 11 | public interface IList 12 | { 13 | void add(String value); 14 | void add(String value1, String value2, String value3, String value4); 15 | void addMore(String value); 16 | void add(String[] value); // Test methods with the same name and number of params 17 | String get(Integer index); 18 | String get2(Integer index, String value); // This is just a method signature to allow me to test stubbing a method with multiple arguments 19 | void clear(); 20 | Boolean isEmpty(); 21 | void set(Integer index, Object value); 22 | } 23 | 24 | public void add(String[] value) 25 | { 26 | } 27 | 28 | public void add(String value) 29 | { 30 | } 31 | 32 | public void add(String value1, String value2, String value3, String value4) 33 | { 34 | } 35 | 36 | public void addMore(String value) 37 | { 38 | } 39 | 40 | public String get(Integer index) 41 | { 42 | return 'fred'; 43 | } 44 | 45 | public void clear() 46 | { 47 | } 48 | 49 | public Boolean isEmpty() 50 | { 51 | return true; 52 | } 53 | 54 | public void set(Integer index, Object value) 55 | { 56 | } 57 | 58 | public String get2(Integer index, String value) 59 | { 60 | return 'mary'; 61 | } 62 | 63 | public static String getStubClassName() 64 | { 65 | return fflib_ApexMocks.extractTypeName(new fflib_ApexMocks().mock(fflib_MyList.class)); 66 | } 67 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/objects/di_Binding__mdt/fields/Type__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Type__c 4 | false 5 | SubscriberControlled 6 | 7 | true 8 | Picklist 9 | 10 | true 11 | 12 | false 13 | 14 | Apex 15 | true 16 | 17 | 18 | 19 | LightningComponent 20 | false 21 | 22 | 23 | 24 | VisualforceComponent 25 | false 26 | 27 | 28 | 29 | Flow 30 | false 31 | 32 | 33 | 34 | Module 35 | false 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /fflib-soc-basics/IntelliJ templates/fileTemplates/Apex Class - Application.cls: -------------------------------------------------------------------------------- 1 | #parse("Apex File Header.cls") 2 | 3 | public with sharing class ${NAME} 4 | { 5 | public static final fflib_Application.UnitOfWorkFactory UnitOfWork = 6 | new fflib_Application.UnitOfWorkFactory( 7 | new List 8 | { 9 | Account.SObjectType, 10 | Contact.SObjectType 11 | }); 12 | 13 | // Configure and create the ServiceFactory for this Application 14 | public static final fflib_Application.ServiceFactory Service = 15 | new fflib_Application.ServiceFactory( 16 | new Map 17 | { 18 | // AccountsService.class => AccountsService.class, 19 | // ContactsService.class => ContactsService.class 20 | } 21 | ); 22 | 23 | // Configure and create the SelectorFactory for this Application 24 | public static final fflib_Application.SelectorFactory Selector = 25 | new fflib_Application.SelectorFactory( 26 | new Map 27 | { 28 | // Account.SObjectType => AccountsSelector_CLS.class, 29 | // Attachment.SObjectType => AttachmentsSelector_CLS.class 30 | }); 31 | 32 | // Configure and create the DomainFactory for this Application 33 | public static final fflib_Application.DomainFactory Domain = 34 | new fflib_Application.DomainFactory( 35 | Application_CLS.Selector, 36 | new Map 37 | { 38 | // Account.SObjectType => AccountsImp.Constructor.class, 39 | // Contact.SObjectType => ContactsImp.Constructor.class 40 | }); 41 | } -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/ContactsSelectorImp.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: ContactsSelectorImp 3 | * Description: 4 | * 5 | * This file is part of an Apex EnterPrise Training. 6 | * 7 | * You can redistribute it and/or modify it under the terms of the 8 | * GNU General Public License as published by the Free Software 9 | * Foundation, either version 3 of the License, or any later version. 10 | * 11 | * This file is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Foobar. If not, see . 18 | * 19 | * @author: architect ir. Wilhelmus G.J. Velzeboer 20 | */ 21 | public class ContactsSelectorImp extends fflib_SObjectSelector implements ContactsSelector 22 | { 23 | public List getSObjectFieldList() 24 | { 25 | return new List 26 | { 27 | Contact.Id, 28 | Contact.AccountId 29 | }; 30 | } 31 | 32 | public Schema.SObjectType getSObjectType() 33 | { 34 | return Contact.SObjectType; 35 | } 36 | 37 | public List selectById(Set idSet) 38 | { 39 | return (List) selectSObjectsById(idSet); 40 | } 41 | 42 | public List selectByAccountId(Set accountIds) 43 | { 44 | return (List) Database.query( 45 | newQueryFactory() 46 | .setCondition('AccountId IN :accountIds') 47 | .toSOQL() 48 | ); 49 | } 50 | } -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/selectors/ContactsSelectorTest.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: ContactsSelectorTest 3 | * Description: 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wvelzebo@its.jnj.com 6 | */ 7 | @IsTest 8 | private class ContactsSelectorTest 9 | { 10 | @IsTest 11 | static void testBehavior() 12 | { 13 | Account account = new Account(Name = 'Test'); 14 | insert account; 15 | Contact contact = new Contact(LastName = 'Smith', AccountId = account.Id); 16 | insert contact; 17 | 18 | Profile profile = [SELECT Id FROM Profile WHERE Name = 'Read Only']; 19 | 20 | User testUser = new User( 21 | Alias = 'Black', 22 | LastName = 'Black', 23 | Username = 'TestUser.Black@example.com', 24 | Email = 'TestUser.Black@example.com', 25 | 26 | EmailEncodingKey='UTF-8', 27 | LanguageLocaleKey='en_US', 28 | LocaleSidKey='en_US', 29 | TimeZoneSidKey='America/Los_Angeles', 30 | 31 | ProfileId = profile.Id 32 | ); 33 | 34 | System.assert([SELECT COUNT() FROM Contact] == 1); 35 | 36 | List testData = ContactsSelector.newInstance().selectByAccountId(new Set {account.Id}); 37 | System.assert(testData.size() == 1, 'Test Data selector Failed'); 38 | 39 | 40 | System.runAs(testUser) 41 | { 42 | System.debug('Select Contact with AccountId : '+account.Id); 43 | List contacts = ContactsSelector.newWithoutSharingInstance().selectByAccountId(new Set {account.Id}); 44 | System.assert([SELECT COUNT() FROM Contact WHERE AccountId = :account.Id] == 0, 'SOQL 1 failed'); 45 | System.assert([SELECT COUNT() FROM Contact] == 0, 'SOQL 2 failed'); 46 | System.assert(contacts.size() == 1, 'Selector Failed'); 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /SoC/force-app/main/default/classes/triggerHandlers/AccountsTriggerHandler.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: AccountsTriggerHandler 3 | * Description: 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer | wim@velzeboer.nl 6 | */ 7 | public with sharing class AccountsTriggerHandler extends fflib_SObjectDomain 8 | { 9 | public AccountsTriggerHandler(List records) 10 | { 11 | super(records, Schema.Account.SObjectType); 12 | } 13 | 14 | public override void onBeforeInsert() 15 | { 16 | recalculateRating(); 17 | } 18 | 19 | public override void onBeforeUpdate(Map existingRecords) 20 | { 21 | onChangedNumberOfEmployeesRecalculateRating(); 22 | onChangedCountryCopyValueToContacts(); 23 | } 24 | 25 | private void onChangedCountryCopyValueToContacts() 26 | { 27 | List changedRecords = getChangedRecords(new Set {Schema.Account.ShippingCountry }); 28 | 29 | if (changedRecords.isEmpty()) return; 30 | 31 | AccountsService.copyShippingCountryToContacts((List) changedRecords); 32 | } 33 | 34 | private void onChangedNumberOfEmployeesRecalculateRating() 35 | { 36 | List changedRecords = getChangedRecords(new Set {Schema.Account.NumberOfEmployees}); 37 | 38 | if (changedRecords.isEmpty()) return; 39 | 40 | new AccountsTriggerHandler(changedRecords) 41 | .recalculateRating(); 42 | } 43 | 44 | private void recalculateRating() 45 | { 46 | Accounts.newInstance(getRecords()) 47 | .recalculateRating(); 48 | } 49 | 50 | public class Constructor implements fflib_SObjectDomain.IConstructable 51 | { 52 | public fflib_SObjectDomain construct(List sObjectList) 53 | { 54 | return new AccountsTriggerHandler(sObjectList); 55 | } 56 | } 57 | } 58 | 59 | 60 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/test/classes/di_ModuleTest.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2018, Andrew Fawcett 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * - Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * - Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * - Neither the name of the Andrew Fawcett, nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software without 15 | * specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 20 | * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 23 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | **/ 26 | 27 | @IsTest 28 | private class di_ModuleTest { 29 | } 30 | -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/classes/domains/OpportunitiesImp.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: OpportunitiesImp 3 | * Description: Domain implementation for the SObjectType Schema.Opportunity 4 | * 5 | * This file is part of an Apex EnterPrise Patterns Training. 6 | * 7 | * You can redistribute it and/or modify it under the terms of the 8 | * GNU General Public License as published by the Free Software 9 | * Foundation, either version 3 of the License, or any later version. 10 | * 11 | * This file is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Foobar. If not, see . 18 | * 19 | * @author: architect ir. Wilhelmus G.J. Velzeboer 20 | */ 21 | public with sharing class OpportunitiesImp 22 | extends fflib_SObjects 23 | implements Opportunities 24 | { 25 | 26 | public OpportunitiesImp(List objects) 27 | { 28 | super((List) objects, Schema.Opportunity.SObjectType); 29 | } 30 | 31 | /** 32 | * Accessor method to get a set of AccountIds 33 | * 34 | * @return Set of Schema.Opportunity.AccountId 35 | */ 36 | public Set getAccountIds() 37 | { 38 | return getIdFieldValues(Schema.Opportunity.AccountId); 39 | } 40 | 41 | /** 42 | * Class constructor used by the Application class to dynamically construct this domain implementation 43 | */ 44 | public class Constructor implements fflib_DomainConstructor 45 | { 46 | public fflib_Domain construct(List objects) 47 | { 48 | return new OpportunitiesImp((List) objects); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_Domain.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c), FinancialForce.com, inc 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * - Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * - Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * - Neither the name of the FinancialForce.com, inc nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software without 15 | * specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 20 | * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 23 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | **/ 26 | public interface fflib_Domain 27 | { 28 | Object getType(); 29 | List getObjects(); 30 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/main/classes/fflib_DomainConstructor.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c), FinancialForce.com, inc 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * - Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * - Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * - Neither the name of the FinancialForce.com, inc nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software without 15 | * specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 20 | * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 23 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | **/ 26 | public interface fflib_DomainConstructor 27 | { 28 | fflib_Domain construct(List objects); 29 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/apex-common/events/main/classes/interface/fflib_Event.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: fflib_Event 3 | * Description: Interface for the Event 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer 6 | * 7 | * All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without modification, 10 | * are permitted provided that the following conditions are met: 11 | * 12 | * - Redistributions of source code must retain the above copyright notice, 13 | * this list of conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, 15 | * this list of conditions and the following disclaimer in the documentation 16 | * and/or other materials provided with the distribution. 17 | * - Neither the name of the author nor the names of its contributors 18 | * may be used to endorse or promote products derived from this software without 19 | * specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 24 | * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 27 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | public interface fflib_Event 31 | { 32 | String getName(); 33 | Object getData(); 34 | } -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/force-app/main/default/classes/ContactsImp.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: ContactsImp 3 | * Description: 4 | * 5 | * This file is part of an Apex EnterPrise Training. 6 | * 7 | * You can redistribute it and/or modify it under the terms of the 8 | * GNU General Public License as published by the Free Software 9 | * Foundation, either version 3 of the License, or any later version. 10 | * 11 | * This file is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Foobar. If not, see . 18 | * 19 | * @author: architect ir. Wilhelmus G.J. Velzeboer 20 | */ 21 | public with sharing class ContactsImp extends fflib_SObjectDomain implements Contacts 22 | { 23 | 24 | public ContactsImp(List records) 25 | { 26 | super(records); 27 | } 28 | 29 | public void setMailingCountryByAccountId(Map shippingCountryById) 30 | { 31 | for (Contact record : (List) getRecords()) 32 | { 33 | if (shippingCountryById.containsKey(record.AccountId)) 34 | { 35 | record.MailingCountry = shippingCountryById.get(record.AccountId); 36 | } 37 | } 38 | } 39 | 40 | public class Constructor implements fflib_SObjectDomain.IConstructable2 41 | { 42 | public fflib_SObjectDomain construct(List sObjectList) 43 | { 44 | return new ContactsImp(sObjectList); 45 | } 46 | 47 | public fflib_SObjectDomain construct(List sObjectList, SObjectType sObjectType) 48 | { 49 | return new ContactsImp(sObjectList); 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-app/main/default/service/OpportunitiesServiceImp.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: OpportunitiesServiceImp 3 | * Description: 4 | * 5 | * @author: architect ir. Wilhelmus G.J. Velzeboer 6 | */ 7 | public with sharing class OpportunitiesServiceImp 8 | implements OpportunitiesService 9 | { 10 | public void logLastActivityDateOnParentAccount(Set opportunityIds) 11 | { 12 | logLastActivityDateOnParentAccount( 13 | (Opportunities) Application.Domain.newInstance(opportunityIds) 14 | ); 15 | } 16 | 17 | public void logLastActivityDateOnParentAccount(List opportunityRecords) 18 | { 19 | logLastActivityDateOnParentAccount( 20 | (Opportunities) Application.Domain.newInstance(opportunityRecords) 21 | ); 22 | } 23 | 24 | public void logLastActivityDateOnParentAccount(Opportunities opportunities) { } 25 | public void logLastActivityDateOnParentAccount(Opportunities opportunities, Accounts accounts) { } 26 | 27 | 28 | public void logLastActivityDateOnParentAccount( 29 | fflib_ISObjectUnitOfWork unitOfWork, 30 | Opportunities opportunities, 31 | Accounts accounts) 32 | { 33 | Map opportunitiesByAccountId = opportunities.getByAccountId(); 34 | Map lastModifiedDateOpportunityByAccountId = 35 | getMostRecentLastModifiedDateByAccountId(opportunitiesByAccountId); 36 | accounts.setLastOpportunityRaisedDate(lastModifiedDateOpportunityByAccountId); 37 | unitOfWork.registerDirty(accounts); 38 | } 39 | 40 | private static Map getMostRecentLastModifiedDateByAccountId(Map opportunitiesByIds) 41 | { 42 | Map result = new Map(); 43 | for (Id accountId : opportunitiesByIds.keySet()) 44 | { 45 | Opportunities opportunities = opportunitiesByIds.get(accountId); 46 | Datetime dateTime = opportunities.getMostRecentLastModifiedData(); 47 | result.put(accountId, dateTime.date()); 48 | } 49 | return result; 50 | } 51 | } -------------------------------------------------------------------------------- /fflib2-classic-triggerhandling/sfdx-source/force-di/main/aura/di_injector/di_injector.cmp: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 31 | 32 | {!v.body} 33 | 34 | -------------------------------------------------------------------------------- /fflib-soc-basics/sfdx-source/apex-mocks/main/classes/fflib_MethodCountRecorder.cls: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | 5 | /** 6 | * @group Core 7 | */ 8 | public with sharing class fflib_MethodCountRecorder 9 | { 10 | /* 11 | * Map of method arguments by type name. 12 | * 13 | * Key: qualifiedMethod 14 | * Object: list of method arguments. 15 | * 16 | * Object: map of count by method call argument. 17 | */ 18 | private static Map> methodArgumentsByTypeName = 19 | new Map>(); 20 | 21 | private static List orderedMethodCalls = 22 | new List(); 23 | 24 | /** 25 | * Getter for the list of the methods ordered calls. 26 | * @return The list of methods called in order. 27 | */ 28 | public static List getOrderedMethodCalls() 29 | { 30 | return orderedMethodCalls; 31 | } 32 | 33 | /** 34 | * Getter for the map of the method's calls with the related arguments. 35 | * @return The map of methods called with the arguments. 36 | */ 37 | public static Map> getMethodArgumentsByTypeName() 38 | { 39 | return methodArgumentsByTypeName; 40 | } 41 | 42 | /** 43 | * Record a method was called on a mock object. 44 | * @param invocation The object holding all the data of the invocation, like the method and arguments and the mock instance. 45 | */ 46 | public void recordMethod(fflib_InvocationOnMock invocation) 47 | { 48 | List methodArgs = 49 | methodArgumentsByTypeName.get(invocation.getMethod()); 50 | 51 | if (methodArgs == null) 52 | { 53 | methodArgs = new List(); 54 | methodArgumentsByTypeName.put(invocation.getMethod(), methodArgs); 55 | } 56 | 57 | methodArgs.add(invocation.getMethodArgValues()); 58 | 59 | orderedMethodCalls.add(invocation); 60 | } 61 | } --------------------------------------------------------------------------------