diff --git a/.run/RunAllTest.run.xml b/.run/RunAllTest.run.xml
new file mode 100644
index 0000000..fce4f8f
--- /dev/null
+++ b/.run/RunAllTest.run.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBinding.cls b/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBinding.cls
index 5cc5f38..e88ae6c 100644
--- a/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBinding.cls
+++ b/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBinding.cls
@@ -37,6 +37,7 @@ public virtual class fflib_AppBinding
protected System.Type implementationType { get; set; }
protected System.Type interfaceType { get; set; }
protected String namespacePrefix { get; set; }
+ protected String packageName { get; set; }
protected fflib_SharingMode sharingMode { get; set; }
public Integer compareTo(Object compareTo)
@@ -89,6 +90,14 @@ public virtual class fflib_AppBinding
return this.namespacePrefix;
}
+ /**
+ * @return Returns the Application Package Name for the binding
+ */
+ public String getPackageName()
+ {
+ return this.packageName;
+ }
+
/**
* @return Returns the number of the order sequence in which the binding should be returned
*/
@@ -188,6 +197,19 @@ public virtual class fflib_AppBinding
return this;
}
+ /**
+ * Sets the Application Second Generation Package Name
+ *
+ * @param applicationPackageName The name of the 2GP package
+ *
+ * @return An instance of itself to enable method chaining
+ */
+ public fflib_IAppBinding setPackageName(String applicationPackageName)
+ {
+ this.packageName = applicationPackageName;
+ return this;
+ }
+
/**
* Set the order number so that the resolver can sort the bindings.
* The higher the number, the more priority.
diff --git a/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBindingMetaDataModule.cls b/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBindingMetaDataModule.cls
index 100dbab..ddb522e 100644
--- a/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBindingMetaDataModule.cls
+++ b/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBindingMetaDataModule.cls
@@ -43,6 +43,7 @@ public with sharing class fflib_AppBindingMetaDataModule
.setImplementationType(getSystemType(binding, fflib_AppBinding__mdt.ImplementationType__c))
.setInterfaceType(getSystemType(binding, fflib_AppBinding__mdt.InterfaceType__c))
.setNamespacePrefix(binding.NamespacePrefix)
+ .setPackageName(binding.ApplicationPackage__r.DeveloperName)
.setSequence(binding.BindingSequence__c)
.setSharingMode(getSharingModeFromString(binding.SharingMode__c))
);
diff --git a/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBindingResolver.cls b/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBindingResolver.cls
index 8d24fcf..406617b 100644
--- a/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBindingResolver.cls
+++ b/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBindingResolver.cls
@@ -132,6 +132,11 @@ public virtual class fflib_AppBindingResolver
return this;
}
+ public fflib_IAppBindingResolver byPackageName(String packageName)
+ {
+ this.bindingToResolve.setPackageName(packageName);
+ return this;
+ }
/**
* Handles lazy loading of modules, if no custom module is configured (via addModule) the default module is returned
diff --git a/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBindings.cls b/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBindings.cls
index 31abd24..7ff4053 100644
--- a/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBindings.cls
+++ b/sfdx-source/apex-extensions/main/application/dynamic/classes/fflib_AppBindings.cls
@@ -63,6 +63,67 @@ public virtual class fflib_AppBindings
}
}
+ public List getBindings()
+ {
+ return this.bindings;
+ }
+
+ public Map