[jira] [Closed] (OFBIZ-7413) Enforce noninstantiability to ProductPromoWorker class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Closed] (OFBIZ-7413) Enforce noninstantiability to ProductPromoWorker class

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-7413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arun Patidar closed OFBIZ-7413.
-------------------------------
       Resolution: Fixed
    Fix Version/s: Upcoming Branch

Committed changes in trunk at rev: 1750354.

Thanks [~rishisolankii] and [~aman.mishra] for your contribution.

> Enforce noninstantiability to ProductPromoWorker class
> ------------------------------------------------------
>
>                 Key: OFBIZ-7413
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7413
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: order
>    Affects Versions: Trunk
>            Reporter: Rishi Solanki
>            Assignee: Arun Patidar
>            Priority: Minor
>             Fix For: Upcoming Branch
>
>         Attachments: OFBIZ-7413.patch
>
>
> - Make class as final.
> - Add a private constructor.
> - Make the following public static variables as private
> {code}
>     public static final String resource = "OrderUiLabels";
>     public static final String resource_error = "OrderErrorUiLabels";
>     public static final int decimals = UtilNumber.getBigDecimalScale("order.decimals");
>     public static final int rounding = UtilNumber.getBigDecimalRoundingMode("order.rounding");
>     public static final MathContext generalRounding = new MathContext(10);
> {code}
> - Make following methods protected static methods as private
> {code}
>     protected static boolean hasOrderTotalCondition()
>     protected static boolean runProductPromoRules()
>     protected static void runProductPromos()
>     protected static boolean checkCondition()
>     protected static boolean checkConditionsForItem()
>     protected static boolean checkConditionForItem()
>     protected static ActionResultInfo performAction(
>     protected static List<ShoppingCartItem> getCartItemsUsed()
>     protected static BigDecimal getCartItemsUsedTotalAmount()
>     protected static void distributeDiscountAmount()
>     protected static Integer findPromoItem()
>     protected static Integer findAdjustment()
>     protected static boolean isProductOld()
>     protected static void handleProductPromoCategories()
>     protected static void getAllProductIds()
>     protected static void handleProductPromoProducts()
> {code}
> - Make protected class as private;
> {code}
>     protected static class UseLimitException extends Exception
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)