├── ss_admin_console └── main │ ├── tests │ └── classes │ │ ├── testdata │ │ ├── TestInterface.cls │ │ ├── TestClass.cls │ │ ├── async │ │ │ ├── TestScheduable.cls │ │ │ ├── TestBatchable.cls-meta.xml │ │ │ ├── TestScheduable.cls-meta.xml │ │ │ └── TestBatchable.cls │ │ ├── TestClassSub1.cls │ │ ├── TestClassSub2.cls │ │ ├── TestInterfaceSub1.cls │ │ ├── TestInterfaceSub2.cls │ │ ├── TestClass.cls-meta.xml │ │ ├── TestClassSub1.cls-meta.xml │ │ ├── TestClassSub2.cls-meta.xml │ │ ├── TestInterface.cls-meta.xml │ │ ├── TestInterfaceSub1.cls-meta.xml │ │ └── TestInterfaceSub2.cls-meta.xml │ │ ├── ConstantsTest.cls-meta.xml │ │ ├── DataFilterTest.cls-meta.xml │ │ ├── SSACResultTest.cls-meta.xml │ │ ├── SSACUtilTest.cls-meta.xml │ │ ├── SetUtilsTest.cls-meta.xml │ │ ├── TestClassTest.cls-meta.xml │ │ ├── TypeUtilsTest.cls-meta.xml │ │ ├── ApexActionStatusTest.cls-meta.xml │ │ ├── BaseDataFeederTest.cls-meta.xml │ │ ├── DataDefinitionTest.cls-meta.xml │ │ ├── EqualsBuilderTest.cls-meta.xml │ │ ├── FieldReferenceTest.cls-meta.xml │ │ ├── SSACControllerTest.cls-meta.xml │ │ ├── SystemFeedLoggerTest.cls-meta.xml │ │ ├── TestInterfaceTest.cls-meta.xml │ │ ├── CompositeDataFeederTest.cls-meta.xml │ │ ├── CompositeFeedLoggerTest.cls-meta.xml │ │ ├── StaticDataSupplierTest.cls-meta.xml │ │ ├── AccountsDataFeederFactoryTest.cls-meta.xml │ │ ├── ContactsDataFeederFactoryTest.cls-meta.xml │ │ ├── PlatformEventFeedLoggerTest.cls-meta.xml │ │ ├── PriceBookDataFeederFactoryTest.cls-meta.xml │ │ ├── ProductsDataFeederFactoryTest.cls-meta.xml │ │ ├── OpportunityDataFeederFactoryTest.cls-meta.xml │ │ ├── PricebookEntryDataFeederFactoryTest.cls-meta.xml │ │ ├── OpportunityLineItemDataFeederFactoryTest.cls-meta.xml │ │ ├── ConstantsTest.cls │ │ ├── ApexActionStatusTest.cls │ │ ├── TestInterfaceTest.cls │ │ ├── TestClassTest.cls │ │ ├── PriceBookDataFeederFactoryTest.cls │ │ ├── AccountsDataFeederFactoryTest.cls │ │ ├── ProductsDataFeederFactoryTest.cls │ │ ├── ContactsDataFeederFactoryTest.cls │ │ ├── OpportunityDataFeederFactoryTest.cls │ │ ├── PricebookEntryDataFeederFactoryTest.cls │ │ ├── OpportunityLineItemDataFeederFactoryTest.cls │ │ ├── CompositeFeedLoggerTest.cls │ │ ├── SystemFeedLoggerTest.cls │ │ ├── SSACControllerTest.cls │ │ ├── TypeUtilsTest.cls │ │ ├── PlatformEventFeedLoggerTest.cls │ │ ├── SSACResultTest.cls │ │ ├── SSACUtilTest.cls │ │ ├── CompositeDataFeederTest.cls │ │ ├── StaticDataSupplierTest.cls │ │ ├── EqualsBuilderTest.cls │ │ ├── SetUtilsTest.cls │ │ └── FieldReferenceTest.cls │ └── default │ ├── classes │ ├── feeder │ │ ├── DataFeeder.cls │ │ ├── factories │ │ │ ├── DataFeederFactory.cls │ │ │ ├── DataFeederFactory.cls-meta.xml │ │ │ ├── AccountsDataFeederFactory.cls-meta.xml │ │ │ ├── ContactsDataFeederFactory.cls-meta.xml │ │ │ ├── PriceBookDataFeederFactory.cls-meta.xml │ │ │ ├── ProductsDataFeederFactory.cls-meta.xml │ │ │ ├── OpportunityDataFeederFactory.cls-meta.xml │ │ │ ├── PricebookEntryDataFeederFactory.cls-meta.xml │ │ │ ├── OpportunityLineItemDataFeederFactory.cls-meta.xml │ │ │ ├── PriceBookDataFeederFactory.cls │ │ │ ├── AccountsDataFeederFactory.cls │ │ │ ├── ProductsDataFeederFactory.cls │ │ │ ├── OpportunityDataFeederFactory.cls │ │ │ └── PricebookEntryDataFeederFactory.cls │ │ ├── DataFeeder.cls-meta.xml │ │ ├── AsyncDataFeeder.cls-meta.xml │ │ ├── BaseDataFeeder.cls-meta.xml │ │ ├── UnitOfWorkHelper.cls-meta.xml │ │ ├── CompositeDataFeeder.cls-meta.xml │ │ ├── CompositeDataFeeder.cls │ │ └── AsyncDataFeeder.cls │ ├── supplier │ │ ├── DataSupplier.cls │ │ ├── DataDefinition.cls-meta.xml │ │ ├── DataSupplier.cls-meta.xml │ │ ├── StaticDataSupplier.cls-meta.xml │ │ └── StaticDataSupplier.cls │ ├── constants │ │ ├── Constants.cls │ │ ├── Constants.cls-meta.xml │ │ ├── Enumeration.cls-meta.xml │ │ ├── ApexActionStatus.cls-meta.xml │ │ ├── DataFeederExecutionType.cls-meta.xml │ │ ├── Enumeration.cls │ │ ├── DataFeederExecutionType.cls │ │ └── ApexActionStatus.cls │ ├── logger │ │ ├── FeedLogger.cls │ │ ├── FeedLogger.cls-meta.xml │ │ ├── SystemFeedLogger.cls-meta.xml │ │ ├── CompositeFeedLogger.cls-meta.xml │ │ ├── PlatformEventFeedLogger.cls-meta.xml │ │ ├── CompositeFeedLogger.cls │ │ ├── SystemFeedLogger.cls │ │ └── PlatformEventFeedLogger.cls │ ├── DataFilter.cls-meta.xml │ ├── ApplicationFactories.cls │ ├── SSACController.cls-meta.xml │ ├── utils │ │ ├── RecordKey.cls-meta.xml │ │ ├── SSACResult.cls-meta.xml │ │ ├── SSACUtil.cls-meta.xml │ │ ├── SetUtils.cls-meta.xml │ │ ├── TypeUtils.cls-meta.xml │ │ ├── EqualsBuilder.cls-meta.xml │ │ ├── FieldReference.cls-meta.xml │ │ ├── HashCodeBuilder.cls-meta.xml │ │ ├── SSACResultsUtil.cls-meta.xml │ │ ├── SSACResultsUtil.cls │ │ ├── TypeUtils.cls │ │ ├── SSACResult.cls │ │ ├── EqualsBuilder.cls │ │ ├── RecordKey.cls │ │ ├── SSACUtil.cls │ │ └── HashCodeBuilder.cls │ ├── ApplicationFactories.cls-meta.xml │ └── SSACController.cls │ ├── tabs │ └── AdminConsole.tab-meta.xml │ ├── lwc │ ├── .eslintrc.json │ └── ss_admin_console │ │ ├── ss_admin_console.js-meta.xml │ │ └── ss_admin_console.html │ ├── objects │ ├── Job_Setting__mdt │ │ ├── Job_Setting__mdt.object-meta.xml │ │ └── fields │ │ │ ├── Job_Cron_Expression__c.field-meta.xml │ │ │ └── Job_Size__c.field-meta.xml │ ├── ResultLogEvent__e │ │ ├── ResultLogEvent__e.object-meta.xml │ │ └── fields │ │ │ ├── Action_Completed__c.field-meta.xml │ │ │ ├── Action_Type__c.field-meta.xml │ │ │ ├── Action_Name__c.field-meta.xml │ │ │ ├── Action_Title__c.field-meta.xml │ │ │ ├── Action_Message__c.field-meta.xml │ │ │ └── Action_Status__c.field-meta.xml │ └── SObjectLoadEvent__e │ │ ├── SObjectLoadEvent__e.object-meta.xml │ │ └── fields │ │ ├── Message__c.field-meta.xml │ │ ├── Message_Type__c.field-meta.xml │ │ ├── sObjectType__c.field-meta.xml │ │ └── Message_Title__c.field-meta.xml │ ├── permissionsets │ └── SS_Admin_Console.permissionset-meta.xml │ └── customMetadata │ ├── Job_Setting.Job_Size.md-meta.xml │ └── Job_Setting.Job_Cron_Expression.md-meta.xml ├── config ├── project-scratch-def.json └── admin_console3-scratch-def.json ├── .vscode ├── settings.json ├── extensions.json └── launch.json ├── jest.config.js ├── 3rd-party └── fflib │ ├── apex-mocks │ ├── main │ │ └── classes │ │ │ ├── fflib_Match.cls-meta.xml │ │ │ ├── fflib_IMatcher.cls-meta.xml │ │ │ ├── fflib_ApexMocksUtils.cls-meta.xml │ │ │ ├── fflib_IDGenerator.cls-meta.xml │ │ │ ├── fflib_Inheritor.cls-meta.xml │ │ │ ├── fflib_MethodArgValues.cls-meta.xml │ │ │ ├── fflib_QualifiedMethod.cls-meta.xml │ │ │ ├── fflib_MatcherDefinitions.cls-meta.xml │ │ │ ├── fflib_MatchersReturnValue.cls-meta.xml │ │ │ ├── fflib_MethodCountRecorder.cls-meta.xml │ │ │ ├── fflib_MethodReturnValue.cls-meta.xml │ │ │ ├── fflib_MethodReturnValueRecorder.cls-meta.xml │ │ │ ├── fflib_Answer.cls-meta.xml │ │ │ ├── fflib_AnyOrder.cls-meta.xml │ │ │ ├── fflib_ApexMocks.cls-meta.xml │ │ │ ├── fflib_InOrder.cls-meta.xml │ │ │ ├── fflib_System.cls-meta.xml │ │ │ ├── fflib_ApexMocksConfig.cls-meta.xml │ │ │ ├── fflib_ArgumentCaptor.cls-meta.xml │ │ │ ├── fflib_MethodVerifier.cls-meta.xml │ │ │ ├── fflib_InvocationOnMock.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 │ │ │ ├── fflib_MatchersReturnValue.cls │ │ │ ├── fflib_System.cls │ │ │ ├── fflib_IMatcher.cls │ │ │ ├── fflib_IDGenerator.cls │ │ │ ├── fflib_InvocationOnMock.cls │ │ │ ├── fflib_QualifiedMethod.cls │ │ │ ├── fflib_MethodArgValues.cls │ │ │ └── fflib_AnyOrder.cls │ ├── test │ │ └── classes │ │ │ ├── fflib_MatchTest.cls-meta.xml │ │ │ ├── fflib_IDGeneratorTest.cls-meta.xml │ │ │ ├── fflib_ApexMocksUtilsTest.cls-meta.xml │ │ │ ├── fflib_InheritorTest.cls-meta.xml │ │ │ ├── fflib_MethodArgValuesTest.cls-meta.xml │ │ │ ├── fflib_QualifiedMethodTest.cls-meta.xml │ │ │ ├── fflib_MatcherDefinitionsTest.cls-meta.xml │ │ │ ├── fflib_AnswerTest.cls-meta.xml │ │ │ ├── fflib_MyList.cls-meta.xml │ │ │ ├── fflib_SystemTest.cls-meta.xml │ │ │ ├── fflib_AnyOrderTest.cls-meta.xml │ │ │ ├── fflib_ApexMocksTest.cls-meta.xml │ │ │ ├── fflib_InOrderTest.cls-meta.xml │ │ │ ├── mocks │ │ │ ├── fflib_Mocks.cls-meta.xml │ │ │ └── fflib_Mocks.cls │ │ │ ├── fflib_ArgumentCaptorTest.cls-meta.xml │ │ │ ├── fflib_QualifiedMethodAndArgValuesTest.cls-meta.xml │ │ │ ├── fflib_QualifiedMethodAndArgValuesTest.cls │ │ │ ├── fflib_InheritorTest.cls │ │ │ ├── fflib_MyList.cls │ │ │ └── fflib_IDGeneratorTest.cls │ └── LICENSE │ └── apex-common │ ├── test │ └── classes │ │ ├── fflib_ApplicationTest.cls-meta.xml │ │ ├── fflib_ObjectsTest.cls-meta.xml │ │ ├── fflib_SObjectsTest.cls-meta.xml │ │ ├── fflib_QueryFactoryTest.cls-meta.xml │ │ ├── fflib_SObjectDescribeTest.cls-meta.xml │ │ ├── fflib_SObjectDomainTest.cls-meta.xml │ │ ├── fflib_SObjectSelectorTest.cls-meta.xml │ │ ├── fflib_SecurityUtilsTest.cls-meta.xml │ │ ├── fflib_StringBuilderTest.cls-meta.xml │ │ ├── mocks │ │ └── fflib_SObjectMocks.cls-meta.xml │ │ └── fflib_SObjectUnitOfWorkTest.cls-meta.xml │ ├── main │ └── classes │ │ ├── fflib_IDomain.cls-meta.xml │ │ ├── fflib_IObjects.cls-meta.xml │ │ ├── fflib_ISObjects.cls-meta.xml │ │ ├── fflib_Objects.cls-meta.xml │ │ ├── fflib_SObjects.cls-meta.xml │ │ ├── fflib_Application.cls-meta.xml │ │ ├── fflib_IDomainFactory.cls-meta.xml │ │ ├── fflib_ISObjectDomain.cls-meta.xml │ │ ├── fflib_QueryFactory.cls-meta.xml │ │ ├── fflib_SObjectDomain.cls-meta.xml │ │ ├── fflib_SecurityUtils.cls-meta.xml │ │ ├── fflib_StringBuilder.cls-meta.xml │ │ ├── fflib_IDomainConstructor.cls-meta.xml │ │ ├── fflib_ISObjectSelector.cls-meta.xml │ │ ├── fflib_ISObjectUnitOfWork.cls-meta.xml │ │ ├── fflib_ISelectorFactory.cls-meta.xml │ │ ├── fflib_IServiceFactory.cls-meta.xml │ │ ├── fflib_IUnitOfWorkFactory.cls-meta.xml │ │ ├── fflib_SObjectDescribe.cls-meta.xml │ │ ├── fflib_SObjectSelector.cls-meta.xml │ │ ├── fflib_SObjectUnitOfWork.cls-meta.xml │ │ ├── fflib_IDomain.cls │ │ ├── fflib_IServiceFactory.cls │ │ ├── fflib_IDomainConstructor.cls │ │ ├── fflib_ISelectorFactory.cls │ │ ├── fflib_IDomainFactory.cls │ │ ├── fflib_IUnitOfWorkFactory.cls │ │ ├── fflib_ISObjectDomain.cls │ │ ├── fflib_ISObjectSelector.cls │ │ ├── fflib_ISObjects.cls │ │ ├── fflib_IObjects.cls │ │ └── fflib_Objects.cls │ └── LICENSE ├── .prettierignore ├── scripts ├── soql │ └── account.soql └── apex │ └── hello.apex ├── .eslintignore ├── sfdx-project.json ├── .prettierrc ├── .forceignore ├── .gitignore ├── package.json ├── manifest └── package.xml └── Jenkinsfile /ss_admin_console/main/tests/classes/testdata/TestInterface.cls: -------------------------------------------------------------------------------- 1 | public interface TestInterface { 2 | Double calculate(Double x); 3 | } -------------------------------------------------------------------------------- /config/project-scratch-def.json: -------------------------------------------------------------------------------- 1 | { 2 | "orgName": "SofyServeDevOrg", 3 | "edition": "Developer", 4 | "hasSampleData": false, 5 | "features": [] 6 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/DataFeeder.cls: -------------------------------------------------------------------------------- 1 | public interface DataFeeder { 2 | void feed(Boolean updateRecords, FeedLogger logger); 3 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "search.exclude": { 3 | "**/node_modules": true, 4 | "**/bower_components": true, 5 | "**/.sfdx": true 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /config/admin_console3-scratch-def.json: -------------------------------------------------------------------------------- 1 | { 2 | "orgName": "admin_console3", 3 | "edition": "Developer", 4 | "hasSampleData": false, 5 | "features": [] 6 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/supplier/DataSupplier.cls: -------------------------------------------------------------------------------- 1 | public interface DataSupplier { 2 | DataDefinition getMetadata(); 3 | List supply(); 4 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/constants/Constants.cls: -------------------------------------------------------------------------------- 1 | public inherited sharing class Constants { 2 | public static final Integer MAX_RECORDS_PER_PAGE = 50; 3 | } 4 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/DataFeederFactory.cls: -------------------------------------------------------------------------------- 1 | public interface DataFeederFactory { 2 | String getName(); 3 | DataFeeder getDataFeeder(); 4 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/TestClass.cls: -------------------------------------------------------------------------------- 1 | public abstract class TestClass { 2 | public static Double calculate(Double x) { 3 | return x; 4 | } 5 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/async/TestScheduable.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | global class TestScheduable implements Schedulable { 3 | global void execute(SchedulableContext sc) { 4 | } 5 | } -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | const { jestConfig } = require('@salesforce/sfdx-lwc-jest/config'); 2 | 3 | module.exports = { 4 | ...jestConfig, 5 | modulePathIgnorePatterns: ['/.localdevserver'] 6 | }; 7 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/logger/FeedLogger.cls: -------------------------------------------------------------------------------- 1 | public interface FeedLogger { 2 | void error(String messageError); 3 | void log(String messageTitle, String message, String status); 4 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/TestClassSub1.cls: -------------------------------------------------------------------------------- 1 | public with sharing class TestClassSub1 extends TestClass { 2 | public static Double calculate(Double x) { 3 | return x * x; 4 | } 5 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_Match.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/TestClassSub2.cls: -------------------------------------------------------------------------------- 1 | public with sharing class TestClassSub2 extends TestClass { 2 | public static Double calculate(Double x) { 3 | return x * x * x; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_IMatcher.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_MatchTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_ApexMocksUtils.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_IDGenerator.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_Inheritor.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_MethodArgValues.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_QualifiedMethod.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_IDGeneratorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/test/classes/fflib_ApplicationTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_MatcherDefinitions.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_MatchersReturnValue.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_MethodCountRecorder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_MethodReturnValue.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_ApexMocksUtilsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_InheritorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_MethodArgValuesTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_QualifiedMethodTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/TestInterfaceSub1.cls: -------------------------------------------------------------------------------- 1 | public with sharing class TestInterfaceSub1 implements TestInterface { 2 | public static Double calculate(Double x) { 3 | return x * x; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/TestInterfaceSub2.cls: -------------------------------------------------------------------------------- 1 | public with sharing class TestInterfaceSub2 implements TestInterface { 2 | public static Double calculate(Double x) { 3 | return x * x * x; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_MethodReturnValueRecorder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_MatcherDefinitionsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | 5 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "salesforce.salesforcedx-vscode", 4 | "redhat.vscode-xml", 5 | "dbaeumer.vscode-eslint", 6 | "esbenp.prettier-vscode", 7 | "financialforce.lana" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /.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/ -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/DataFilter.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/ConstantsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/DataFilterTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/SSACResultTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/SSACUtilTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 49.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/SetUtilsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/TestClassTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/TypeUtilsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_IDomain.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_IObjects.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_ISObjects.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_Objects.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_SObjects.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_Answer.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_AnyOrder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_ApexMocks.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_InOrder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_System.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_AnswerTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_MyList.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_SystemTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/ApplicationFactories.cls: -------------------------------------------------------------------------------- 1 | public with sharing class ApplicationFactories { 2 | public static final fflib_Application.UnitOfWorkFactory UNIT_OF_WORK = new fflib_Application.UnitOfWorkFactory(new List()); 3 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/SSACController.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/DataFeeder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/logger/FeedLogger.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/RecordKey.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/SSACResult.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/SSACUtil.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/SetUtils.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/TypeUtils.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/ApexActionStatusTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/BaseDataFeederTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/DataDefinitionTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/EqualsBuilderTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/FieldReferenceTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/SSACControllerTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/SystemFeedLoggerTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/TestInterfaceTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/TestClass.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_Application.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_IDomainFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_ISObjectDomain.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_QueryFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_SObjectDomain.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_SecurityUtils.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_StringBuilder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/test/classes/fflib_ObjectsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/test/classes/fflib_SObjectsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_ApexMocksConfig.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_ArgumentCaptor.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_MethodVerifier.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_AnyOrderTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_ApexMocksTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_InOrderTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/mocks/fflib_Mocks.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/ApplicationFactories.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/constants/Constants.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/constants/Enumeration.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/AsyncDataFeeder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/BaseDataFeeder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/UnitOfWorkHelper.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/logger/SystemFeedLogger.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/supplier/DataDefinition.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/supplier/DataSupplier.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/EqualsBuilder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/FieldReference.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/HashCodeBuilder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/SSACResultsUtil.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/CompositeDataFeederTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/CompositeFeedLoggerTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/StaticDataSupplierTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/TestClassSub1.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/TestClassSub2.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/TestInterface.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_IDomainConstructor.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_ISObjectSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_ISObjectUnitOfWork.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_ISelectorFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_IServiceFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_IUnitOfWorkFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_SObjectDescribe.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_SObjectSelector.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_SObjectUnitOfWork.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/test/classes/fflib_QueryFactoryTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/test/classes/fflib_SObjectDescribeTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/test/classes/fflib_SObjectDomainTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/test/classes/fflib_SObjectSelectorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/test/classes/fflib_SecurityUtilsTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/test/classes/fflib_StringBuilderTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/test/classes/mocks/fflib_SObjectMocks.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_InvocationOnMock.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_VerificationMode.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_ArgumentCaptorTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/constants/ApexActionStatus.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/CompositeDataFeeder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/logger/CompositeFeedLogger.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/supplier/StaticDataSupplier.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/AccountsDataFeederFactoryTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/ContactsDataFeederFactoryTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/PlatformEventFeedLoggerTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/PriceBookDataFeederFactoryTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/ProductsDataFeederFactoryTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/TestInterfaceSub1.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/TestInterfaceSub2.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/async/TestBatchable.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/async/TestScheduable.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/constants/DataFeederExecutionType.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/logger/PlatformEventFeedLogger.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/OpportunityDataFeederFactoryTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/PricebookEntryDataFeederFactoryTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_QualifiedMethodAndArgValues.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/DataFeederFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/OpportunityLineItemDataFeederFactoryTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_QualifiedMethodAndArgValuesTest.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/AccountsDataFeederFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/ContactsDataFeederFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/PriceBookDataFeederFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/ProductsDataFeederFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/OpportunityDataFeederFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/PricebookEntryDataFeederFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/OpportunityLineItemDataFeederFactory.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 55.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/ConstantsTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class ConstantsTest { 3 | @IsTest 4 | static void testConstant() { 5 | Test.startTest(); 6 | Integer intValue = Constants.MAX_RECORDS_PER_PAGE; 7 | Test.stopTest(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/tabs/AdminConsole.tab-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ss_admin_console 5 | Custom67: Gears 6 | 7 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/lwc/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@salesforce/eslint-config-lwc/recommended", "prettier"], 3 | "overrides": [ 4 | { 5 | "files": ["*.test.js"], 6 | "rules": { 7 | "@lwc/lwc/no-unexpected-wire-adapter-usages": "off" 8 | } 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/constants/Enumeration.cls: -------------------------------------------------------------------------------- 1 | public inherited sharing abstract class Enumeration { 2 | private final String value; 3 | 4 | protected Enumeration(String value) { 5 | this.value = value; 6 | } 7 | 8 | public String value() { 9 | return value; 10 | } 11 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/Job_Setting__mdt/Job_Setting__mdt.object-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Job Settings 5 | Public 6 | 7 | -------------------------------------------------------------------------------- /.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 | **/aura/**/*.app 16 | .sfdx 17 | -------------------------------------------------------------------------------- /sfdx-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageDirectories": [ 3 | { 4 | "path": "3rd-party" 5 | }, 6 | { 7 | "path": "ss_admin_console", 8 | "default": true 9 | } 10 | ], 11 | "name": "SS_Admin_Console", 12 | "namespace": "", 13 | "sfdcLoginUrl": "https://login.salesforce.com", 14 | "sourceApiVersion": "50.0" 15 | } 16 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "none", 3 | "printWidth":160, 4 | "tabWidth": 4, 5 | "bracketSpacing": true, 6 | "overrides": [ 7 | { 8 | "files": "**/lwc/**/*.html", 9 | "options": { "parser": "lwc" } 10 | }, 11 | { 12 | "files": "*.{cmp,page,component}", 13 | "options": { "parser": "html" } 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/ApexActionStatusTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public inherited sharing class ApexActionStatusTest { 3 | @IsTest 4 | static void testWARNING() { 5 | Test.startTest(); 6 | String strStatus = ApexActionStatus.WARNING.value(); 7 | Test.stopTest(); 8 | 9 | System.assertEquals('WARNING', strStatus); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/TestInterfaceTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class TestInterfaceTest { 3 | @IsTest 4 | static void testInterfaceSub1() { 5 | System.assertEquals(4, TestInterfaceSub1.calculate(2)); 6 | } 7 | 8 | @IsTest 9 | static void testInterfaceSub2() { 10 | System.assertEquals(8, TestInterfaceSub2.calculate(2)); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.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__/** 13 | 14 | # Output folders 15 | /out/ -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/ResultLogEvent__e/ResultLogEvent__e.object-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Deployed 4 | HighVolume 5 | 6 | ResultLogEvents 7 | PublishImmediately 8 | 9 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/SObjectLoadEvent__e/SObjectLoadEvent__e.object-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Deployed 4 | HighVolume 5 | 6 | SObjectLoadEvents 7 | PublishImmediately 8 | 9 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/constants/DataFeederExecutionType.cls: -------------------------------------------------------------------------------- 1 | public with sharing class DataFeederExecutionType extends Enumeration { 2 | 3 | public static final DataFeederExecutionType TEST_ACTION_TYPE = new DataFeederExecutionType('TEST'); 4 | public static final DataFeederExecutionType RUN_ACTION_TYPE = new DataFeederExecutionType('RUN'); 5 | 6 | private DataFeederExecutionType(String value) { 7 | super(value); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /3rd-party/fflib/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 | } -------------------------------------------------------------------------------- /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); -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/TestClassTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class TestClassTest { 3 | @IsTest 4 | static void testClass() { 5 | System.assertEquals(2, TestClass.calculate(2)); 6 | } 7 | 8 | @IsTest 9 | static void testClassSub1() { 10 | System.assertEquals(4, TestClassSub1.calculate(2)); 11 | } 12 | 13 | @IsTest 14 | static void testClassSub2() { 15 | System.assertEquals(8, TestClassSub2.calculate(2)); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/SSACResultsUtil.cls: -------------------------------------------------------------------------------- 1 | public inherited sharing class SSACResultsUtil { 2 | 3 | public List getResultsByStatus(List results, String status) { 4 | List resultsByStatus = new List(); 5 | for (SSACResult result : results) { 6 | if (result.status == status) { 7 | resultsByStatus.add(result); 8 | } 9 | } 10 | return resultsByStatus; 11 | } 12 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/testdata/async/TestBatchable.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class TestBatchable implements Database.Batchable { 3 | 4 | public Database.QueryLocator start(Database.BatchableContext bc) { 5 | String query = 'SELECT Id FROM Account'; 6 | return Database.getQueryLocator(query); 7 | } 8 | 9 | public void execute(Database.BatchableContext bc, List scope) { 10 | } 11 | 12 | public void finish(Database.BatchableContext bc) { 13 | } 14 | } -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/Job_Setting__mdt/fields/Job_Cron_Expression__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Job_Cron_Expression__c 4 | false 5 | DeveloperControlled 6 | 7 | 100 8 | false 9 | Text 10 | false 11 | 12 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/Job_Setting__mdt/fields/Job_Size__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Job_Size__c 4 | false 5 | DeveloperControlled 6 | 7 | 10 8 | false 9 | 0 10 | Number 11 | false 12 | 13 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/ResultLogEvent__e/fields/Action_Completed__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Action_Completed__c 4 | false 5 | false 6 | false 7 | false 8 | false 9 | 10 | Checkbox 11 | 12 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/SObjectLoadEvent__e/fields/Message__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Message__c 4 | false 5 | false 6 | false 7 | false 8 | 9 | 130000 10 | LongTextArea 11 | 5 12 | 13 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/permissionsets/SS_Admin_Console.permissionset-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SSACController 5 | true 6 | 7 | false 8 | 9 | 10 | AdminConsole 11 | Visible 12 | 13 | 14 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/ResultLogEvent__e/fields/Action_Type__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Action_Type__c 4 | false 5 | false 6 | false 7 | false 8 | 9 | 255 10 | false 11 | Text 12 | false 13 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/ResultLogEvent__e/fields/Action_Name__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Action_Name__c 4 | false 5 | false 6 | false 7 | false 8 | 9 | 50 10 | false 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/ResultLogEvent__e/fields/Action_Title__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Action_Title__c 4 | false 5 | false 6 | false 7 | false 8 | 9 | 255 10 | false 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/SObjectLoadEvent__e/fields/Message_Type__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Message_Type__c 4 | false 5 | false 6 | false 7 | false 8 | 9 | 20 10 | false 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/SObjectLoadEvent__e/fields/sObjectType__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | sObjectType__c 4 | false 5 | false 6 | false 7 | false 8 | 9 | 255 10 | false 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/ResultLogEvent__e/fields/Action_Message__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Action_Message__c 4 | false 5 | false 6 | false 7 | false 8 | 9 | 255 10 | false 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/ResultLogEvent__e/fields/Action_Status__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Action_Status__c 4 | false 5 | false 6 | false 7 | false 8 | 9 | 50 10 | false 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/objects/SObjectLoadEvent__e/fields/Message_Title__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Message_Title__c 4 | false 5 | false 6 | false 7 | false 8 | 9 | 255 10 | false 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/customMetadata/Job_Setting.Job_Size.md-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | Job_Cron_Expression__c 7 | 8 | 9 | 10 | Job_Size__c 11 | 200.0 12 | 13 | 14 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/lwc/ss_admin_console/ss_admin_console.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50.0 4 | SS Admin Console 5 | true 6 | SS Admin Console 7 | 8 | lightning__AppPage 9 | lightning__RecordPage 10 | lightning__HomePage 11 | lightning__Tab 12 | 13 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/customMetadata/Job_Setting.Job_Cron_Expression.md-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | Job_Cron_Expression__c 7 | 0 0 15 * * ? 8 | 9 | 10 | Job_Size__c 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /3rd-party/fflib/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 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/PriceBookDataFeederFactoryTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class PriceBookDataFeederFactoryTest { 3 | @IsTest 4 | static void testGetName() { 5 | Test.startTest(); 6 | String returnedValue = new PriceBookDataFeederFactory().getName(); 7 | Test.stopTest(); 8 | System.assert(String.isNotBlank(returnedValue), 'Method can not return empty string or null!'); 9 | } 10 | 11 | @IsTest 12 | static void testGetDataFeeder() { 13 | Test.startTest(); 14 | DataFeeder df = new PriceBookDataFeederFactory().getDataFeeder(); 15 | Test.stopTest(); 16 | System.assertNotEquals(null, df); 17 | } 18 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/logger/CompositeFeedLogger.cls: -------------------------------------------------------------------------------- 1 | public with sharing class CompositeFeedLogger implements FeedLogger { 2 | 3 | private FeedLogger[] feedLoggers; 4 | 5 | public CompositeFeedLogger(FeedLogger[] loggers) { 6 | this.feedLoggers = loggers; 7 | } 8 | 9 | public void error(String messageError) { 10 | for (FeedLogger feedLogger : feedLoggers) { 11 | feedLogger.error(messageError); 12 | } 13 | } 14 | 15 | public void log(String messageTitle, String message, String status) { 16 | for (FeedLogger feedLogger : feedLoggers) { 17 | feedLogger.log(messageTitle, message, status); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/AccountsDataFeederFactoryTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public inherited sharing class AccountsDataFeederFactoryTest { 3 | @IsTest 4 | static void testGetName() { 5 | Test.startTest(); 6 | String returnedValue = new AccountsDataFeederFactory().getName(); 7 | Test.stopTest(); 8 | System.assert(String.isNotBlank(returnedValue), 'Method can not return empty string or null!'); 9 | } 10 | 11 | @IsTest 12 | static void testGetDataFeeder() { 13 | Test.startTest(); 14 | DataFeeder df = new AccountsDataFeederFactory().getDataFeeder(); 15 | Test.stopTest(); 16 | System.assertNotEquals(null, df); 17 | } 18 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/ProductsDataFeederFactoryTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class ProductsDataFeederFactoryTest { 3 | @IsTest 4 | static void testGetName() { 5 | Test.startTest(); 6 | String returnedValue = new ProductsDataFeederFactory().getName(); 7 | Test.stopTest(); 8 | System.assert(String.isNotBlank(returnedValue), 'Method can not return empty string or null!'); 9 | } 10 | 11 | @IsTest 12 | static void testGetDataFeeder() { 13 | Test.startTest(); 14 | DataFeeder df = new ProductsDataFeederFactory().getDataFeeder(); 15 | Test.stopTest(); 16 | System.assertNotEquals(null, df); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/ContactsDataFeederFactoryTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public inherited sharing class ContactsDataFeederFactoryTest { 3 | 4 | @IsTest 5 | static void testGetName() { 6 | Test.startTest(); 7 | String returnedValue = new ContactsDataFeederFactory().getName(); 8 | Test.stopTest(); 9 | System.assert(String.isNotBlank(returnedValue), 'Method can not return empty string or null!'); 10 | } 11 | 12 | @IsTest 13 | static void testGetDataFeeder() { 14 | Test.startTest(); 15 | DataFeeder df = new ContactsDataFeederFactory().getDataFeeder(); 16 | Test.stopTest(); 17 | System.assertNotEquals(null, df); 18 | } 19 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/OpportunityDataFeederFactoryTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class OpportunityDataFeederFactoryTest { 3 | @IsTest 4 | static void testGetName() { 5 | Test.startTest(); 6 | String returnedValue = new OpportunityDataFeederFactory().getName(); 7 | Test.stopTest(); 8 | System.assert(String.isNotBlank(returnedValue), 'Method can not return empty string or null!'); 9 | } 10 | 11 | @IsTest 12 | static void testGetDataFeeder() { 13 | Test.startTest(); 14 | DataFeeder df = new OpportunityDataFeederFactory().getDataFeeder(); 15 | Test.stopTest(); 16 | System.assertNotEquals(null, df); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/PricebookEntryDataFeederFactoryTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class PricebookEntryDataFeederFactoryTest { 3 | @IsTest 4 | static void testGetName() { 5 | Test.startTest(); 6 | String returnedValue = new PricebookEntryDataFeederFactory().getName(); 7 | Test.stopTest(); 8 | System.assert(String.isNotBlank(returnedValue), 'Method can not return empty string or null!'); 9 | } 10 | 11 | @IsTest 12 | static void testGetDataFeeder() { 13 | Test.startTest(); 14 | DataFeeder df = new PricebookEntryDataFeederFactory().getDataFeeder(); 15 | Test.stopTest(); 16 | System.assertNotEquals(null, df); 17 | } 18 | } -------------------------------------------------------------------------------- /3rd-party/fflib/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 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/OpportunityLineItemDataFeederFactoryTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class OpportunityLineItemDataFeederFactoryTest { 3 | @IsTest 4 | static void testGetName() { 5 | Test.startTest(); 6 | String returnedValue = new OpportunityLineItemDataFeederFactory().getName(); 7 | Test.stopTest(); 8 | System.assert(String.isNotBlank(returnedValue), 'Method can not return empty string or null!'); 9 | } 10 | 11 | @IsTest 12 | static void testGetDataFeeder() { 13 | Test.startTest(); 14 | DataFeeder df = new OpportunityLineItemDataFeederFactory().getDataFeeder(); 15 | Test.stopTest(); 16 | System.assertNotEquals(null, df); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/TypeUtils.cls: -------------------------------------------------------------------------------- 1 | public inherited sharing class TypeUtils { 2 | public static Boolean isBatchable(String typeName) { 3 | return isBatchable(Type.forName(typeName)); 4 | } 5 | 6 | public static Boolean isSchedulable(String typeName) { 7 | return isSchedulable(Type.forName(typeName)); 8 | } 9 | 10 | public static Boolean isBatchable(Type theType) { 11 | return isInstanceOf(theType, Database.Batchable.class); 12 | } 13 | 14 | public static Boolean isSchedulable(Type theType) { 15 | return isInstanceOf(theType, Schedulable.class); 16 | } 17 | 18 | public static Boolean isInstanceOf(Type child, Type parent) { 19 | return parent.isAssignableFrom(child); 20 | } 21 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/logger/SystemFeedLogger.cls: -------------------------------------------------------------------------------- 1 | public with sharing class SystemFeedLogger implements FeedLogger { 2 | private static SystemFeedLogger instance; 3 | 4 | private SystemFeedLogger() { 5 | } 6 | 7 | public static SystemFeedLogger getInstance() { 8 | if (instance == null) { 9 | instance = new SystemFeedLogger(); 10 | } 11 | return instance; 12 | } 13 | 14 | public void error(String messageError) { 15 | System.debug('messageError: ' + messageError); 16 | } 17 | 18 | public void log(String messageTitle, String message, String status) { 19 | System.debug('messageTitle: ' + messageTitle); 20 | System.debug('message: ' + message); 21 | System.debug('status: ' + status); 22 | } 23 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/CompositeDataFeeder.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * Atomic data feeder. 3 | */ 4 | public with sharing class CompositeDataFeeder implements DataFeeder { 5 | private DataFeeder[] feeders; 6 | private FeedLogger logger; 7 | 8 | public CompositeDataFeeder(DataFeeder[] feeders, FeedLogger logger) { 9 | this.feeders = feeders; 10 | this.logger = logger; 11 | } 12 | 13 | public void feed(Boolean updateRecords, FeedLogger logger) { 14 | Savepoint sp = Database.setSavepoint(); 15 | try { 16 | for (DataFeeder feeder : feeders) { 17 | feeder.feed(updateRecords, logger); 18 | } 19 | } catch (Exception e) { 20 | Database.rollback(sp); 21 | throw e; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/CompositeFeedLoggerTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class CompositeFeedLoggerTest { 3 | @IsTest 4 | static void testError() { 5 | fflib_ApexMocks mocks = new fflib_ApexMocks(); 6 | fflib_ApexMocksConfig.HasIndependentMocks = true; 7 | FeedLogger logger1 = (FeedLogger) mocks.mock(FeedLogger.class); 8 | FeedLogger logger2 = (FeedLogger) mocks.mock(FeedLogger.class); 9 | FeedLogger compositeLogger = new CompositeFeedLogger(new List{logger1, logger2}); 10 | Test.startTest(); 11 | compositeLogger.error('errTestMsg'); 12 | Test.stopTest(); 13 | ((FeedLogger) mocks.verify(logger1, 1)).error('errTestMsg'); 14 | ((FeedLogger) mocks.verify(logger2, 1)).error('errTestMsg'); 15 | } 16 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/constants/ApexActionStatus.cls: -------------------------------------------------------------------------------- 1 | public inherited sharing class ApexActionStatus extends Enumeration { 2 | 3 | public static final ApexActionStatus WARNING = new ApexActionStatus('WARNING'); 4 | public static final ApexActionStatus FAILED = new ApexActionStatus('FAILED'); 5 | public static final ApexActionStatus UPDATED = new ApexActionStatus('UPDATED'); 6 | public static final ApexActionStatus INSERTED = new ApexActionStatus('INSERTED'); 7 | public static final ApexActionStatus OK = new ApexActionStatus('OK'); 8 | public static final ApexActionStatus DUPLICATED = new ApexActionStatus('DUPLICATED'); 9 | public static final ApexActionStatus CHANGED = new ApexActionStatus('CHANGED'); 10 | 11 | private ApexActionStatus(String value) { 12 | super(value); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/SystemFeedLoggerTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class SystemFeedLoggerTest { 3 | @IsTest 4 | static void testSingletone() { 5 | Test.startTest(); 6 | SystemFeedLogger feedLogger1 = SystemFeedLogger.getInstance(); 7 | SystemFeedLogger feedLogger2 = SystemFeedLogger.getInstance(); 8 | Test.stopTest(); 9 | 10 | System.assertEquals(feedLogger1, feedLogger2); 11 | } 12 | 13 | @IsTest 14 | static void testErrorMethod(){ 15 | Test.startTest(); 16 | SystemFeedLogger.getInstance().error(''); 17 | Test.stopTest(); 18 | } 19 | 20 | @IsTest 21 | static void testLogMethod(){ 22 | Test.startTest(); 23 | SystemFeedLogger.getInstance().log('','',''); 24 | Test.stopTest(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/PriceBookDataFeederFactory.cls: -------------------------------------------------------------------------------- 1 | public with sharing class PriceBookDataFeederFactory implements DataFeederFactory { 2 | public String getName() { 3 | return 'Sample Pricebooks'; 4 | } 5 | 6 | public DataFeeder getDataFeeder() { 7 | DataDefinition.DataDefinitionBuilder dataDefinitionBuilder = new DataDefinition.DataDefinitionBuilder(Pricebook2.SObjectType) 8 | .addKeyField(Pricebook2.Name) 9 | .addDataField(Pricebook2.IsActive); 10 | return new BaseDataFeeder( 11 | new StaticDataSupplier( 12 | dataDefinitionBuilder.build(), 13 | new Pricebook2[] { 14 | new Pricebook2(Name = 'Test PriceBook1', IsActive = true), 15 | new Pricebook2(Name = 'Test PriceBook2', IsActive = false) 16 | } 17 | ) 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.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 | # Idea 10 | .idea/ 11 | IlluminatedCloud/ 12 | 13 | # LWC VSCode autocomplete 14 | **/lwc/jsconfig.json 15 | 16 | # LWC Jest coverage reports 17 | coverage/ 18 | 19 | # Logs 20 | logs 21 | *.log 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # Dependency directories 27 | node_modules/ 28 | 29 | # Eslint cache 30 | .eslintcache 31 | 32 | # MacOS system files 33 | .DS_Store 34 | 35 | # Windows system files 36 | Thumbs.db 37 | ehthumbs.db 38 | [Dd]esktop.ini 39 | $RECYCLE.BIN/ 40 | 41 | # Local environment variables 42 | .env 43 | 44 | .sf/ 45 | .sfdx/ 46 | 47 | # Outputs 48 | 49 | /out/ 50 | -------------------------------------------------------------------------------- /3rd-party/fflib/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 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/AccountsDataFeederFactory.cls: -------------------------------------------------------------------------------- 1 | public inherited sharing class AccountsDataFeederFactory implements DataFeederFactory { 2 | public String getName() { 3 | return 'Sample Accounts'; 4 | } 5 | 6 | public DataFeeder getDataFeeder() { 7 | DataDefinition.DataDefinitionBuilder dataDefinitionBuilder = new DataDefinition.DataDefinitionBuilder(Account.SObjectType). 8 | addKeyField(Account.Name); 9 | return new BaseDataFeeder( 10 | new StaticDataSupplier( 11 | dataDefinitionBuilder.build(), 12 | new Account[] { 13 | new Account(Name = 'Social Software'), 14 | new Account(Name = 'Adept Software'), 15 | new Account(Name = 'Boss Software'), 16 | new Account(Name = 'Scope Software'), 17 | new Account(Name = 'Variable Software') 18 | } 19 | ) 20 | ); 21 | } 22 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_QualifiedMethodAndArgValuesTest.cls: -------------------------------------------------------------------------------- 1 | @isTest 2 | public class fflib_QualifiedMethodAndArgValuesTest 3 | { 4 | @isTest 5 | private static void equalsReturnsExpectedResults() 6 | { 7 | fflib_QualifiedMethod qm1 = new fflib_QualifiedMethod('Type1', 'Method1', new List{ Integer.class } ); 8 | fflib_MethodArgValues mav1 = new fflib_MethodArgValues(new List{ 'hello' }); 9 | Object obj1 = 'hello'; 10 | 11 | fflib_QualifiedMethodAndArgValues qmaav = new fflib_QualifiedMethodAndArgValues(qm1, mav1, obj1); 12 | 13 | fflib_QualifiedMethod qm2 = qmaav.getQualifiedMethod(); 14 | fflib_MethodArgValues mav2 = qmaav.getMethodArgValues(); 15 | Object obj2 = qmaav.getMockInstance(); 16 | String string1 = qmaav.toString(); 17 | 18 | System.assertEquals(qm1, qm2); 19 | System.assertEquals(mav1, mav2); 20 | System.assertEquals(obj1, obj2); 21 | System.assertEquals('Type1.Method1(Integer) with args: [hello]', string1); 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/SSACControllerTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class SSACControllerTest { 3 | @IsTest 4 | static void testGetDataTypes() { 5 | Test.startTest(); 6 | List dataTypes = SSACController.getDataTypes(); 7 | Test.stopTest(); 8 | System.assert(dataTypes.size() > 0, 'At least one test class that implements DataFeederFactory exist'); 9 | } 10 | 11 | @IsTest 12 | static void testActionCheckOnly() { 13 | DataFeederFactory dff = new AccountsDataFeederFactory(); 14 | Test.startTest(); 15 | String dataTypes = SSACController.action(dff.getName(), false, true); 16 | Test.stopTest(); 17 | System.assertEquals('Action Started', dataTypes); 18 | } 19 | 20 | @IsTest 21 | static void testActionNotCheckOnly() { 22 | DataFeederFactory dff = new AccountsDataFeederFactory(); 23 | Test.startTest(); 24 | String dataTypes = SSACController.action(dff.getName(), false, false); 25 | Test.stopTest(); 26 | System.assertEquals('Action Started', dataTypes); 27 | } 28 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/SSACResult.cls: -------------------------------------------------------------------------------- 1 | public inherited sharing class SSACResult { 2 | public String status; 3 | public String recordKey; 4 | public String recordId; 5 | public String errorMessage; 6 | public String description; 7 | public String sObjectApiName; 8 | 9 | public SSACResult setStatus(String status) { 10 | this.status = status; 11 | return this; 12 | } 13 | public SSACResult setRecordKey(String recordKey) { 14 | this.recordKey = recordKey; 15 | return this; 16 | } 17 | public SSACResult setRecordId(String recordId) { 18 | this.recordId = recordId; 19 | return this; 20 | } 21 | public SSACResult setErrorMessage(String errorMessage) { 22 | this.errorMessage = errorMessage; 23 | return this; 24 | } 25 | public SSACResult setDescription(String description) { 26 | this.description = description; 27 | return this; 28 | } 29 | public SSACResult setSObjectApiName(String sObjectApiName) { 30 | this.sObjectApiName = sObjectApiName; 31 | return this; 32 | } 33 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/TypeUtilsTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class TypeUtilsTest { 3 | 4 | @IsTest 5 | public static void isBatchableTestPositive() { 6 | Test.startTest(); 7 | Boolean actual = TypeUtils.isBatchable('TestBatchable'); 8 | Test.stopTest(); 9 | System.assertEquals(true, actual); 10 | } 11 | 12 | @IsTest 13 | public static void isBatchableTestNegative() { 14 | Test.startTest(); 15 | Boolean actual = TypeUtils.isBatchable('TestScheduable'); 16 | Test.stopTest(); 17 | System.assertEquals(false, actual); 18 | } 19 | 20 | @IsTest 21 | public static void isScheduableTestPositive() { 22 | Test.startTest(); 23 | Boolean actual = TypeUtils.isSchedulable('TestScheduable'); 24 | Test.stopTest(); 25 | System.assertEquals(true, actual); 26 | } 27 | 28 | @IsTest 29 | public static void isScheduableTestNegative() { 30 | Test.startTest(); 31 | Boolean actual = TypeUtils.isSchedulable('TestBatchable'); 32 | Test.stopTest(); 33 | System.assertEquals(false, actual); 34 | } 35 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/EqualsBuilder.cls: -------------------------------------------------------------------------------- 1 | public class EqualsBuilder { 2 | private Boolean isEquals = true; 3 | 4 | public EqualsBuilder append(Object lhs, Object rhs) { 5 | if (!isEquals) { 6 | return this; 7 | } 8 | if (lhs == null && rhs == null) { 9 | return this; 10 | } else if (lhs != null) { 11 | this.isEquals = lhs.equals(rhs); 12 | } else { 13 | this.isEquals = false; 14 | } 15 | return this; 16 | } 17 | 18 | public EqualsBuilder append(List lhs, List rhs) { 19 | if (!isEquals) { 20 | return this; 21 | } 22 | if (isListEmpty(lhs) && isListEmpty(rhs)) { 23 | return this; 24 | } else if (!isListEmpty(lhs)) { 25 | this.isEquals = lhs.equals(rhs); 26 | } else { 27 | this.isEquals = false; 28 | } 29 | return this; 30 | } 31 | 32 | private static Boolean isListEmpty(List lst) { 33 | return lst == null || lst.isEmpty(); 34 | } 35 | 36 | public Boolean build() { 37 | return isEquals; 38 | } 39 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/ProductsDataFeederFactory.cls: -------------------------------------------------------------------------------- 1 | public with sharing class ProductsDataFeederFactory implements DataFeederFactory { 2 | public String getName() { 3 | return 'Sample Products'; 4 | } 5 | 6 | public DataFeeder getDataFeeder() { 7 | DataDefinition.DataDefinitionBuilder dataDefinitionBuilder = new DataDefinition.DataDefinitionBuilder(Product2.SObjectType) 8 | .addKeyField(Product2.ProductCode) 9 | .addDataField(Product2.Name); 10 | return new BaseDataFeeder( 11 | new StaticDataSupplier( 12 | dataDefinitionBuilder.build(), 13 | new Product2[] { 14 | new Product2(Name = 'The Best Product', ProductCode = 'TEST-0001'), 15 | new Product2(Name = 'Organic Product', ProductCode = 'TEST-0002'), 16 | new Product2(Name = 'Product for the Times', ProductCode = 'TEST-0003'), 17 | new Product2(Name = 'Product for All', ProductCode = 'TEST-0004'), 18 | new Product2(Name = 'Product of the People', ProductCode = 'TEST-0005') 19 | } 20 | ) 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/AsyncDataFeeder.cls: -------------------------------------------------------------------------------- 1 | public inherited sharing class AsyncDataFeeder implements DataFeeder { 2 | 3 | private DataFeeder originalFeeder; 4 | private FeedLogger logger; 5 | 6 | public AsyncDataFeeder(DataFeeder originalFeeder) { 7 | this.originalFeeder = originalFeeder; 8 | this.logger = logger; 9 | } 10 | 11 | public void feed(Boolean updateRecords, FeedLogger logger) { 12 | if (originalFeeder instanceof AsyncDataFeeder) { 13 | originalFeeder.feed(updateRecords, logger); 14 | } else { 15 | System.enqueueJob(new AsyncExecutor(originalFeeder, updateRecords, logger)); 16 | } 17 | } 18 | 19 | private class AsyncExecutor implements Queueable { 20 | private DataFeeder feeder; 21 | private Boolean updateRecords; 22 | private FeedLogger logger; 23 | 24 | private AsyncExecutor(DataFeeder feeder, Boolean updateRecords, FeedLogger logger) { 25 | this.feeder = feeder; 26 | this.updateRecords = updateRecords; 27 | this.logger = logger; 28 | } 29 | 30 | public void execute(QueueableContext qc) { 31 | feeder.feed(updateRecords, logger); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/PlatformEventFeedLoggerTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class PlatformEventFeedLoggerTest { 3 | @IsTest 4 | static void testSingletone() { 5 | Test.startTest(); 6 | PlatformEventFeedLogger feedLogger1 = PlatformEventFeedLogger.getInstance(); 7 | PlatformEventFeedLogger feedLogger2 = PlatformEventFeedLogger.getInstance(); 8 | Test.stopTest(); 9 | 10 | System.assertEquals(feedLogger1, feedLogger2); 11 | } 12 | 13 | @IsTest 14 | static void testDummyError(){ 15 | Test.startTest(); 16 | PlatformEventFeedLogger.getInstance().error(''); 17 | Test.stopTest(); 18 | } 19 | 20 | @IsTest 21 | static void testDummyLog(){ 22 | Test.startTest(); 23 | PlatformEventFeedLogger.getInstance().log('', '', ''); 24 | Test.stopTest(); 25 | } 26 | 27 | @IsTest 28 | static void testDummyPublishResultLog(){ 29 | Test.startTest(); 30 | PlatformEventFeedLogger.getInstance().publishResultLog('', ''); 31 | Test.stopTest(); 32 | } 33 | 34 | @IsTest 35 | static void testDummyPublishLog(){ 36 | Test.startTest(); 37 | PlatformEventFeedLogger.getInstance().publishLog('', '', ''); 38 | Test.stopTest(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/RecordKey.cls: -------------------------------------------------------------------------------- 1 | public with sharing class RecordKey { 2 | private final List keyFields; 3 | private final SObject record; 4 | 5 | public RecordKey(List keyFields, SObject record) { 6 | this.keyFields = keyFields; 7 | this.record = record; 8 | } 9 | 10 | public Boolean equals(Object obj) { 11 | EqualsBuilder builder = new EqualsBuilder(); 12 | if (obj instanceof RecordKey) { 13 | RecordKey p = (RecordKey)obj; 14 | for (FieldReference field : keyFields) { 15 | builder.append(field.getFrom(record), field.getFrom(p.record)); 16 | } 17 | return builder.build(); 18 | } 19 | return false; 20 | } 21 | 22 | public Integer hashCode() { 23 | HashCodeBuilder builder = new HashCodeBuilder(); 24 | for (FieldReference field : keyFields) { 25 | builder.append(field.getFrom(record)); 26 | } 27 | return builder.build(); 28 | } 29 | 30 | public override String toString() { 31 | String recordFingerprint = ''; 32 | for (FieldReference field : keyFields) { 33 | recordFingerprint += field.getFrom(record); 34 | } 35 | return recordFingerprint.toLowerCase(); 36 | } 37 | } -------------------------------------------------------------------------------- /3rd-party/fflib/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 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/supplier/StaticDataSupplier.cls: -------------------------------------------------------------------------------- 1 | public inherited sharing class StaticDataSupplier implements DataSupplier { 2 | private DataDefinition metadata; 3 | private List data; 4 | 5 | public StaticDataSupplier(DataDefinition metadata, List data) { 6 | if (data == null || data.isEmpty()) { 7 | throw new IllegalArgumentException('\'data\' can not be null or empty!'); 8 | } 9 | if (metadata == null) { 10 | throw new IllegalArgumentException('\'metadata\' can not be null!'); 11 | } 12 | this.data = data; 13 | this.metadata = metadata; 14 | } 15 | 16 | public List supply() { 17 | return data; 18 | } 19 | 20 | public DataDefinition getMetadata() { 21 | return metadata; 22 | } 23 | 24 | /* 25 | private static List toReferenceDefinitions(List referenceFields, 26 | List> referencedSObjectKeyFields) { 27 | List referenceDefinitions = new List(); 28 | for (Integer i = 0; i < referenceFields.size(); i++) { 29 | referenceDefinitions.add(new DataDefinition.ReferenceFieldDefinition(referenceFields[i], 30 | toFieldReferences(referencedSObjectKeyFields[i]))); 31 | } 32 | return referenceDefinitions; 33 | } 34 | */ 35 | } -------------------------------------------------------------------------------- /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.12.0", 20 | "@salesforce/eslint-config-lwc": "^0.11.0", 21 | "@salesforce/eslint-plugin-aura": "^2.0.0", 22 | "@salesforce/sfdx-lwc-jest": "^0.10.4", 23 | "eslint": "^7.24.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 | -------------------------------------------------------------------------------- /3rd-party/fflib/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 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c), FinancialForce.com, inc 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | - Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | - Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | - Neither the name of the FinancialForce.com, inc nor the names of its contributors 13 | may be used to endorse or promote products derived from this software without 14 | specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 19 | THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 22 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c), FinancialForce.com, inc 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | - Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | - Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | - Neither the name of the FinancialForce.com, inc nor the names of its contributors 13 | may be used to endorse or promote products derived from this software without 14 | specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 19 | THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 22 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/logger/PlatformEventFeedLogger.cls: -------------------------------------------------------------------------------- 1 | public with sharing class PlatformEventFeedLogger implements FeedLogger { 2 | @TestVisible 3 | private static PlatformEventFeedLogger instance; 4 | 5 | private PlatformEventFeedLogger() { 6 | 7 | } 8 | 9 | public static PlatformEventFeedLogger getInstance() { 10 | if (instance == null) { 11 | instance = new PlatformEventFeedLogger(); 12 | } 13 | return instance; 14 | } 15 | 16 | public void error(String messageError) { 17 | SObjectLoadEvent__e event = new SObjectLoadEvent__e( 18 | sObjectType__c = 'Error occured: ', 19 | Message__c = messageError, 20 | Message_Type__c = null 21 | ); 22 | EventBus.publish(event); 23 | } 24 | 25 | public void log(String sObjectType, String message, String status) { 26 | SObjectLoadEvent__e event = new SObjectLoadEvent__e( 27 | sObjectType__c = sObjectType, 28 | Message__c = message, 29 | Message_Type__c = status 30 | ); 31 | EventBus.publish(event); 32 | } 33 | 34 | public void publishResultLog(String jobName, String jobAction) { 35 | ResultLogEvent__e event = new ResultLogEvent__e(Action_Name__c = jobName, Action_Completed__c = true, Action_Type__c = jobAction); 36 | EventBus.publish(event); 37 | } 38 | 39 | public void publishLog(String title, String message, String status) { 40 | ResultLogEvent__e event = new ResultLogEvent__e(Action_Message__c = message, Action_Title__c = title, Action_Status__c = status); 41 | EventBus.publish(event); 42 | } 43 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/OpportunityDataFeederFactory.cls: -------------------------------------------------------------------------------- 1 | public with sharing class OpportunityDataFeederFactory implements DataFeederFactory { 2 | 3 | public String getName() { 4 | return 'Sample Opportunity'; 5 | } 6 | 7 | public DataFeeder getDataFeeder() { 8 | 9 | DataDefinition.DataDefinitionBuilder dataDefinitionBuilder = new DataDefinition.DataDefinitionBuilder(Opportunity.SObjectType). 10 | addKeyField(Opportunity.Name).addDataField(Opportunity.StageName).addReferenceField(Opportunity.AccountId, new String[] {'Name'}); 11 | 12 | return new BaseDataFeeder( 13 | new StaticDataSupplier( 14 | dataDefinitionBuilder.build(), 15 | new Opportunity [] { 16 | new Opportunity(Name = 'OPP_TEST-0001', StageName = 'Prospecting', Amount = 72.1, CloseDate = Date.today() + 91, Account = new Account(Name = 'Social Software')), 17 | new Opportunity(Name = 'OPP_TEST-0002', StageName = 'Prospecting', Amount = 15.24, CloseDate = Date.today() + 145, Account = new Account(Name = 'Adept Software')), 18 | new Opportunity(Name = 'OPP_TEST-0003', StageName = 'Prospecting', Amount = 75.91, CloseDate = Date.today() + 131, Account = new Account(Name = 'Boss Software')), 19 | new Opportunity(Name = 'OPP_TEST-0004', StageName = 'Prospecting', Amount = 39.66, CloseDate = Date.today() + 75, Account = new Account(Name = 'Scope Software')), 20 | new Opportunity(Name = 'OPP_TEST-0005', StageName = 'Prospecting', Amount = 55.74, CloseDate = Date.today() + 207, Account = new Account(Name = 'Variable Software')) 21 | } 22 | ) 23 | ); 24 | } 25 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_IDomain.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_IDomain 27 | { 28 | Object getType(); 29 | List getObjects(); 30 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_IServiceFactory.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_IServiceFactory 27 | { 28 | Object newInstance(Type serviceInterfaceType); 29 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_IDomainConstructor.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_IDomainConstructor 27 | { 28 | fflib_IDomain construct(List objects); 29 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/SSACResultTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class SSACResultTest { 3 | @IsTest 4 | static void testSetStatus() { 5 | SSACResult obj = new SSACResult(); 6 | Test.startTest(); 7 | obj.setStatus('Duplicated'); 8 | Test.stopTest(); 9 | System.assertEquals('Duplicated', obj.status); 10 | } 11 | 12 | @IsTest 13 | static void testSetRecordKey() { 14 | SSACResult obj = new SSACResult(); 15 | Test.startTest(); 16 | obj.setRecordKey('recordKey'); 17 | Test.stopTest(); 18 | System.assertEquals('recordKey', obj.recordKey); 19 | } 20 | 21 | @IsTest 22 | static void testSetRecordId() { 23 | SSACResult obj = new SSACResult(); 24 | Test.startTest(); 25 | obj.setRecordId('recordId'); 26 | Test.stopTest(); 27 | System.assertEquals('recordId', obj.recordId); 28 | } 29 | 30 | @IsTest 31 | static void testSetErrorMessage() { 32 | SSACResult obj = new SSACResult(); 33 | Test.startTest(); 34 | obj.setErrorMessage('ErrorMessage'); 35 | Test.stopTest(); 36 | System.assertEquals('ErrorMessage', obj.errorMessage); 37 | } 38 | 39 | @IsTest 40 | static void testSetDescription() { 41 | SSACResult obj = new SSACResult(); 42 | Test.startTest(); 43 | obj.setDescription('Description'); 44 | Test.stopTest(); 45 | System.assertEquals('Description', obj.description); 46 | } 47 | 48 | @IsTest 49 | static void testSetSObjectApiName() { 50 | SSACResult obj = new SSACResult(); 51 | Test.startTest(); 52 | obj.setSObjectApiName('SObjectApiName'); 53 | Test.stopTest(); 54 | System.assertEquals('SObjectApiName', obj.sObjectApiName); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/SSACUtil.cls: -------------------------------------------------------------------------------- 1 | public inherited sharing class SSACUtil { 2 | public static List getJobClasses(String interfaceName) { 3 | Type interfaceType = Type.forName(interfaceName); 4 | List result = new List(); 5 | List classes = SSACUtil.getApexClasses(); 6 | for (ApexClass aClass : classes) { 7 | Type classType = Type.forName(aClass.Name); 8 | if ((classType != null) && (interfaceType.isAssignableFrom(classType))) { 9 | result.add(aClass.Name); 10 | } 11 | } 12 | return result; 13 | } 14 | 15 | public static List getSubClasses(Type theType) { 16 | List result = new List(); 17 | List classes = getApexClasses(); 18 | for (ApexClass aClass : classes) { 19 | try { 20 | Type classType = Type.forName(aClass.Name); 21 | if (classType != null && theType.isAssignableFrom(classType) && theType != classType) { 22 | result.add(classType); 23 | } 24 | } 25 | catch (Exception e) { 26 | System.debug('Error in SSACUtil.getSubClasses: ' + e.getMessage()); 27 | } 28 | } 29 | return result; 30 | } 31 | 32 | public static Job_Setting__mdt getJobSetting(String settingName) { 33 | List jobSetting = [SELECT Id, Job_Cron_Expression__c, Job_Size__c FROM Job_Setting__mdt WHERE DeveloperName = :settingName]; 34 | if (!jobSetting.isEmpty()) { 35 | return jobSetting.get(0); 36 | } 37 | return null; 38 | } 39 | 40 | private static List getApexClasses() { 41 | return [SELECT Id, Name FROM ApexClass WHERE isValid = TRUE]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/SSACUtilTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public inherited sharing class SSACUtilTest { 3 | @IsTest 4 | static void testJobSettingPositive() { 5 | Job_Setting__mdt testMDT = new Job_Setting__mdt(); 6 | Test.startTest(); 7 | testMDT = SSACUtil.getJobSetting('Job_Size'); 8 | Test.stopTest(); 9 | System.assertNotEquals(null, testMDT, 'Job_Size setting successfully recovered.'); 10 | } 11 | 12 | @IsTest 13 | static void testJobSettingNegative() { 14 | Job_Setting__mdt testMDT = new Job_Setting__mdt(); 15 | Test.startTest(); 16 | testMDT = SSACUtil.getJobSetting('JobSize!'); 17 | Test.stopTest(); 18 | System.assertEquals(null, testMDT, 'Job_Size setting successfully returned as null'); 19 | } 20 | 21 | @IsTest 22 | static void testGetJobClasses() { 23 | List interfaces = new List(); 24 | Test.startTest(); 25 | interfaces = SSACUtil.getJobClasses('Queueable'); 26 | Test.stopTest(); 27 | System.assertNotEquals(null, interfaces, 'JobClasses successfully recovered.'); 28 | } 29 | 30 | @isTest 31 | static void testGetSubClassesForTestClass() { 32 | Test.startTest(); 33 | List subClasses = SSACUtil.getSubClasses(TestClass.class); 34 | Test.stopTest(); 35 | 36 | System.assertEquals(2, subClasses.size()); 37 | } 38 | 39 | @IsTest 40 | private static void testDummy() { 41 | new TestClassSub1(); 42 | new TestClassSub2(); 43 | } 44 | 45 | @isTest 46 | static void testGetSubClassesForTestInterface() { 47 | Test.startTest(); 48 | List subClasses = SSACUtil.getSubClasses(TestInterface.class); 49 | Test.stopTest(); 50 | 51 | System.assertEquals(2, subClasses.size()); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_ISelectorFactory.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_ISelectorFactory 27 | { 28 | fflib_ISObjectSelector newInstance(SObjectType sObjectType); 29 | List selectById(Set recordIds); 30 | List selectByRelationship(List relatedRecords, SObjectField relationshipField); 31 | } -------------------------------------------------------------------------------- /3rd-party/fflib/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 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_IDomainFactory.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_IDomainFactory 27 | { 28 | fflib_IDomain newInstance(Set recordIds); 29 | fflib_IDomain newInstance(List records); 30 | fflib_IDomain newInstance(List objects, Object objectType); 31 | fflib_IDomain newInstance(List records, SObjectType domainSObjectType); 32 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/CompositeDataFeederTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class CompositeDataFeederTest { 3 | @IsTest 4 | static void testFeedPositive() { 5 | fflib_ApexMocks mocks = new fflib_ApexMocks(); 6 | fflib_ApexMocksConfig.HasIndependentMocks = true; 7 | FeedLogger logger = (FeedLogger) mocks.mock(FeedLogger.class); 8 | DataFeeder dfAccount = (DataFeeder) mocks.mock(DataFeeder.class); 9 | DataFeeder dfContact = (DataFeeder) mocks.mock(DataFeeder.class); 10 | CompositeDataFeeder cdfTest = new CompositeDataFeeder(new List{dfAccount, dfContact}, logger); 11 | Test.startTest(); 12 | cdfTest.feed(false, logger); 13 | Test.stopTest(); 14 | ((DataFeeder) mocks.verify(dfAccount, 1)).feed(false, logger); 15 | ((DataFeeder) mocks.verify(dfContact, 1)).feed(false, logger); 16 | } 17 | 18 | @IsTest 19 | static void testFeedNegative() { 20 | fflib_ApexMocks mocks = new fflib_ApexMocks(); 21 | fflib_ApexMocksConfig.HasIndependentMocks = true; 22 | FeedLogger logger = (FeedLogger) mocks.mock(FeedLogger.class); 23 | DataFeeder dfAccount = (DataFeeder) mocks.mock(DataFeeder.class); 24 | DataFeeder dfContact = (DataFeeder) mocks.mock(DataFeeder.class); 25 | mocks.startStubbing(); 26 | ((DataFeeder) mocks.doThrowWhen(new TestException(), dfAccount)).feed(false, logger); 27 | mocks.stopStubbing(); 28 | CompositeDataFeeder cdfTest = new CompositeDataFeeder(new List{dfAccount, dfContact}, logger); 29 | Test.startTest(); 30 | try { 31 | cdfTest.feed(false, logger); 32 | System.assert(false); 33 | } catch (Exception e) { 34 | } 35 | Test.stopTest(); 36 | ((DataFeeder) mocks.verify(dfAccount, 1)).feed(false, logger); 37 | ((DataFeeder) mocks.verify(dfContact, 0)).feed(false, logger); 38 | } 39 | 40 | private class TestException extends Exception { 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_IUnitOfWorkFactory.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_IUnitOfWorkFactory 27 | { 28 | fflib_ISObjectUnitOfWork newInstance(); 29 | fflib_ISObjectUnitOfWork newInstance(fflib_SObjectUnitOfWork.IDML dml); 30 | fflib_ISObjectUnitOfWork newInstance(List objectTypes); 31 | fflib_ISObjectUnitOfWork newInstance(List objectTypes, fflib_SObjectUnitOfWork.IDML dml); 32 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_MatchersReturnValue.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2016, 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 with sharing class fflib_MatchersReturnValue 27 | { 28 | public List matchers; 29 | public fflib_MethodReturnValue returnValue; 30 | 31 | public fflib_MatchersReturnValue(List matchers, fflib_MethodReturnValue returnValue) 32 | { 33 | this.matchers = matchers; 34 | this.returnValue = returnValue; 35 | } 36 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_ISObjectDomain.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 | 27 | public interface fflib_ISObjectDomain extends fflib_IDomain 28 | { 29 | /** 30 | * Returns the SObjectType this Domain class represents 31 | **/ 32 | Schema.SObjectType sObjectType(); 33 | 34 | /** 35 | * Alternative to the Records property, provided to support mocking of Domain classes 36 | **/ 37 | List getRecords(); 38 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_System.cls: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | 5 | /** 6 | * @group Core 7 | * Contains counterparts for helper methods in the native System class. 8 | */ 9 | 10 | public class fflib_System 11 | { 12 | /** 13 | * Verifies that the supplied argument is meaningfully equivalent to the expected argument, as defined by its matcher. 14 | * See fflib_SystemTest for examples of usage. 15 | * @param ignoredRetval Dummy value, returned on registering an fflib_IMatcher. 16 | * @param value The object instance upon which we are checking equality. 17 | */ 18 | public static void assertEquals(Object ignoredRetval, Object value) 19 | { 20 | assertEquals(ignoredRetval, value, null); 21 | } 22 | 23 | /** 24 | * Verifies that the supplied argument is meaningfully equivalent to the expected argument, as defined by its matcher. 25 | * See fflib_SystemTest for examples of usage. 26 | * @param ignoredRetval Dummy value, returned on registering an fflib_IMatcher. 27 | * @param value The object instance upon which we are checking equality. 28 | * @param customAssertMessage Provides context or additional information for the assertion. 29 | */ 30 | public static void assertEquals(Object ignoredRetval, Object value, String customAssertMessage) 31 | { 32 | fflib_IMatcher matcher = null; 33 | try 34 | { 35 | List matchers = fflib_Match.getAndClearMatchers(1); 36 | matcher = matchers[0]; 37 | } 38 | catch (fflib_ApexMocks.ApexMocksException e) 39 | { 40 | throw new fflib_ApexMocks.ApexMocksException('fflib_System.assertEquals expects you to register exactly 1 fflib_IMatcher (typically through the helpers in fflib_Match).'); 41 | } 42 | 43 | if (!matcher.matches(value)) 44 | { 45 | throw new fflib_ApexMocks.ApexMocksException(String.format('Expected : {0}, Actual: {1}{2}', new String[]{ 46 | String.valueOf(matcher), 47 | String.valueOf(value), 48 | String.isBlank(customAssertMessage) ? '' : (' -- ' + customAssertMessage) 49 | })); 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_ISObjectSelector.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 | 27 | public interface fflib_ISObjectSelector 28 | { 29 | /** 30 | * Provides the SObjectType for the object the given Selector is providing query logic for 31 | **/ 32 | Schema.SObjectType sObjectType(); 33 | 34 | /** 35 | * Selects by Id records using the fields defined by the Selector configuration 36 | **/ 37 | List selectSObjectsById(Set idSet); 38 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_IMatcher.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2016, 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_IMatcher 27 | { 28 | /** 29 | * Whether or not the supplied argument is a match. 30 | * Any supplementary information (e.g. boundary conditions, objects to match to etc) 31 | * should be cached by the matcher constructor. 32 | * @param arg The argument value supplied to the method 33 | * @return Boolean True if the argument value is a match, false otherwise. 34 | */ 35 | Boolean matches(Object arg); 36 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_ISObjects.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_ISObjects extends fflib_IObjects 27 | { 28 | /** 29 | * @return Return the SObject records contained in the domain 30 | */ 31 | List getRecords(); 32 | 33 | /** 34 | * @return Return the SObject records ids contained in the domain 35 | */ 36 | Set getRecordIds(); 37 | 38 | /** 39 | * @return Return the SObjectType of the SObjects contained in the domain 40 | */ 41 | SObjectType getSObjectType(); 42 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/mocks/fflib_Mocks.cls: -------------------------------------------------------------------------------- 1 | /* Generated by apex-mocks-generator version 4.0.1 */ 2 | @isTest 3 | public class fflib_Mocks 4 | { 5 | public class Mockfflib_MyList implements fflib_MyList.IList 6 | { 7 | private fflib_ApexMocks mocks; 8 | 9 | public Mockfflib_MyList(fflib_ApexMocks mocks) 10 | { 11 | this.mocks = mocks; 12 | } 13 | 14 | public void add(String value) 15 | { 16 | mocks.mockVoidMethod(this, 'add', new List {System.Type.forName('String')}, new List {value}); 17 | } 18 | 19 | public void add(String value1, String value2, String value3, String value4) 20 | { 21 | mocks.mockVoidMethod(this, 'add', new List {System.Type.forName('String'), System.Type.forName('String'), System.Type.forName('String'), System.Type.forName('String')}, new List {value1, value2, value3, value4}); 22 | } 23 | 24 | public void addMore(String value) 25 | { 26 | mocks.mockVoidMethod(this, 'addMore', new List {System.Type.forName('String')}, new List {value}); 27 | } 28 | 29 | public void add(String[] value) 30 | { 31 | mocks.mockVoidMethod(this, 'add', new List {System.Type.forName('String[]')}, new List {value}); 32 | } 33 | 34 | public String get(Integer index) 35 | { 36 | return (String) mocks.mockNonVoidMethod(this, 'get', new List {System.Type.forName('Integer')}, new List {index}); 37 | } 38 | 39 | public String get2(Integer index, String value) 40 | { 41 | return (String) mocks.mockNonVoidMethod(this, 'get2', new List {System.Type.forName('Integer'), System.Type.forName('String')}, new List {index, value}); 42 | } 43 | 44 | public void clear() 45 | { 46 | mocks.mockVoidMethod(this, 'clear', new List {}, new List {}); 47 | } 48 | 49 | public Boolean isEmpty() 50 | { 51 | return (Boolean) mocks.mockNonVoidMethod(this, 'isEmpty', new List {}, new List {}); 52 | } 53 | 54 | public void set(Integer index, Object value) 55 | { 56 | mocks.mockVoidMethod(this, 'set', new List {System.Type.forName('Integer'), System.Type.forName('Object')}, new List {index, value}); 57 | } 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/StaticDataSupplierTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public inherited sharing class StaticDataSupplierTest { 3 | 4 | @IsTest 5 | static void testSDDInvalidMetadata() { 6 | Test.startTest(); 7 | try { 8 | StaticDataSupplier sdd = new StaticDataSupplier(null, new Account[] { 9 | new Account(Name = 'Social Software') }); 10 | System.assert(false, 'IllegalArgumentException is expected here'); 11 | } catch (IllegalArgumentException e) {} 12 | Test.stopTest(); 13 | } 14 | 15 | @IsTest 16 | static void testSDDInvalidData() { 17 | DataDefinition metadata = new DataDefinition.DataDefinitionBuilder(Account.SObjectType). 18 | addKeyField(Account.Name).addDataField(Account.Name).build(); 19 | 20 | Test.startTest(); 21 | try { 22 | StaticDataSupplier sdd = new StaticDataSupplier(metadata, new List()); 23 | System.assert(false, 'IllegalArgumentException is expected here'); 24 | } catch (IllegalArgumentException e) {} 25 | Test.stopTest(); 26 | } 27 | 28 | @IsTest 29 | static void testSDDGetMetadata() { 30 | DataDefinition metadata = new DataDefinition.DataDefinitionBuilder(Account.SObjectType). 31 | addKeyField(Account.Name).addDataField(Account.Name).build(); 32 | 33 | Test.startTest(); 34 | StaticDataSupplier sdd = new StaticDataSupplier(metadata, new Account[] { 35 | new Account(Name = 'Social Software') }); 36 | DataDefinition dd = sdd.getMetadata(); 37 | Test.stopTest(); 38 | System.assertEquals(metadata, dd); 39 | } 40 | 41 | @IsTest 42 | static void testSDDSupply() { 43 | DataDefinition metadata = new DataDefinition.DataDefinitionBuilder(Account.SObjectType). 44 | addKeyField(Account.Name).addDataField(Account.Name).build(); 45 | 46 | Test.startTest(); 47 | StaticDataSupplier sdd = new StaticDataSupplier(metadata, new Account[] { 48 | new Account(Name = 'Social Software') }); 49 | List data = sdd.supply(); 50 | Test.stopTest(); 51 | System.assertEquals(1, data.size()); 52 | System.assertEquals('Social Software', data[0].get('Name')); 53 | } 54 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_IDGenerator.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, 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 with sharing class fflib_IDGenerator 27 | { 28 | private static Integer fakeIdCount = 0; 29 | private static final String ID_PATTERN = '000000000000'; 30 | 31 | /** 32 | * Generate a fake Salesforce Id for the given SObjectType 33 | */ 34 | public static Id generate(Schema.SObjectType sobjectType) 35 | { 36 | String keyPrefix = sobjectType.getDescribe().getKeyPrefix(); 37 | fakeIdCount++; 38 | 39 | String fakeIdPrefix = ID_PATTERN.substring(0, ID_PATTERN.length() - String.valueOf(fakeIdCount).length()); 40 | 41 | return Id.valueOf(keyPrefix + fakeIdPrefix + fakeIdCount); 42 | } 43 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/EqualsBuilderTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public with sharing class EqualsBuilderTest { 3 | 4 | @IsTest 5 | private static void testEquals() { 6 | Account a1 = new Account( 7 | Name = 'Test Company', 8 | ShippingLatitude = 15.1, 9 | NumberOfEmployees = 4 10 | ); 11 | 12 | Account a2 = new Account( 13 | Name = 'Test Company', 14 | ShippingLatitude = 15.1, 15 | NumberOfEmployees = 4 16 | ); 17 | 18 | Account a3 = new Account( 19 | Name = 'Test Company 1', 20 | ShippingLatitude = 15.1, 21 | NumberOfEmployees = 4 22 | ); 23 | 24 | EqualsBuilder eb1; 25 | EqualsBuilder eb2; 26 | Test.startTest(); 27 | eb1 = new EqualsBuilder() 28 | .append(a1.Name, a2.Name) 29 | .append(a1.ShippingLatitude, a2.ShippingLatitude) 30 | .append(a1.NumberOfEmployees, a2.NumberOfEmployees); 31 | 32 | eb2 = new EqualsBuilder() 33 | .append(a2.Name, a3.Name) 34 | .append(a2.ShippingLatitude, a3.ShippingLatitude) 35 | .append(a2.NumberOfEmployees, a3.NumberOfEmployees); 36 | Test.stopTest(); 37 | 38 | System.assertEquals(true, eb1.build(), 'Accounts should be equal'); 39 | System.assertEquals(false, eb2.build(), 'Accounts should not be equal'); 40 | } 41 | 42 | @IsTest 43 | private static void testListsEqual() { 44 | List str1 = new List { 'one', 'two', 'three'}; 45 | List str2 = new List { 'one', 'two', 'three'}; 46 | List str3 = new List { 'one', 'two', 'five', 'six'}; 47 | 48 | EqualsBuilder eb1; 49 | EqualsBuilder eb2; 50 | 51 | Test.startTest(); 52 | eb1 = new EqualsBuilder() 53 | .append(str1, str2); 54 | 55 | eb2 = new EqualsBuilder() 56 | .append(str2, str3); 57 | Test.stopTest(); 58 | 59 | System.assertEquals(true, eb1.build(), 'Lists should be equal'); 60 | System.assertEquals(false, eb2.build(), 'Lists should not be equal'); 61 | 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_InvocationOnMock.cls: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | 5 | /** 6 | * An invocation on a mock. 7 | * A place holder for mock, the method that was called and the arguments that were passed. 8 | * @group Core 9 | */ 10 | public with sharing class fflib_InvocationOnMock 11 | { 12 | private fflib_QualifiedMethod qm; 13 | private fflib_MethodArgValues methodArg; 14 | private Object mockInstance; 15 | 16 | /** 17 | * Constructor for the class. 18 | * @param qm The fflib_QualifiedMethod instance to be stored. 19 | * @param args The fflib_MethodArgValues instance to be stored. 20 | * @param mockInstance The mock instance to be stored. 21 | */ 22 | public fflib_InvocationOnMock(fflib_QualifiedMethod qm, fflib_MethodArgValues args, Object mockInstance) 23 | { 24 | this.qm = qm; 25 | this.methodArg = args; 26 | this.mockInstance = mockInstance; 27 | } 28 | 29 | /** 30 | * Returns the argument at the given index. 31 | * @param index The index of the wanted argument. 32 | * @throws ApexMocksException in case the index is out of range. 33 | * @return The argument at the given index. 34 | */ 35 | public Object getArgument(Integer index) 36 | { 37 | validateIndex(index); 38 | return methodArg.argValues[index]; 39 | } 40 | 41 | /** 42 | * Returns the list of arguments passed to the method. 43 | * @return The list of arguments. 44 | */ 45 | public List getArguments() 46 | { 47 | return methodArg.argValues; 48 | } 49 | 50 | /** 51 | * Returns fflib_MethodArgValues instance that represents the arguments passed to the method. 52 | * @return The fflib_MethodArgValues instance that represents the arguments passed to the method. 53 | */ 54 | public fflib_MethodArgValues getMethodArgValues() 55 | { 56 | return methodArg; 57 | } 58 | 59 | /** 60 | * Returns the fflib_QualifiedMethod instance that represent the fully qualified method called within the invocation. 61 | * @return The method stored in the invocation. 62 | */ 63 | public fflib_QualifiedMethod getMethod() 64 | { 65 | return qm; 66 | } 67 | 68 | /** 69 | * Returns the mock object on which the invocation occurs. 70 | * @return The mock object on which the invocation occurs. 71 | */ 72 | public Object getMock() 73 | { 74 | return mockInstance; 75 | } 76 | 77 | private void validateIndex(Integer index) 78 | { 79 | if(index < 0 || index >= methodArg.argValues.size()) 80 | { 81 | throw new fflib_ApexMocks.ApexMocksException('Invalid index, must be greater or equal to zero and less of ' + methodArg.argValues.size()+'.'); 82 | } 83 | } 84 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_QualifiedMethod.cls: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | public with sharing class fflib_QualifiedMethod 5 | { 6 | public final Object mockInstance; 7 | public final String typeName; 8 | public final String methodName; 9 | public final List methodArgTypes; 10 | 11 | public fflib_QualifiedMethod(String typeName, String methodName, List methodArgTypes) 12 | { 13 | this(typeName, methodName, methodArgTypes, null); 14 | } 15 | 16 | public fflib_QualifiedMethod(String typeName, String methodName, List methodArgTypes, Object mockInstance) 17 | { 18 | this.mockInstance = mockInstance; 19 | this.typeName = typeName; 20 | this.methodName = methodName; 21 | this.methodArgTypes = methodArgTypes; 22 | } 23 | 24 | /** 25 | * Standard equals override. 26 | * @param other The object whose equality we are verifying 27 | * @return Boolean True if meaningfully equivalent, false otherwise. 28 | */ 29 | public Boolean equals(Object other) 30 | { 31 | if (this === other) 32 | { 33 | return true; 34 | } 35 | 36 | fflib_QualifiedMethod that = other instanceof fflib_QualifiedMethod ? (fflib_QualifiedMethod)other : null; 37 | 38 | return that != null 39 | && (this.mockInstance === that.mockInstance || !fflib_ApexMocksConfig.HasIndependentMocks) 40 | && this.typeName == that.typeName 41 | && this.methodName == that.methodName 42 | && this.methodArgTypes == that.methodArgTypes; 43 | } 44 | 45 | /** 46 | * Standard hashCode override. 47 | * @return Integer The generated hashCode 48 | */ 49 | public Integer hashCode() 50 | { 51 | Integer prime = 31; 52 | Integer result = 1; 53 | 54 | if (fflib_ApexMocksConfig.HasIndependentMocks) 55 | { 56 | result = prime * result + ((mockInstance == null) ? 0 : mockInstance.hashCode()); 57 | } 58 | result = prime * result + ((methodArgTypes == null) ? 0 : methodArgTypes.hashCode()); 59 | result = prime * result + ((methodName == null) ? 0 : methodName.hashCode()); 60 | result = prime * result + ((typeName == null) ? 0 : typeName.hashCode()); 61 | 62 | return result; 63 | } 64 | 65 | /** 66 | * Standard toString override. 67 | * @return String The human friendly description of the method. 68 | */ 69 | public override String toString() 70 | { 71 | return typeName + '.' + methodName + methodArgTypes; 72 | } 73 | 74 | /** 75 | * Predicate describing whether the qualified method accepts arguments or not. 76 | * @return True if the method accepts arguments. 77 | */ 78 | public Boolean hasArguments() 79 | { 80 | return this.methodArgTypes != null && !this.methodArgTypes.isEmpty(); 81 | } 82 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/utils/HashCodeBuilder.cls: -------------------------------------------------------------------------------- 1 | public inherited sharing class HashCodeBuilder { 2 | private static final Integer DEFAULT_INITIAL_VALUE = 17; 3 | private static final Integer DEFAULT_MULTIPLIER_VALUE = 37; 4 | 5 | private final Integer iConstant; 6 | private Integer iTotal; 7 | 8 | public HashCodeBuilder() { 9 | iConstant = DEFAULT_MULTIPLIER_VALUE; 10 | iTotal = DEFAULT_INITIAL_VALUE; 11 | } 12 | 13 | public HashCodeBuilder(Integer initialOddNumber, Integer multiplierOddNumber) { 14 | if (Math.mod(initialOddNumber, 2) == 0) { 15 | throw new IllegalArgumentException('HashCodeBuilder requires an odd initial value'); 16 | } 17 | if (Math.mod(multiplierOddNumber, 2) == 0) { 18 | throw new IllegalArgumentException('HashCodeBuilder requires an odd multiplier'); 19 | } 20 | 21 | iConstant = multiplierOddNumber; 22 | iTotal = initialOddNumber; 23 | } 24 | 25 | public HashCodeBuilder append(final Boolean value) { 26 | iTotal = iTotal * iConstant + (value ? 0 : 1); 27 | return this; 28 | } 29 | 30 | public HashCodeBuilder append(Double value) { 31 | return append(((Object) value).hashCode()); 32 | } 33 | 34 | public HashCodeBuilder append(Decimal value) { 35 | return append(((Object) value).hashCode()); 36 | } 37 | 38 | public HashCodeBuilder append(Integer value) { 39 | iTotal = iTotal * iConstant + value; 40 | return this; 41 | } 42 | 43 | public HashCodeBuilder append(Long value) { 44 | append(((Object) value).hashCode()); 45 | return this; 46 | } 47 | 48 | public HashCodeBuilder append(Id value) { 49 | append(((Object) value).hashCode()); 50 | return this; 51 | } 52 | 53 | public HashCodeBuilder append(String value) { 54 | append(value.hashCode()); 55 | return this; 56 | } 57 | 58 | public HashCodeBuilder append(Object obj) { 59 | if (obj == null) { 60 | iTotal = iTotal * iConstant; 61 | } else if (obj instanceof List) { 62 | append((List) obj); 63 | } else { 64 | iTotal = iTotal * iConstant + obj.hashCode(); 65 | } 66 | return this; 67 | } 68 | 69 | public HashCodeBuilder append(Object[] objs) { 70 | if (objs == null) { 71 | iTotal = iTotal * iConstant; 72 | } else { 73 | for (Object obj : objs) { 74 | append(obj); 75 | } 76 | } 77 | return this; 78 | } 79 | 80 | public Integer toHashCode() { 81 | return iTotal; 82 | } 83 | 84 | public Integer build() { 85 | return toHashCode(); 86 | } 87 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_MethodArgValues.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2016, 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 with sharing class fflib_MethodArgValues 27 | { 28 | public List argValues; 29 | 30 | /** 31 | * Wrapper object which encapsulates the argument values 32 | * supplied during a given method call. 33 | * @param argValues The 34 | * @return fflib_MethodArgValues The method argument wrapper object 35 | */ 36 | public fflib_MethodArgValues(List argValues) 37 | { 38 | this.argValues = argValues; 39 | } 40 | 41 | /** 42 | * Standard equals override. 43 | * @param other The object whose equality we are verifying 44 | * @return Boolean True if meaningfully equivalent, false otherwise. 45 | */ 46 | public Boolean equals(Object other) 47 | { 48 | if (this === other) 49 | { 50 | return true; 51 | } 52 | 53 | fflib_MethodArgValues that = other instanceof fflib_MethodArgValues ? (fflib_MethodArgValues)other : null; 54 | return that != null && this.argValues == that.argValues; 55 | } 56 | 57 | /** 58 | * Standard hashCode override. 59 | * @return Integer The generated hashCode 60 | */ 61 | public Integer hashCode() 62 | { 63 | Integer prime = 31; 64 | Integer result = 1; 65 | 66 | result = prime * result + ((argValues == null) ? 0 : argValues.hashCode()); 67 | 68 | return result; 69 | } 70 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/test/classes/fflib_IDGeneratorTest.cls: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, 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 | @isTest 27 | private class fflib_IDGeneratorTest 28 | { 29 | @isTest 30 | static void itShouldGenerateValidIDs() 31 | { 32 | String id1 = fflib_IDGenerator.generate(Account.SObjectType); 33 | String id2 = fflib_IDGenerator.generate(Account.SObjectType); 34 | String id3 = fflib_IDGenerator.generate(Account.SObjectType); 35 | String id4 = fflib_IDGenerator.generate(Account.SObjectType); 36 | String id5 = fflib_IDGenerator.generate(Account.SObjectType); 37 | String id6 = fflib_IDGenerator.generate(Account.SObjectType); 38 | String id7 = fflib_IDGenerator.generate(Account.SObjectType); 39 | String id8 = fflib_IDGenerator.generate(Account.SObjectType); 40 | String id9 = fflib_IDGenerator.generate(Account.SObjectType); 41 | String id10 = fflib_IDGenerator.generate(Account.SObjectType); 42 | String id11 = fflib_IDGenerator.generate(Account.SObjectType); 43 | 44 | System.assertEquals('001000000000001AAA', id1); 45 | System.assertEquals('001000000000002AAA', id2); 46 | System.assertEquals('001000000000003AAA', id3); 47 | System.assertEquals('001000000000004AAA', id4); 48 | System.assertEquals('001000000000005AAA', id5); 49 | System.assertEquals('001000000000006AAA', id6); 50 | System.assertEquals('001000000000007AAA', id7); 51 | System.assertEquals('001000000000008AAA', id8); 52 | System.assertEquals('001000000000009AAA', id9); 53 | System.assertEquals('001000000000010AAA', id10); 54 | System.assertEquals('001000000000011AAA', id11); 55 | } 56 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/SetUtilsTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public inherited sharing class SetUtilsTest { 3 | 4 | @IsTest 5 | static void testSetOfStrings() { 6 | FieldReference field = FieldReference.build(Account.Name); 7 | Set objs = new Set{'Test1', 'Test2'}; 8 | 9 | Test.startTest(); 10 | Object result = SetUtils.toSetOfType(field, objs); 11 | Test.stopTest(); 12 | 13 | System.assert(result instanceof Set, 'Method must return set of strings'); 14 | } 15 | 16 | @IsTest 17 | static void testNegativeSetOfStrings() { 18 | FieldReference field = FieldReference.build(Account.Name); 19 | Set objs = new Set{'Test1', 2}; 20 | 21 | Test.startTest(); 22 | try { 23 | Object result = SetUtils.toSetOfType(field, objs); 24 | System.assert(false, 'TypeException is expected here'); 25 | } catch (Exception ex) { 26 | System.assert(ex instanceof TypeException); 27 | } 28 | Test.stopTest(); 29 | } 30 | 31 | @IsTest 32 | static void testSetOfDoubles() { 33 | FieldReference field = FieldReference.build(Opportunity.Amount); 34 | Set objs = new Set{1.2, 2.3}; 35 | 36 | Test.startTest(); 37 | Object result = SetUtils.toSetOfType(field, objs); 38 | Test.stopTest(); 39 | 40 | System.assert(result instanceof Set, 'Method must return set of doubles'); 41 | } 42 | 43 | @IsTest 44 | static void testSetOfIntegers() { 45 | FieldReference field = FieldReference.build(Campaign.NumberOfContacts); 46 | Set objs = new Set{1, 2, 3}; 47 | 48 | Test.startTest(); 49 | Object result = SetUtils.toSetOfType(field, objs); 50 | Test.stopTest(); 51 | 52 | System.assert(result instanceof Set, 'Method must return set of integers'); 53 | } 54 | 55 | @IsTest 56 | static void testSetOfDate() { 57 | FieldReference field = FieldReference.build(Opportunity.CloseDate); 58 | Set objs = new Set{Date.newInstance(1960, 2, 17)}; 59 | 60 | Test.startTest(); 61 | Object result = SetUtils.toSetOfType(field, objs); 62 | Test.stopTest(); 63 | 64 | System.assert(result instanceof Set, 'Method must return set of dates'); 65 | } 66 | 67 | @IsTest 68 | static void testSetOfDateTime() { 69 | FieldReference field = FieldReference.build(Case.ClosedDate); 70 | Set objs = new Set{Datetime.newInstance(2020, 2, 17)}; 71 | 72 | Test.startTest(); 73 | Object result = SetUtils.toSetOfType(field, objs); 74 | Test.stopTest(); 75 | 76 | System.assert(result instanceof Set, 'Method must return set of datetimes'); 77 | } 78 | 79 | @IsTest 80 | static void testSetOfBooleans() { 81 | FieldReference field = FieldReference.build(User.IsActive); 82 | Set objs = new Set{true}; 83 | 84 | Test.startTest(); 85 | Object result = SetUtils.toSetOfType(field, objs); 86 | Test.stopTest(); 87 | 88 | System.assert(result instanceof Set, 'Method must return set of booleans'); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_IObjects.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_IObjects extends fflib_IDomain 27 | { 28 | /** 29 | * @param value Values to check if they are part of the domain 30 | * 31 | * @return True if the provided value is part of the domain 32 | */ 33 | Boolean contains(Object value); 34 | 35 | /** 36 | * @param values Values to check if they are part of the domain 37 | * 38 | * @return True if all the provided values are part of the domain 39 | */ 40 | Boolean containsAll(List values); 41 | 42 | /** 43 | * @param values Values to check if they are part of the domain 44 | * 45 | * @return True if all the provided values are part of the domain 46 | */ 47 | Boolean containsAll(Set values); 48 | 49 | /** 50 | * @param value Value to check if it is part of the domain 51 | * 52 | * @return True if the provided value is not part of the domain 53 | */ 54 | Boolean containsNot(Object value); 55 | 56 | /** 57 | * @param values Values to check if they are part of the domain 58 | * 59 | * @return True if all the provided values are not part of the domain 60 | */ 61 | Boolean containsNot(List values); 62 | 63 | /** 64 | * @param values Values to check if they are part of the domain 65 | * 66 | * @return True if all the provided values are not part of the domain 67 | */ 68 | Boolean containsNot(Set values); 69 | 70 | /** 71 | * @return Returns True is the domain is empty 72 | */ 73 | Boolean isEmpty(); 74 | 75 | /** 76 | * @return Returns True is the domain has objects 77 | */ 78 | Boolean isNotEmpty(); 79 | 80 | /** 81 | * @return Returns the amount of records contained in the domain 82 | */ 83 | Integer size(); 84 | } -------------------------------------------------------------------------------- /manifest/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SampleDataSuppliers 5 | SSACController 6 | DataSupplierFactory 7 | AsyncDataFeeder 8 | BaseDataFeeder 9 | ChainedAsyncDataFeeder 10 | ChainedDataFeeder 11 | CompositeDataFeeder 12 | CustomerConstants 13 | DataFeeder 14 | DataSupplier 15 | FeedLogger 16 | FeedersQueue 17 | FieldReference 18 | ISSACAction 19 | OpportunityConstants 20 | ProductConstants 21 | SSACAsyncAction 22 | SSACBatchableAction 23 | SSACConstants 24 | SSACCustomerDataAction 25 | SSACDataFilter 26 | SSACDataHandler 27 | SSACLogger 28 | SSACOpportunityDataAction 29 | SSACProductDataAction 30 | SSACResult 31 | SSACResultsUtil 32 | SSACSObjectAction 33 | SSACSObjectWrapper 34 | SSACScheduledAction 35 | SSACUtil 36 | SetUtils 37 | StaticDataSupplier 38 | SystemFeedLogger 39 | TypeUtils 40 | FieldReferenceTest 41 | SSACControllerTest 42 | SSACDataFilterTest 43 | SSACUtilTest 44 | SetUtilsTest 45 | TestBatchable 46 | TestScheduable 47 | TypeUtilsTest 48 | BaseBatchableFeeder 49 | AccountsDataFeederFactory 50 | BaseSchedulableFeeder 51 | CompositeFeedLogger 52 | DataDefinition 53 | DataFeederFactory 54 | DataFilter 55 | PlatformEventFeedLogger 56 | ApexClass 57 | 58 | 59 | Job_Setting__mdt 60 | ResultLogEvent__e 61 | SObjectLoadEvent__e 62 | CustomObject 63 | 64 | 65 | CustomField 66 | 67 | 68 | Job_Setting.Job_Cron_Expression 69 | Job_Setting.Job_Size 70 | CustomMetadata 71 | 72 | 73 | AdminConsole 74 | CustomTab 75 | 76 | 77 | ss_admin_console 78 | LightningComponentBundle 79 | 80 | 81 | SS_Admin_Console 82 | PermissionSet 83 | 84 | 53.0 85 | 86 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/SSACController.cls: -------------------------------------------------------------------------------- 1 | public inherited sharing class SSACController { 2 | 3 | @AuraEnabled 4 | public static List getDataTypes() { 5 | List factories = getDataFeederFactories(); 6 | List dataTypes = new List(); 7 | for (DataSupplierFactoryWrapper wrapper : factories) { 8 | dataTypes.add(wrapper.description); 9 | } 10 | return dataTypes; 11 | } 12 | 13 | @AuraEnabled 14 | public static List getDataFeederFactories() { 15 | List factoryTypes = SSACUtil.getSubClasses(DataFeederFactory.class); 16 | List feederFactories = new List(); 17 | for (Type factoryType : factoryTypes) { 18 | if (factoryType != DataFeederFactory.class) { 19 | try { 20 | DataFeederFactory factory = (DataFeederFactory) factoryType.newInstance(); 21 | feederFactories.add(new DataSupplierFactoryWrapper(factory.getName(), factoryType.getName())); 22 | } catch (Exception e) { 23 | // Log message properly 24 | } 25 | } 26 | } 27 | return feederFactories; 28 | } 29 | 30 | @AuraEnabled 31 | public static List getJobClasses(String interfaceName) { 32 | return SSACUtil.getJobClasses(interfaceName); 33 | } 34 | 35 | @AuraEnabled 36 | public static String action(String actionType, Boolean updateRecords, Boolean checkOnly) { 37 | FeedLogger logger = new CompositeFeedLogger(new List{PlatformEventFeedLogger.getInstance(), SystemFeedLogger.getInstance()}); 38 | List factories = getDataFeederFactories(); 39 | String factoryName; 40 | for (DataSupplierFactoryWrapper wrapper : factories) { 41 | if (wrapper.description == actionType) { 42 | factoryName = wrapper.factoryName; 43 | break; 44 | } 45 | } 46 | if (factoryName != null) { 47 | Type factoryType = Type.forName(factoryName); 48 | DataFeederFactory feederFactory = (DataFeederFactory) factoryType.newInstance(); 49 | DataFeeder df = feederFactory.getDataFeeder(); 50 | if (checkOnly) { 51 | Savepoint sp = Database.setSavepoint(); 52 | try { 53 | df.feed(true, logger); 54 | } finally { 55 | Database.rollback(sp); 56 | } 57 | PlatformEventFeedLogger.getInstance().publishResultLog(actionType, DataFeederExecutionType.TEST_ACTION_TYPE.value()); 58 | } else { 59 | try { 60 | df.feed(updateRecords, logger); 61 | } finally { 62 | PlatformEventFeedLogger.getInstance().publishResultLog(actionType, DataFeederExecutionType.RUN_ACTION_TYPE.value()); 63 | } 64 | } 65 | } 66 | return 'Action Started'; 67 | } 68 | 69 | public class DataSupplierFactoryWrapper { 70 | public String description {get; private set;} 71 | public String factoryName {get; private set;} 72 | 73 | public DataSupplierFactoryWrapper(String description, String factoryName) { 74 | this.description = description; 75 | this.factoryName = factoryName; 76 | } 77 | } 78 | } -------------------------------------------------------------------------------- /ss_admin_console/main/tests/classes/FieldReferenceTest.cls: -------------------------------------------------------------------------------- 1 | @IsTest 2 | public inherited sharing class FieldReferenceTest { 3 | 4 | @IsTest 5 | static void testSchemaGetField() { 6 | FieldReference field = FieldReference.build(Account.Name); 7 | 8 | Test.startTest(); 9 | SObjectField sobjField = field.getField(); 10 | Test.stopTest(); 11 | 12 | System.assertEquals(Account.Name, sobjField, 'Method must return Account.Name SObjectField'); 13 | } 14 | 15 | @IsTest 16 | static void testSchemaGetFrom() { 17 | FieldReference field = FieldReference.build(Account.Name); 18 | Account acc = new Account(Name = 'TestAcct'); 19 | 20 | Test.startTest(); 21 | Object obj = field.getFrom(acc); 22 | Test.stopTest(); 23 | 24 | System.assertEquals(acc.Name, obj, 'Method must return value of Account.Name field'); 25 | } 26 | 27 | @IsTest 28 | static void testSchemaToString() { 29 | FieldReference field = FieldReference.build(Account.Name); 30 | 31 | Test.startTest(); 32 | String strField = field.toString(); 33 | Test.stopTest(); 34 | 35 | System.assertEquals(Account.Name.getDescribe().getName(), strField); 36 | } 37 | 38 | @IsTest 39 | static void testSchemaInvalidField() { 40 | Test.startTest(); 41 | try { 42 | FieldReference field = FieldReference.build(Schema.Account.getSObjectType(), 'Invalid Field'); 43 | System.assert(false, 'IllegalArgumentException is expected here'); 44 | } catch (IllegalArgumentException e) { 45 | System.assertEquals('Field is invalid', e.getMessage()); 46 | } 47 | Test.stopTest(); 48 | } 49 | 50 | @IsTest 51 | static void testChainedGetField() { 52 | FieldReference field = FieldReference.build(Schema.Opportunity.getSObjectType(), 'Account.Owner.Name'); 53 | 54 | Test.startTest(); 55 | SObjectField sobjField = field.getField(); 56 | Test.stopTest(); 57 | 58 | System.assertEquals(User.Name, sobjField, 'Method must return Account.Owner.Name SObjectField'); 59 | } 60 | 61 | @IsTest 62 | static void testChainedInvalidField() { 63 | Test.startTest(); 64 | try { 65 | FieldReference field = FieldReference.build(Schema.Account.getSObjectType(), 66 | 'Account.Name'); 67 | System.assert(false, 'IllegalArgumentException is expected here'); 68 | } catch (Exception e) { 69 | System.assert(e instanceof IllegalArgumentException); 70 | } 71 | Test.stopTest(); 72 | } 73 | 74 | @IsTest 75 | static void testChainedGetFrom() { 76 | FieldReference field = FieldReference.build(Schema.Contact.getSObjectType(), 'Account.Name'); 77 | Contact cont = new Contact(FirstName = 'Test', LastName = 'Test', Account = new Account(Name = 'TestAcct')); 78 | 79 | Test.startTest(); 80 | Object obj = field.getFrom(cont); 81 | Test.stopTest(); 82 | 83 | System.assertEquals(cont.Account.Name, obj, 'Method must return value of Account.Name field'); 84 | } 85 | 86 | @IsTest 87 | static void testChainedToString() { 88 | FieldReference field = FieldReference.build(Schema.Contact.getSObjectType(), 'Account.Name'); 89 | 90 | Test.startTest(); 91 | String strField = field.toString(); 92 | Test.stopTest(); 93 | 94 | System.assertEquals('Account.Name', strField); 95 | } 96 | } -------------------------------------------------------------------------------- /3rd-party/fflib/apex-common/main/classes/fflib_Objects.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 virtual class fflib_Objects implements fflib_IObjects 27 | { 28 | protected List objects { get; private set;} { objects = new List(); } 29 | 30 | /** 31 | * Class constructor 32 | */ 33 | public fflib_Objects(List objects) 34 | { 35 | this.objects = objects.clone(); 36 | } 37 | 38 | public virtual Object getType() 39 | { 40 | return Object.class; 41 | } 42 | 43 | public List getObjects() 44 | { 45 | return this.objects; 46 | } 47 | 48 | public Boolean contains(Object value) 49 | { 50 | return getObjects()?.contains(value); 51 | } 52 | 53 | public Boolean containsAll(List values) 54 | { 55 | if (values == null) return false; 56 | 57 | return containsAll(new Set(values)); 58 | } 59 | 60 | public Boolean containsAll(Set values) 61 | { 62 | if (values == null) return false; 63 | 64 | for (Object value : values) 65 | { 66 | if (!getObjects()?.contains(value)) return false; 67 | } 68 | return true; 69 | } 70 | 71 | public Boolean containsNot(Object value) 72 | { 73 | return !contains(value); 74 | } 75 | 76 | public Boolean containsNot(List values) 77 | { 78 | if (values == null) return true; 79 | 80 | return containsNot(new Set(values)); 81 | } 82 | 83 | public Boolean containsNot(Set values) 84 | { 85 | if (values == null) return true; 86 | 87 | for (Object value : values) 88 | { 89 | if (getObjects()?.contains(value)) return false; 90 | } 91 | return true; 92 | } 93 | 94 | public Boolean isEmpty() 95 | { 96 | return (getObjects() == null || getObjects().isEmpty()); 97 | } 98 | 99 | public Boolean isNotEmpty() 100 | { 101 | return !isEmpty(); 102 | } 103 | 104 | public Integer size() 105 | { 106 | return getObjects().size(); 107 | } 108 | 109 | protected void setObjects(List objects) 110 | { 111 | this.objects = objects; 112 | } 113 | } -------------------------------------------------------------------------------- /ss_admin_console/main/default/classes/feeder/factories/PricebookEntryDataFeederFactory.cls: -------------------------------------------------------------------------------- 1 | public with sharing class PricebookEntryDataFeederFactory implements DataFeederFactory { 2 | public String getName() { 3 | return 'Sample PricebookEntries'; 4 | } 5 | 6 | public DataFeeder getDataFeeder() { 7 | DataDefinition.DataDefinitionBuilder dataDefinitionBuilder = new DataDefinition.DataDefinitionBuilder(PricebookEntry.SObjectType) 8 | .addKeyField('Product2.ProductCode') 9 | .addKeyField('Pricebook2.Name') 10 | .addDataField('UnitPrice') 11 | .addDataField('IsActive') 12 | .addReferenceField(PricebookEntry.Pricebook2Id, new String[] {'Name'}) 13 | .addReferenceField(PricebookEntry.Product2Id, new String[] {'Name'}); 14 | return new BaseDataFeeder( 15 | new StaticDataSupplier( 16 | dataDefinitionBuilder.build(), 17 | new PricebookEntry[] { 18 | new PricebookEntry(UnitPrice = 15.14, IsActive = false, Pricebook2 = new Pricebook2(Name = 'Standard Price Book'), Product2 = new Product2(Name = 'TEST-0001')), 19 | new PricebookEntry(UnitPrice = 51.15, IsActive = false, Pricebook2 = new Pricebook2(Name = 'Standard Price Book'), Product2 = new Product2(Name = 'TEST-0002')), 20 | new PricebookEntry(UnitPrice = 29.98, IsActive = false, Pricebook2 = new Pricebook2(Name = 'Standard Price Book'), Product2 = new Product2(Name = 'TEST-0003')), 21 | new PricebookEntry(UnitPrice = 6.3, IsActive = false, Pricebook2 = new Pricebook2(Name = 'Standard Price Book'), Product2 = new Product2(Name = 'TEST-0004')), 22 | new PricebookEntry(UnitPrice = 74.84, IsActive = false, Pricebook2 = new Pricebook2(Name = 'Standard Price Book'), Product2 = new Product2(Name = 'TEST-0005')), 23 | 24 | new PricebookEntry(UnitPrice = 16.01, IsActive = true, Pricebook2 = new Pricebook2(Name = 'Test PriceBook1'), Product2 = new Product2(Name = 'TEST-0001')), 25 | new PricebookEntry(UnitPrice = 51.41, IsActive = true, Pricebook2 = new Pricebook2(Name = 'Test PriceBook1'), Product2 = new Product2(Name = 'TEST-0002')), 26 | new PricebookEntry(UnitPrice = 30.63, IsActive = true, Pricebook2 = new Pricebook2(Name = 'Test PriceBook1'), Product2 = new Product2(Name = 'TEST-0003')), 27 | new PricebookEntry(UnitPrice = 7.11, IsActive = true, Pricebook2 = new Pricebook2(Name = 'Test PriceBook1'), Product2 = new Product2(Name = 'TEST-0004')), 28 | new PricebookEntry(UnitPrice = 75.43, IsActive = true, Pricebook2 = new Pricebook2(Name = 'Test PriceBook1'), Product2 = new Product2(Name = 'TEST-0005')), 29 | 30 | new PricebookEntry(UnitPrice = 15.6, IsActive = false, Pricebook2 = new Pricebook2(Name = 'Test PriceBook2'), Product2 = new Product2(Name = 'TEST-0001')), 31 | new PricebookEntry(UnitPrice = 51.29, IsActive = false, Pricebook2 = new Pricebook2(Name = 'Test PriceBook2'), Product2 = new Product2(Name = 'TEST-0002')), 32 | new PricebookEntry(UnitPrice = 31.14, IsActive = false, Pricebook2 = new Pricebook2(Name = 'Test PriceBook2'), Product2 = new Product2(Name = 'TEST-0003')), 33 | new PricebookEntry(UnitPrice = 7.21, IsActive = false, Pricebook2 = new Pricebook2(Name = 'Test PriceBook2'), Product2 = new Product2(Name = 'TEST-0004')), 34 | new PricebookEntry(UnitPrice = 75.38, IsActive = false, Pricebook2 = new Pricebook2(Name = 'Test PriceBook2'), Product2 = new Product2(Name = 'TEST-0005')) 35 | } 36 | ) 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /3rd-party/fflib/apex-mocks/main/classes/fflib_AnyOrder.cls: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2017 FinancialForce.com, inc. All rights reserved. 3 | */ 4 | 5 | /** 6 | * 'Classic' invocation verifier - checks that a method was called with the given arguments the expected number of times. 7 | * The order of method calls is not important. 8 | * @group Core 9 | */ 10 | public class fflib_AnyOrder extends fflib_MethodVerifier 11 | { 12 | /* 13 | * Verifies a method was invoked the expected number of times, with the expected arguments. 14 | * @param qualifiedMethod The method to be verified. 15 | * @param methodArg The arguments of the method that needs to be verified. 16 | * @param verificationMode The verification mode that holds the setting about how the verification should be performed. 17 | */ 18 | protected override void verify( 19 | fflib_QualifiedMethod qm, 20 | fflib_MethodArgValues expectedArguments, 21 | fflib_VerificationMode verificationMode) 22 | { 23 | List expectedMatchers = fflib_Match.Matching ? fflib_Match.getAndClearMatchers(expectedArguments.argValues.size()) : null; 24 | List actualArguments = fflib_MethodCountRecorder.getMethodArgumentsByTypeName().get(qm); 25 | 26 | Integer methodCount = getMethodCount(expectedArguments, expectedMatchers, actualArguments); 27 | 28 | String qualifier = ''; 29 | Integer expectedCount = null; 30 | 31 | if((verificationMode.VerifyMin == verificationMode.VerifyMax) && methodCount != verificationMode.VerifyMin) 32 | { 33 | expectedCount = verificationMode.VerifyMin; 34 | } 35 | else if (verificationMode.VerifyMin != null && verificationMode.VerifyMin > methodCount) 36 | { 37 | expectedCount = verificationMode.VerifyMin; 38 | qualifier = ' or more times'; 39 | } 40 | else if (verificationMode.VerifyMax != null && verificationMode.VerifyMax < methodCount) 41 | { 42 | expectedCount = verificationMode.VerifyMax; 43 | qualifier = ' or fewer times'; 44 | } 45 | 46 | if (expectedCount != null) 47 | { 48 | throwException(qm, '', expectedCount, qualifier, methodCount, verificationMode.CustomAssertMessage, expectedArguments, expectedMatchers, actualArguments); 49 | } 50 | } 51 | 52 | private Integer getMethodCount(fflib_MethodArgValues methodArg, List matchers, List methodArgs) 53 | { 54 | Integer retval = 0; 55 | 56 | if (methodArgs != null) 57 | { 58 | if (matchers != null) 59 | { 60 | for (fflib_MethodArgValues args : methodArgs) 61 | { 62 | if (fflib_Match.matchesAllArgs(args, matchers)) 63 | { 64 | capture(matchers); 65 | retval ++; 66 | } 67 | } 68 | } 69 | else 70 | { 71 | return countCalls(methodArgs, methodArg); 72 | } 73 | } 74 | 75 | return retval; 76 | } 77 | 78 | private Integer countCalls(List methodArgs, fflib_MethodArgValues methodArg) 79 | { 80 | Integer count = 0; 81 | 82 | for(fflib_MethodArgValues arg: methodArgs) 83 | { 84 | if( arg == methodArg) count++; 85 | } 86 | 87 | return count; 88 | } 89 | 90 | /* 91 | * Method that validate the verification mode used in the verify. 92 | * Not all the methods from the fflib_VerificationMode are implemented for the different classes that extends the fflib_MethodVerifier. 93 | * The error is thrown at run time, so this method is called in the method that actually performs the verify. 94 | * @param verificationMode The verification mode that have to been verified. 95 | * @throws Exception with message for the fflib_VerificationMode not implemented. 96 | */ 97 | protected override void validateMode(fflib_VerificationMode verificationMode) 98 | { 99 | if(verificationMode.Method == fflib_VerificationMode.ModeName.CALLS) 100 | { 101 | throw new fflib_ApexMocks.ApexMocksException( 102 | 'The calls() method is available only in the InOrder Verification.'); 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /ss_admin_console/main/default/lwc/ss_admin_console/ss_admin_console.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | #!groovy 2 | import groovy.json.JsonSlurperClassic 3 | node { 4 | 5 | def PROJECT_ALIAS='admin_console' 6 | def BUILD_NUMBER=env.BUILD_NUMBER 7 | def RUN_ARTIFACT_DIR="tests/${BUILD_NUMBER}" 8 | 9 | def USER_CRED_NAME_PREFIX = PROJECT_ALIAS + '_user_' 10 | def CLIENT_ID_CRED_NAME_PREFIX = PROJECT_ALIAS + '_client_id_' 11 | 12 | def JWT_KEY_FILE_CRED_NAME = PROJECT_ALIAS + '_jwt_key_file' 13 | 14 | def USER_CRED_NAME 15 | def CLIENT_ID_CRED_NAME 16 | 17 | def SFDC_HOST = 'https://login.salesforce.com' 18 | 19 | def toolbelt = tool 'toolbelt' 20 | 21 | stage('checkout source') { 22 | // when running in multi-branch job, one must issue this command 23 | checkout scm 24 | } 25 | 26 | echo 'CHANGE_ID ' + env.CHANGE_ID 27 | echo 'CHANGE_TARGET ' + env.CHANGE_TARGET 28 | echo 'BRANCH_NAME ' + env.BRANCH_NAME 29 | 30 | boolean isPrToMain = false; 31 | if (env.CHANGE_TARGET == null) { 32 | // commit to branch 33 | USER_CRED_NAME = USER_CRED_NAME_PREFIX + env.BRANCH_NAME 34 | CLIENT_ID_CRED_NAME = CLIENT_ID_CRED_NAME_PREFIX + env.BRANCH_NAME 35 | } else { 36 | // Pull request 37 | if (env.CHANGE_TARGET == 'master') { 38 | // Pull request to main 39 | USER_CRED_NAME = USER_CRED_NAME_PREFIX + 'master' 40 | CLIENT_ID_CRED_NAME = CLIENT_ID_CRED_NAME_PREFIX + 'master' 41 | isPrToMain = true 42 | } else { 43 | // Pull request not to main 44 | return; 45 | } 46 | } 47 | 48 | boolean isOrgRelatedBranch = stringCredentialsExist(USER_CRED_NAME) && stringCredentialsExist(CLIENT_ID_CRED_NAME) 49 | echo 'isOrgRelatedBranch ' + String.valueOf(isOrgRelatedBranch) 50 | 51 | if (!isOrgRelatedBranch) { 52 | return 53 | } 54 | 55 | def ORG_USERNAME 56 | def CONNECTED_APP_CONSUMER_KEY 57 | withCredentials([ 58 | string(credentialsId: USER_CRED_NAME, variable: 'USER'), 59 | string(credentialsId: CLIENT_ID_CRED_NAME, variable: 'KEY'), 60 | ]) { 61 | ORG_USERNAME = USER 62 | CONNECTED_APP_CONSUMER_KEY = KEY 63 | } 64 | echo 'USERNAME ' + ORG_USERNAME 65 | 66 | withCredentials([file(credentialsId: JWT_KEY_FILE_CRED_NAME, variable: 'jwt_key_file')]) { 67 | 68 | stage('Deploy To Org') { 69 | rc = sh returnStatus: true, script: "${toolbelt}/sfdx force:auth:jwt:grant --clientid ${CONNECTED_APP_CONSUMER_KEY} --username ${ORG_USERNAME} --jwtkeyfile ${jwt_key_file} --setdefaultusername --instanceurl ${SFDC_HOST}" 70 | if (rc != 0) { error 'hub org authorization failed' } 71 | 72 | if (isPrToMain) { 73 | rc = sh returnStatus: true, script: "${toolbelt}/sfdx force:source:deploy --checkonly --testlevel RunLocalTests -p \"3rd-party, ss_admin_console\"" 74 | if (rc != 0) { 75 | error 'Validation failed' 76 | } 77 | } else { 78 | rc = sh returnStatus: true, script: "${toolbelt}/sfdx force:source:deploy -p \"3rd-party, ss_admin_console\"" 79 | if (rc != 0) { 80 | error 'Deploy failed' 81 | } 82 | } 83 | } 84 | 85 | if (env.BRANCH_NAME == 'master') { 86 | stage('Run Apex Test') { 87 | sh "mkdir -p ${RUN_ARTIFACT_DIR}" 88 | timeout(time: 320, unit: 'SECONDS') { 89 | rc = sh returnStatus: true, script: "${toolbelt}/sfdx force:apex:test:run --testlevel RunLocalTests --outputdir ${RUN_ARTIFACT_DIR} --resultformat tap --targetusername ${ORG_USERNAME}" 90 | if (rc != 0) { 91 | error 'apex test run failed' 92 | } 93 | } 94 | } 95 | 96 | stage('collect results') { 97 | junit keepLongStdio: true, testResults: 'tests/**/*-junit.xml' 98 | } 99 | } 100 | } 101 | } 102 | 103 | boolean stringCredentialsExist(String id) { 104 | try { 105 | withCredentials([string(credentialsId: id, variable: 'irrelevant')]) { 106 | true 107 | } 108 | } catch (_) { 109 | false 110 | } 111 | } --------------------------------------------------------------------------------