Interface SupplierArchitect
public interface SupplierArchitect
Architect to configure
OfficeSupplier instances.-
Method Summary
Modifier and TypeMethodDescriptionaddSupplier(String supplierName, String supplierLocation, PropertyList properties) Adds a singleOfficeSupplierfrom a YAML configuration file.addSuppliers(String supplierDirectory, PropertyList properties) Adds allOfficeSupplierinstances from YAML files in a directory.
-
Method Details
-
addSupplier
OfficeSupplier addSupplier(String supplierName, String supplierLocation, PropertyList properties) throws Exception Adds a singleOfficeSupplierfrom a YAML configuration file.- Parameters:
supplierName- Name of the supplier.supplierLocation- Classpath resource path to the YAML configuration.properties-PropertyListfor interpolation.- Returns:
- Configured
OfficeSupplier. - Throws:
Exception- If fails to load.
-
addSuppliers
Map<String,OfficeSupplier> addSuppliers(String supplierDirectory, PropertyList properties) throws Exception Adds allOfficeSupplierinstances from YAML files in a directory.- Parameters:
supplierDirectory- Classpath directory path to scan for YAML files.properties-PropertyListfor interpolation.- Returns:
- Map of supplier name to
OfficeSupplier. - Throws:
Exception- If fails to load.
-