Class ShippingRuleLoader
java.lang.Object
control.ShippingRuleLoader
The ShippingRuleLoader class loads shipping rules from a JSON file and provides a method to retrieve them as a
list of
ShippingRule
objects.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List
<ShippingRule> loadCustomShippingRules
(String rules_json_path) Loads the shipping rules from the JSON file specified by the parameter.static List
<ShippingRule> Loads the shipping rules from the JSON file specified by the RULES_FILE constant.
-
Constructor Details
-
ShippingRuleLoader
public ShippingRuleLoader()
-
-
Method Details
-
loadCustomShippingRules
public static List<ShippingRule> loadCustomShippingRules(String rules_json_path) throws ShippingRuleException Loads the shipping rules from the JSON file specified by the parameter.- Parameters:
rules_json_path
- the path to the JSON file containing the shipping rules- Returns:
- a list of ShippingRule objects
- Throws:
ShippingRuleException
- if an error occurs while loading the shipping rules
-
loadShippingRules
Loads the shipping rules from the JSON file specified by the RULES_FILE constant.- Returns:
- a list of ShippingRule objects
- Throws:
ShippingRuleException
- if an error occurs while loading the shipping rules
-