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

Benjamin Jugl commented on OFBIZ-11383:
---------------------------------------

Hey Priya,

I did review your patch and intorduced some changes. Here is a nearly complete 
list of the changes I did:
 * Variable "module" should be defined in the class, so it scope includes all 
other methods that will be added in the future.
 * Variables should be declared with strong typing. This makes it more readable 
and better to maintain (if you do not use any types, the variables are written 
into the context object of the groovies "this". That is quite cumbersome to 
debug.
 * "createMain.dataResourceId" was declared twice, "createMain.assocTypeId" was 
not declared. "createMain.partyId" was not declared.
 * "createImage.contentNam" Typo, misses an "e"
 * "createImage._uploadedFile_contentType" missing entirely.
 * GroovyBaseScript.groovy provides a "run service" implementation. Not sure 
how the overall preferences are, but its sheer existence implies that it should 
be used...
 * Inserted some {} for inline if-clauses. They can be omitted but reduce 
readability
 * Inserted trinary Operator (? : ) where possible
 * Renamed variable "map" into "result"

 

> Convert createArticleContent service from mini-lang to groovy DSL
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-11383
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11383
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: content
>    Affects Versions: Trunk
>            Reporter: Devanshu Vyas
>            Assignee: Priya Sharma
>            Priority: Minor
>         Attachments: OFBIZ-11383.patch, OFBIZ-11383.patch
>
>
> Convert createArticleContent service code from mini-lang to groovy DSL.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to