You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@sandglass-software.com> on 2014/09/20 08:43:07 UTC
Re: svn commit: r1626385 - /ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
This doesn't fix the problem, it only hides it. If client code wants to
modify an immutable GenericValue, then it needs to copy it.
Adrian Crum
Sandglass Software
www.sandglass-software.com
On 9/20/2014 7:16 AM, ashish@apache.org wrote:
> Author: ashish
> Date: Sat Sep 20 06:16:29 2014
> New Revision: 1626385
>
> URL: http://svn.apache.org/r1626385
> Log:
> Applied patch from jira issue - OFBIZ-5739 - copyContentAndElectronicTextandAssoc service broken.
> Thanks Deepak Dixit for the contribution.
>
> Modified:
> ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
>
> Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml?rev=1626385&r1=1626384&r2=1626385&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml (original)
> +++ ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml Sat Sep 20 06:16:29 2014
> @@ -159,10 +159,7 @@
> </simple-method>
>
> <simple-method method-name="copyContentAndElectronicTextandAssoc" short-description="copy a content, electronic text and assocs and set status in progress">
> - <set-service-fields service-name="getContent" map="parameters" to-map="getC"/>
> - <call-service service-name="getContent" in-map-name="getC">
> - <result-to-field result-name="view" field="content"/>
> - </call-service>
> + <entity-one entity-name="Content" value-field="content"/>
> <if-not-empty field="content.dataResourceId">
> <set-service-fields service-name="getElectronicText" map="content" to-map="getEt"/>
> <call-service service-name="getElectronicText" in-map-name="getEt">
>
>
Re: svn commit: r1626385 - /ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
Posted by Ashish Vijaywargiya <vi...@gmail.com>.
Hello Adrian,
I have committed better fix in trunk at r1626402.
--
Kind Regards,
Ashish Vijaywargiya
On Sat, Sep 20, 2014 at 12:33 PM, Deepak Dixit <deepak.dixit@hotwaxmedia.com
> wrote:
> Thanks Adrian for review. New patch has been uploaded using clone-value
> tag to clone the immutable generic value.
>
> Thanks & Regards
> —
> Deepak Dixit
>
> On Sep 20, 2014, at 12:13 PM, Adrian Crum <
> adrian.crum@sandglass-software.com> wrote:
>
> > This doesn't fix the problem, it only hides it. If client code wants to
> modify an immutable GenericValue, then it needs to copy it.
> >
> > Adrian Crum
> > Sandglass Software
> > www.sandglass-software.com
> >
> > On 9/20/2014 7:16 AM, ashish@apache.org wrote:
> >> Author: ashish
> >> Date: Sat Sep 20 06:16:29 2014
> >> New Revision: 1626385
> >>
> >> URL: http://svn.apache.org/r1626385
> >> Log:
> >> Applied patch from jira issue - OFBIZ-5739 -
> copyContentAndElectronicTextandAssoc service broken.
> >> Thanks Deepak Dixit for the contribution.
> >>
> >> Modified:
> >>
> ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
> >>
> >> Modified:
> ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
> >> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml?rev=1626385&r1=1626384&r2=1626385&view=diff
> >>
> ==============================================================================
> >> ---
> ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
> (original)
> >> +++
> ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
> Sat Sep 20 06:16:29 2014
> >> @@ -159,10 +159,7 @@
> >> </simple-method>
> >>
> >> <simple-method method-name="copyContentAndElectronicTextandAssoc"
> short-description="copy a content, electronic text and assocs and set
> status in progress">
> >> - <set-service-fields service-name="getContent" map="parameters"
> to-map="getC"/>
> >> - <call-service service-name="getContent" in-map-name="getC">
> >> - <result-to-field result-name="view" field="content"/>
> >> - </call-service>
> >> + <entity-one entity-name="Content" value-field="content"/>
> >> <if-not-empty field="content.dataResourceId">
> >> <set-service-fields service-name="getElectronicText"
> map="content" to-map="getEt"/>
> >> <call-service service-name="getElectronicText"
> in-map-name="getEt">
> >>
> >>
>
>
Re: svn commit: r1626385 - /ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
Posted by Deepak Dixit <de...@hotwaxmedia.com>.
Thanks Adrian for review. New patch has been uploaded using clone-value tag to clone the immutable generic value.
Thanks & Regards
—
Deepak Dixit
On Sep 20, 2014, at 12:13 PM, Adrian Crum <ad...@sandglass-software.com> wrote:
> This doesn't fix the problem, it only hides it. If client code wants to modify an immutable GenericValue, then it needs to copy it.
>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
> On 9/20/2014 7:16 AM, ashish@apache.org wrote:
>> Author: ashish
>> Date: Sat Sep 20 06:16:29 2014
>> New Revision: 1626385
>>
>> URL: http://svn.apache.org/r1626385
>> Log:
>> Applied patch from jira issue - OFBIZ-5739 - copyContentAndElectronicTextandAssoc service broken.
>> Thanks Deepak Dixit for the contribution.
>>
>> Modified:
>> ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
>>
>> Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml?rev=1626385&r1=1626384&r2=1626385&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml (original)
>> +++ ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml Sat Sep 20 06:16:29 2014
>> @@ -159,10 +159,7 @@
>> </simple-method>
>>
>> <simple-method method-name="copyContentAndElectronicTextandAssoc" short-description="copy a content, electronic text and assocs and set status in progress">
>> - <set-service-fields service-name="getContent" map="parameters" to-map="getC"/>
>> - <call-service service-name="getContent" in-map-name="getC">
>> - <result-to-field result-name="view" field="content"/>
>> - </call-service>
>> + <entity-one entity-name="Content" value-field="content"/>
>> <if-not-empty field="content.dataResourceId">
>> <set-service-fields service-name="getElectronicText" map="content" to-map="getEt"/>
>> <call-service service-name="getElectronicText" in-map-name="getEt">
>>
>>