svn commit: r1831511 - in /ofbiz/ofbiz-framework/trunk/applications/content: config/ContentUiLabels.xml minilang/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: r1831511 - in /ofbiz/ofbiz-framework/trunk/applications/content: config/ContentUiLabels.xml minilang/content/ContentServices.xml servicedef/services_content.xml

jleroux@apache.org
Author: jleroux
Date: Sun May 13 10:09:06 2018
New Revision: 1831511

URL: http://svn.apache.org/viewvc?rev=1831511&view=rev
Log:
Improved: Migrate createContent service from Minilang to  Entity Auto
(OFBIZ-10401)

Like Suraj did for createRequirement, this uses
  <override name="statusId" default-value="CTNT_IN_PROGRESS"/>
to replace the only thing specific in the Minilang implementation

Improves 2 related French labels


Thanks: Deepak for discussion and Suraj for initial idea

Modified:
    ofbiz/ofbiz-framework/trunk/applications/content/config/ContentUiLabels.xml
    ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml
    ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_content.xml

Modified: ofbiz/ofbiz-framework/trunk/applications/content/config/ContentUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/config/ContentUiLabels.xml?rev=1831511&r1=1831510&r2=1831511&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/config/ContentUiLabels.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/config/ContentUiLabels.xml Sun May 13 10:09:06 2018
@@ -3966,7 +3966,7 @@
         <value xml:lang="da">Indholds ID</value>
         <value xml:lang="de">Inhalt ID</value>
         <value xml:lang="en">Content ID</value>
-        <value xml:lang="fr">Contenu</value>
+        <value xml:lang="fr">Réf de contenu</value>
         <value xml:lang="it">Contenuto</value>
         <value xml:lang="ja">コンテンツID</value>
         <value xml:lang="nl">Content ID</value>
@@ -5292,7 +5292,7 @@
         <value xml:lang="de">Besitzer Inhalt ID</value>
         <value xml:lang="en">Owner Content ID</value>
         <value xml:lang="es">Código del propietario</value>
-        <value xml:lang="fr">Contenu propriétaire</value>
+        <value xml:lang="fr">Propriétaire du contenu </value>
         <value xml:lang="it">Proprietario Contenuto</value>
         <value xml:lang="ja">所有者コンテンツID</value>
         <value xml:lang="nl">Eigenaar content ID</value>

Modified: ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml?rev=1831511&r1=1831510&r2=1831511&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml Sun May 13 10:09:06 2018
@@ -22,35 +22,6 @@
         xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd">
 
     <!-- base content CRUD services -->
-    <simple-method method-name="createContent" short-description="Create a Content Record">
-        <make-value entity-name="Content" value-field="content"/>
-        <set-nonpk-fields map="parameters" value-field="content"/>
-        <set-pk-fields value-field="content" map="parameters"/>
-
-        <if-empty field="parameters.contentId">
-            <sequenced-id sequence-name="Content" field="content.contentId"/>
-        </if-empty>
-
-        <if-empty field="content.statusId">
-            <!-- get the first status item -->
-            <entity-and entity-name="StatusItem" list="contentStatus">
-                <field-map field-name="statusTypeId" value="CONTENT_STATUS"/>
-                <order-by field-name="sequenceId"/>
-            </entity-and>
-            <first-from-list list="contentStatus" entry="statusItem"/>
-            <set field="content.statusId" from-field="statusItem.statusId"/>
-        </if-empty>
-
-        <now-timestamp field="nowTimestamp"/>
-        <set field="content.lastModifiedByUserLogin" from-field="userLogin.userLoginId"/>
-        <set field="content.createdByUserLogin" from-field="userLogin.userLoginId"/>
-        <set field="content.lastModifiedDate" from-field="nowTimestamp"/>
-        <set field="content.createdDate" from-field="nowTimestamp"/>
-
-        <create-value value-field="content"/>
-
-        <field-to-result field="content.contentId" result-name="contentId"/>
-    </simple-method>
     <simple-method method-name="updateContent" short-description="Update a Content Record">
         <entity-one entity-name="Content" value-field="content" auto-field-map="true"/>
         <set-nonpk-fields map="parameters" value-field="content"/>

Modified: ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_content.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_content.xml?rev=1831511&r1=1831510&r2=1831511&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_content.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_content.xml Sun May 13 10:09:06 2018
@@ -23,11 +23,11 @@
     <vendor>OFBiz</vendor>
 
     <!-- create content services -->
-    <service name="createContent" engine="simple" auth="true"
-            location="component://content/minilang/content/ContentServices.xml" invoke="createContent">
+    <service name="createContent" default-entity-name="Content" engine="entity-auto" invoke="create" auth="true">
         <description>Create a Content</description>
         <permission-service service-name="genericContentPermission" main-action="CREATE"/>
-        <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="INOUT" optional="true"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <!-- TODO: the following fields are deprecated; but will not be removed until all services and callers are updated -->
         <attribute mode="IN" name="targetOperationList" optional="true" type="List"/>
         <attribute mode="IN" name="targetOperationString" optional="true" type="String"/>
@@ -37,17 +37,8 @@
         <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/>
         <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/>
         <!-- end of deprecated fields -->
-        <attribute name="contentPurposeTypeId" type="String" mode="IN" optional="true"/>
-        <attribute name="contentAssocTypeId" type="String" mode="IN" optional="true"/>
-        <attribute name="contentIdFrom" type="String" mode="IN" optional="true"/>
-        <attribute name="contentIdTo" type="String" mode="IN" optional="true"/>
-        <attribute name="roleTypeId" type="String" mode="IN" optional="true"/>
-        <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="INOUT" optional="true"/>
-        <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
         <override name="contentTypeId" default-value="DOCUMENT"/>
+        <override name="statusId" default-value="CTNT_IN_PROGRESS"/>
         <override name="contentName" allow-html="any"/>
         <override name="description" allow-html="any"/>
     </service>