svn commit: r571052 - in /ofbiz/trunk/applications/content: script/org/ofbiz/content/content/ContentServices.xml servicedef/services_content.xml

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

svn commit: r571052 - in /ofbiz/trunk/applications/content: script/org/ofbiz/content/content/ContentServices.xml servicedef/services_content.xml

byersa-3
Author: byersa
Date: Wed Aug 29 23:46:10 2007
New Revision: 571052

URL: http://svn.apache.org/viewvc?rev=571052&view=rev
Log:
I was troubled by the fact that createTextContent did not return the fromDate - making it difficult to get a primary
key for the newly created content.
I made changes so that createContentAssoc would return "fromDate", but that did not help "createContent" because it was an eca
and I did not want to specify a "result-map-name" attribute.
So I modified createContent so that it would accept a fromDate as input, so at least I can know what the fromDate value is by
setting it to nowTimestamp before calling createContent.

Modified:
    ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
    ofbiz/trunk/applications/content/servicedef/services_content.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=571052&r1=571051&r2=571052&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 Wed Aug 29 23:46:10 2007
@@ -88,6 +88,8 @@
         <set field="assoc.createdDate" from-field="nowTimestamp"/>
 
         <create-value value-name="assoc"/>
+        <log level="info" message="assoc: ${assoc}"/>
+        <field-to-result field-name="assoc.fromDate" result-name="fromDate"/>
     </simple-method>
     <simple-method method-name="updateContentAssoc" short-description="Update a ContentAssoc Record">
         <entity-one entity-name="ContentAssoc" value-name="assoc" auto-field-map="true"/>

Modified: ofbiz/trunk/applications/content/servicedef/services_content.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_content.xml?rev=571052&r1=571051&r2=571052&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services_content.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services_content.xml Wed Aug 29 23:46:10 2007
@@ -46,7 +46,9 @@
         <attribute name="partyId" type="String" mode="IN" optional="true"/>
         <attribute name="mapKey" type="String" mode="IN" optional="true"/>
         <attribute name="contentId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
         <override name="contentTypeId" default-value="DOCUMENT"/>
+        
     </service>
 
     <service name="createTextContent" engine="group" auth="true">
@@ -241,6 +243,7 @@
         <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/>
         <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/>
         <attribute mode="INOUT" name="contentIdFrom" optional="true" type="String"/>
+        <override name="fromDate" mode="INOUT"/>
         <!-- end of deprecated fields -->
     </service>
     <service name="updateContentAssoc" default-entity-name="ContentAssoc" engine="simple" auth="true"