svn commit: r1749532 - in /ofbiz/trunk/applications: accounting/servicedef/ content/servicedef/ marketing/servicedef/

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

svn commit: r1749532 - in /ofbiz/trunk/applications: accounting/servicedef/ content/servicedef/ marketing/servicedef/

pranayp
Author: pranayp
Date: Tue Jun 21 14:37:30 2016
New Revision: 1749532

URL: http://svn.apache.org/viewvc?rev=1749532&view=rev
Log:
[OFBIZ-7519] Updated optionality to required for attributes in entity auto services where pk fields were mentioned optional. It helps service engine to validate IN attributes and return error for missing ones.
 Cases considered for this update are:
 1. One PK: Takes new sequence if PK not passed.
 2. Two PK: Both PK should be mandatory except the case of secondary primary key (like agreementItemSeqId) where next subsequence is generated.
 3. More than two PK's, all PK's should be mandatory except the fromDate.
 Thanks Amardeep Singh Jhajj for the contribution.

Modified:
    ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml
    ofbiz/trunk/applications/content/servicedef/services.xml
    ofbiz/trunk/applications/content/servicedef/services_content.xml
    ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml
    ofbiz/trunk/applications/content/servicedef/services_data.xml
    ofbiz/trunk/applications/content/servicedef/services_survey.xml
    ofbiz/trunk/applications/marketing/servicedef/services_opportunity.xml

Modified: ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml?rev=1749532&r1=1749531&r2=1749532&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml Tue Jun 21 14:37:30 2016
@@ -60,21 +60,22 @@ under the License.
     <service name="createAgreementItem" default-entity-name="AgreementItem" engine="entity-auto" invoke="create" auth="true">
         <description>Create an AgreementItem</description>
         <permission-service service-name="acctgAgreementPermissionCheck" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="INOUT" optional="true"/>
+        <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <override name="agreementText" allow-html="any"/>
+        <override name="agreementItemSeqId" optional="true"></override>
     </service>
     <service name="updateAgreementItem" default-entity-name="AgreementItem" engine="entity-auto" invoke="update" auth="true">
         <description>Update an AgreementItem</description>
         <permission-service service-name="acctgAgreementPermissionCheck" main-action="UPDATE"/>
-        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <override name="agreementText" allow-html="any"/>
     </service>
     <service name="removeAgreementItem" default-entity-name="AgreementItem" engine="entity-auto" invoke="delete" auth="true">
         <description>Remove an AgreementItem</description>
         <permission-service service-name="acctgAgreementPermissionCheck" main-action="DELETE"/>
-        <auto-attributes include="pk" mode="INOUT" optional="true"/>
+        <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
 
@@ -108,14 +109,14 @@ under the License.
     <service name="updateAgreementTerm" default-entity-name="AgreementTerm" engine="entity-auto" invoke="update" auth="true">
         <description>Update an AgreementTerm</description>
         <permission-service service-name="acctgAgreementPermissionCheck" main-action="UPDATE"/>
-        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <override name="textValue" allow-html="any"/>
     </service>
     <service name="deleteAgreementTerm" default-entity-name="AgreementTerm" engine="entity-auto" invoke="delete" auth="true">
         <description>Delete an AgreementTerm</description>
         <permission-service service-name="acctgAgreementPermissionCheck" main-action="DELETE"/>
-        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
 

Modified: ofbiz/trunk/applications/content/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services.xml?rev=1749532&r1=1749531&r2=1749532&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services.xml Tue Jun 21 14:37:30 2016
@@ -105,7 +105,7 @@
     <service name="createDataResourceAttribute" engine="entity-auto" default-entity-name="DataResourceAttribute" auth="true" invoke="create">
         <description>Create a DataResourceAttribute</description>
         <permission-service service-name="genericDataResourcePermission" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateDataResourceAttribute" engine="entity-auto" default-entity-name="DataResourceAttribute" auth="true" invoke="update">

Modified: ofbiz/trunk/applications/content/servicedef/services_content.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_content.xml?rev=1749532&r1=1749531&r2=1749532&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services_content.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services_content.xml Tue Jun 21 14:37:30 2016
@@ -344,7 +344,7 @@
     <service name="createContentMetaData" engine="entity-auto" default-entity-name="ContentMetaData" auth="true" invoke="create">
         <description>Create a ContentMetaData</description>
         <permission-service service-name="genericContentPermission" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateContentMetaData" engine="entity-auto" default-entity-name="ContentMetaData" auth="true" invoke="update">
