You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacopo Cappellato (JIRA)" <ji...@apache.org> on 2007/05/17 15:20:16 UTC

[jira] Created: (OFBIZ-992) Improvements to the CheckOutHelper class to enhance reusability

Improvements to the CheckOutHelper class to enhance reusability
---------------------------------------------------------------

                 Key: OFBIZ-992
                 URL: https://issues.apache.org/jira/browse/OFBIZ-992
             Project: OFBiz (The Open for Business Project)
          Issue Type: Improvement
            Reporter: Jacopo Cappellato
            Priority: Minor


In the CheckOutHelper class, all the methods that don't need the cart object (needed by the class' constructor) should be moved to another class or at least declared as static.

This is the list of the methods:

checkExternalPayment(...) uses the cart only to get the locale for messages
availableAccountBalance(...)
makeBillingAccountMap(...)

We should also refactor the following methods into services that don't require the cart to operate:
processPayment(...)
adjustFaceToFacePayment(...)

the reason is that they are used by the edit order screens (and ecas) and a cart must be loaded from the order before calling them.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-992) Improvements to the CheckOutHelper class to enhance reusability

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacopo Cappellato closed OFBIZ-992.
-----------------------------------

    Resolution: Fixed

I've refactored the payments methods to static methods that don't require a cart object (and this was the most urgent task).
Of course, the class could be further improved but as mentioned by David, this could be part of a wider refactoring effort.


> Improvements to the CheckOutHelper class to enhance reusability
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-992
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-992
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>            Reporter: Jacopo Cappellato
>            Priority: Minor
>
> In the CheckOutHelper class, all the methods that don't need the cart object (needed by the class' constructor) should be moved to another class or at least declared as static.
> This is the list of the methods:
> checkExternalPayment(...) uses the cart only to get the locale for messages
> availableAccountBalance(...)
> makeBillingAccountMap(...)
> We should also refactor the following methods into services that don't require the cart to operate:
> processPayment(...)
> adjustFaceToFacePayment(...)
> the reason is that they are used by the edit order screens (and ecas) and a cart must be loaded from the order before calling them.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-992) Improvements to the CheckOutHelper class to enhance reusability

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496578 ] 

David E. Jones commented on OFBIZ-992:
--------------------------------------

There has been a fair amount of talk about doing a lot of refactoring of the cart and related objects and cleaning up the fact that logic is split in so many ways that just don't make any sense (like similar stuff split between ShoppingCartEvents, ShoppingCartHelper, ShoppingCart, ShoppingCartLine, etc).

I think the CheckOutHelper stuff will eventually fall into that bigger effort, just an FYI (not that it really matters for this task).

> Improvements to the CheckOutHelper class to enhance reusability
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-992
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-992
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>            Reporter: Jacopo Cappellato
>            Priority: Minor
>
> In the CheckOutHelper class, all the methods that don't need the cart object (needed by the class' constructor) should be moved to another class or at least declared as static.
> This is the list of the methods:
> checkExternalPayment(...) uses the cart only to get the locale for messages
> availableAccountBalance(...)
> makeBillingAccountMap(...)
> We should also refactor the following methods into services that don't require the cart to operate:
> processPayment(...)
> adjustFaceToFacePayment(...)
> the reason is that they are used by the edit order screens (and ecas) and a cart must be loaded from the order before calling them.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.