ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Le Roux (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-9164) Refactor ContentWorkerInterface methods signatures
Date Thu, 12 Jan 2017 11:08:08 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-9164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15820750#comment-15820750
] 

Jacques Le Roux commented on OFBIZ-9164:
----------------------------------------

Thanks Deepak, I remember I had a look but I must say it was not deep enough.

This also shows the limit of static Java methods usage in Freemarker. It's all a manual thing,
when with an IDE refactoring Java is (almost) a bliss. Static Java methods usage in Freemarker
should not have been allowed at all (and yes I did my part :/)

Anyway I'll take care of that

> Refactor ContentWorkerInterface methods signatures
> --------------------------------------------------
>
>                 Key: OFBIZ-9164
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9164
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: content, framework, order, party, product, specialpurpose/lucene,
workeffort
>    Affects Versions: Trunk
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: Upcoming Release
>
>         Attachments: OFBIZ-9164 DataResourceWorker.java.patch, OFBIZ-9164.patch
>
>
> While working on OFBIZ-6919 which was built on R13.07 I stumbled upon an issue due to
r1652852 where Adrian improved the cacheKey in FormFactory.getFormFromLocation() by adding
a delegator reference (Tenants). Actually I'm not even sure it was done at r1652852 because
Adrian did not maintain the FormFactory svn history.
> Anyway, to make a long story short I had to introduce a DispatchContext parameter when
calling FormFactory.readFormDocument() when the code from R13.07 only passed a null.
> This had an impact in the hierarchy tree because FormFactory.readFormDocument() was called
in DataResourceWorker class, where the new code was called from renderDataResourceAsText().
So I instead of only passing a Delegator I decided to pass only a LocalDispatcher parameter
in renderDataResourceAsText(), since we can get the Delegator  from the LocalDispatcher. Doing
so it had an impact on the renderDataResourceAsText hierarchy tree ending in DataResourceWorkerInterface
and all related.
>  I finally decided to apply the same ["Change Method Signature" refactoring pattern|http://refactoring.com/catalog/addParameter.html]
to all cases related to ContentWorkerInterface. No need to pass a delegator when you have
LocalDispatcher!
> Here I attach a patch for review, I'll commit in few days



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

Mime
View raw message