You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/02/22 02:19:37 UTC
svn commit: r510337 - in /ofbiz/trunk/applications/content:
script/org/ofbiz/content/content/ script/org/ofbiz/content/data/
script/org/ofbiz/content/website/ servicedef/
Author: jaz
Date: Wed Feb 21 17:19:36 2007
New Revision: 510337
URL: http://svn.apache.org/viewvc?view=rev&rev=510337
Log:
fixed bugs/problems with internal services; missing map-name, added eca to ensure party role, fixed updat/createTextContent services to auto-update association as well
Modified:
ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml
ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml
ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml
ofbiz/trunk/applications/content/servicedef/secas.xml
ofbiz/trunk/applications/content/servicedef/services.xml
ofbiz/trunk/applications/content/servicedef/services_website.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?view=diff&rev=510337&r1=510336&r2=510337
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml Wed Feb 21 17:19:36 2007
@@ -91,7 +91,7 @@
</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"/>
- <set-nonpk-fields value-name="assoc"/>
+ <set-nonpk-fields value-name="assoc" map-name="parameters"/>
<now-timestamp-to-env env-name="nowTimestamp"/>
<set field="content.lastModifiedByUserLogin" from-field="userLogin.userLoginId"/>
Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml?view=diff&rev=510337&r1=510336&r2=510337
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml Wed Feb 21 17:19:36 2007
@@ -68,6 +68,7 @@
<set field="lookedUpValue.lastModifiedDate" from-field="nowTimestamp"/>
<store-value value-name="lookedUpValue"/>
+ <field-to-result field-name="dataResourceId" map-name="lookedUpValue"/>
</simple-method>
<simple-method method-name="deleteDataResource" short-description="Delete a Data Resource">
Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml?view=diff&rev=510337&r1=510336&r2=510337
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml Wed Feb 21 17:19:36 2007
@@ -65,7 +65,7 @@
<simple-method method-name="removeWebSiteContent" short-description="Remove WebSite Content">
<make-value value-name="lookupPKMap" entity-name="WebSiteContent"/>
<set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
- <find-by-primary-key entity-name="WebSiteContentType" map-name="lookupPKMap" value-name="lookedUpValue"/>
+ <find-by-primary-key entity-name="WebSiteContent" map-name="lookupPKMap" value-name="lookedUpValue"/>
<remove-value value-name="lookedUpValue"/>
</simple-method>
Modified: ofbiz/trunk/applications/content/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/secas.xml?view=diff&rev=510337&r1=510336&r2=510337
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/secas.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/secas.xml Wed Feb 21 17:19:36 2007
@@ -64,7 +64,12 @@
<set field-name="dataResourceTypeId" value="OTHER_OBJECT"/>
<action service="createDataResource" mode="sync" result-to-context="true"/>
</eca>
-
+
+ <!-- dataresource role ecas -->
+ <eca service="createDataResourceRole" event="invoke">
+ <action service="ensurePartyRole" mode="sync" runAsUser="system"/>
+ </eca>
+
<!-- electronic text; needs dataResourceId -->
<eca service="createElectronicText" event="in-validate">
<condition field-name="dataResourceId" operator="is-empty"/>
@@ -102,6 +107,25 @@
<condition field-name="contentAssocTypeId" operator="is-not-empty"/>
<condition field-name="contentIdFrom" operator="is-not-empty"/>
<action service="createContentAssoc" mode="sync" runAsUser="system"/>
+ </eca>
+
+ <!-- content role ecas -->
+ <eca service="createContentRole" event="invoke">
+ <action service="ensurePartyRole" mode="sync" runAsUser="system"/>
+ </eca>
+
+ <!-- update content ecas -->
+ <eca service="updateContent" event="commit">
+ <condition field-name="contentAssocTypeId" operator="is-not-empty"/>
+ <condition field-name="contentIdTo" operator="is-not-empty"/>
+ <condition field-name="fromDate" operator="is-not-empty"/>
+ <action service="updateContentAssoc" mode="sync" runAsUser="system"/>
+ </eca>
+ <eca service="updateContent" event="commit">
+ <condition field-name="contentAssocTypeId" operator="is-not-empty"/>
+ <condition field-name="contentIdFrom" operator="is-not-empty"/>
+ <condition field-name="fromDate" operator="is-not-empty"/>
+ <action service="updateContentAssoc" mode="sync" runAsUser="system"/>
</eca>
<!-- content assoc services -->
Modified: ofbiz/trunk/applications/content/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services.xml?view=diff&rev=510337&r1=510336&r2=510337
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services.xml Wed Feb 21 17:19:36 2007
@@ -131,6 +131,7 @@
<description>Update a Content</description>
<permission-service service-name="genericContentPermission" main-action="UPDATE"/>
<implements service="genericContentPermission"/>
+ <implements service="updateContentAssoc"/>
<auto-attributes entity-name="Content" include="pk" mode="INOUT" optional="false"/>
<auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
<!-- TODO: the following fields are depricated; but will not be removed until all services and callers are updated -->
@@ -262,7 +263,7 @@
<attribute mode="IN" name="skipPermissionCheck" optional="true" type="String"/>
<attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/>
<attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/>
- <attribute mode="INOUT" entity-name="ContentAssoc" name="contentIdFrom" optional="true" type="String"/>
+ <attribute mode="INOUT" name="contentIdFrom" optional="true" type="String"/>
<!-- end of deprecated fields -->
</service>
<service name="updateContentAssoc" default-entity-name="ContentAssoc" engine="simple" auth="true"
@@ -279,7 +280,7 @@
<attribute mode="IN" name="deactivateExisting" optional="true" type="String"/>
<attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/>
<attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/>
- <attribute mode="INOUT" entity-name="ContentAssoc" name="contentIdFrom" optional="true" type="String"/>
+ <attribute mode="INOUT" name="contentIdFrom" optional="true" type="String"/>
<!-- end of deprecated fields -->
</service>
<service name="removeContentAssoc" default-entity-name="ContentAssoc" engine="simple" auth="true"
@@ -293,7 +294,7 @@
<attribute mode="IN" name="contentPurposeList" optional="true" type="List"/>
<attribute mode="IN" name="skipPermissionCheck" optional="true" type="String"/>
<attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/>
- <attribute mode="INOUT" entity-name="ContentAssoc" name="contentIdFrom" optional="true" type="String"/>
+ <attribute mode="INOUT" name="contentIdFrom" optional="true" type="String"/>
<!-- end of deprecated fields -->
</service>
Modified: ofbiz/trunk/applications/content/servicedef/services_website.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_website.xml?view=diff&rev=510337&r1=510336&r2=510337
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services_website.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services_website.xml Wed Feb 21 17:19:36 2007
@@ -52,6 +52,7 @@
<permission-service service-name="contentManagerPermission" main-action="CREATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
+ <override name="fromDate" optional="true"/>
</service>
<service name="updateWebSiteContent" default-entity-name="WebSiteContent" engine="simple" auth="true"
location="org/ofbiz/content/website/WebSiteServices.xml" invoke="updateWebSiteContent">