@@ -382,7 +382,7 @@
     <service name="createContentPurpose" engine="entity-auto" default-entity-name="ContentPurpose" auth="true" invoke="create">
         <description>Create a ContentPurpose</description>
         <permission-service service-name="contentManagerPermission" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateContentPurpose" engine="entity-auto" default-entity-name="ContentPurpose" auth="true" invoke="update">
@@ -409,7 +409,7 @@
     <service name="createContentPurposeOperation" engine="entity-auto" default-entity-name="ContentPurposeOperation" auth="true" invoke="create">
         <description>Create a ContentPurposeOperation</description>
         <permission-service service-name="contentManagerPermission" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateContentPurposeOperation" engine="entity-auto" default-entity-name="ContentPurposeOperation" auth="true" invoke="update">
@@ -428,7 +428,7 @@
     <service name="createContentAttribute" engine="entity-auto" default-entity-name="ContentAttribute" auth="true" invoke="create">
         <description>Create a ContentAttribute</description>
         <permission-service service-name="genericContentPermission" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateContentAttribute" engine="entity-auto" default-entity-name="ContentAttribute" auth="true" invoke="update">
@@ -504,7 +504,7 @@
     <service name="createContentRevisionItem" engine="entity-auto" default-entity-name="ContentRevisionItem" auth="true" invoke="create">
         <description>Create a ContentRevisionItem</description>
         <permission-service service-name="genericContentPermission" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateContentRevisionItem" engine="entity-auto" default-entity-name="ContentRevisionItem" auth="true" invoke="update">

Modified: ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml?rev=1749532&r1=1749531&r2=1749532&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml Tue Jun 21 14:37:30 2016
@@ -65,9 +65,8 @@ under the License.
     <service name="createContentTypeAttr" engine="entity-auto" default-entity-name="ContentTypeAttr" auth="true" invoke="create">
         <description>Create a ContentTypeAttr</description>
         <permission-service service-name="contentManagerPermission" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
-        <override name="attrName" optional="false"/>
     </service>
     <service name="removeContentTypeAttr" engine="entity-auto" default-entity-name="ContentTypeAttr" auth="true" invoke="delete">
         <description>Remove ContentTypeAttr</description>

Modified: ofbiz/trunk/applications/content/servicedef/services_data.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_data.xml?rev=1749532&r1=1749531&r2=1749532&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services_data.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services_data.xml Tue Jun 21 14:37:30 2016
@@ -214,7 +214,7 @@
     <service name="createDataResourceMetaData" engine="entity-auto" default-entity-name="DataResourceMetaData" auth="true" invoke="create">
         <description>Create an DataResourceMetaData</description>
         <permission-service service-name="genericDataResourcePermission" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="INOUT" optional="true"/>
+        <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateDataResourceMetaData" engine="entity-auto" default-entity-name="DataResourceMetaData" auth="true" invoke="update">

Modified: ofbiz/trunk/applications/content/servicedef/services_survey.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_survey.xml?rev=1749532&r1=1749531&r2=1749532&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services_survey.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services_survey.xml Tue Jun 21 14:37:30 2016
@@ -236,8 +236,9 @@ under the License.
     <service name="createSurveyTrigger" default-entity-name="SurveyTrigger" auth="true" engine="entity-auto" invoke="create">
         <description>Create a SurveyTrigger</description>
         <permission-service service-name="contentManagerPermission" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
+        <override name="fromDate" optional="true"/>
     </service>
     <service name="updateSurveyTrigger" default-entity-name="SurveyTrigger" auth="true" engine="entity-auto" invoke="update">
         <description>Update a SurveyTrigger</description>

Modified: ofbiz/trunk/applications/marketing/servicedef/services_opportunity.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/servicedef/services_opportunity.xml?rev=1749532&r1=1749531&r2=1749532&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/servicedef/services_opportunity.xml (original)
+++ ofbiz/trunk/applications/marketing/servicedef/services_opportunity.xml Tue Jun 21 14:37:30 2016
@@ -88,7 +88,7 @@ under the License.
     </service>
     <service name="createSalesOpportunityRole" default-entity-name="SalesOpportunityRole" engine="entity-auto" invoke="create">
         <description>Create sales opportunity role</description>
-        <auto-attributes mode="IN" include="pk" optional="true"/>
+        <auto-attributes mode="IN" include="pk" optional="false"/>
     </service>
     <service name="createSalesOpportunityAccountRole" engine="simple" default-entity-name="SalesOpportunityRole"
         location="component://order/minilang/opportunity/OpportunityServices.xml" invoke="createSalesOpportunityAccountRole">