[ofbiz-plugins] branch trunk updated: Improved: Added all the service level error messages for missing required field for plugins/ebay component. (OFBIZ-7471)

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

[ofbiz-plugins] branch trunk updated: Improved: Added all the service level error messages for missing required field for plugins/ebay component. (OFBIZ-7471)

surajk
This is an automated email from the ASF dual-hosted git repository.

surajk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
     new b678615  Improved: Added all the service level error messages for missing required field for plugins/ebay component. (OFBIZ-7471)
b678615 is described below

commit b678615904fe9983ae510bcb6e5672cee54ee288
Author: Suraj Khurana <[hidden email]>
AuthorDate: Mon Mar 2 12:56:13 2020 +0530

    Improved: Added all the service level error messages for missing required field for plugins/ebay component.
    (OFBIZ-7471)
   
    Thanks Jagpreet for reporting and Anushi Gupta for the patch.
---
 ebay/config/EbayUiLabels.xml |  40 +++++++++++
 ebay/servicedef/services.xml | 163 +++++++++++++++++++++++++++++++++++++------
 2 files changed, 182 insertions(+), 21 deletions(-)

diff --git a/ebay/config/EbayUiLabels.xml b/ebay/config/EbayUiLabels.xml
index 0d2bd80..53e91b5 100644
--- a/ebay/config/EbayUiLabels.xml
+++ b/ebay/config/EbayUiLabels.xml
@@ -136,6 +136,45 @@
         <value xml:lang="zh">导入单个交易</value>
         <value xml:lang="zh-TW">匯入單個交易</value>
     </property>
+    <property key="EbayRequiredFieldMissingCountry">
+        <value xml:lang="en">Required Field is missing : Country</value>
+    </property>
+    <property key="EbayRequiredFieldMissingCreatedDate">
+        <value xml:lang="en">Required Field is missing : Created Date</value>
+    </property>
+    <property key="EbayRequiredFieldMissingExternalId">
+        <value xml:lang="en">Required Field is missing : External Id</value>
+    </property>
+    <property key="EbayRequiredFieldMissingFromDate">
+        <value xml:lang="en">Required Field is missing : From Date</value>
+    </property>
+    <property key="EbayRequiredFieldMissingListingDuration">
+        <value xml:lang="en">Required Field is missing : Listing Duration</value>
+    </property>
+    <property key="EbayRequiredFieldMissingProductStoreId">
+        <value xml:lang="en">Required Field is missing : Product Store Id</value>
+    </property>
+    <property key="EbayRequiredFieldMissingQuantityPurchased">
+        <value xml:lang="en">Required Field is missing : Quantity Purchased</value>
+    </property>
+    <property key="EbayRequiredFieldMissingSelectResult">
+        <value xml:lang="en">Product is missing</value>
+    </property>
+    <property key="EbayRequiredFieldMissingShipmentMethodName">
+        <value xml:lang="en">Required Field is missing : Shipment Method Name</value>
+    </property>
+    <property key="EbayRequiredFieldMissingThruDate">
+        <value xml:lang="en">Required Field is missing : Thru Date</value>
+    </property>
+    <property key="EbayRequiredFieldMissingTransactionId">
+        <value xml:lang="en">Required Field is missing : Transaction Id</value>
+    </property>
+    <property key="EbayRequiredFieldMissingTransactionPrice">
+        <value xml:lang="en">Required Field is missing : Transaction Price</value>
+    </property>
+    <property key="EbayRequiredFieldMissingWebSiteUrl">
+        <value xml:lang="en">Required Field is missing : Web Site Url</value>
+    </property>
     <property key="EbayShippingMethodConfigurations">
         <value xml:lang="en">Shipping Method Configurations</value>
         <value xml:lang="it">Configurazioni metodi di spedizione</value>
@@ -689,4 +728,5 @@
         <value xml:lang="zh">产品明细被正确发送到了eBay</value>
         <value xml:lang="zh-TW">產品細項被正確發送到了eBay</value>
     </property>
+
 </resource>
diff --git a/ebay/servicedef/services.xml b/ebay/servicedef/services.xml
index 2f6c3a0..f0915b1 100644
--- a/ebay/servicedef/services.xml
+++ b/ebay/servicedef/services.xml
@@ -28,10 +28,22 @@ under the License.
     <service name="exportToEbay" engine="java"
              location="org.apache.ofbiz.ebay.ProductsExportToEbay" invoke="exportToEbay" auth="true">
         <description>Export products to eBay</description>
-        <attribute type="List" mode="IN" name="selectResult" optional="false"/>
-        <attribute type="String" mode="IN" name="country" optional="false"/>
+        <attribute type="List" mode="IN" name="selectResult" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingSelectResult"/>
+            </type-validate>
+        </attribute>
+        <attribute type="String" mode="IN" name="country" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingCountry"/>
+            </type-validate>
+        </attribute>
         <attribute type="String" mode="IN" name="location" optional="true"/>
-        <attribute type="String" mode="IN" name="webSiteUrl" optional="false"/>
+        <attribute type="String" mode="IN" name="webSiteUrl" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingWebSiteUrl"/>
+            </type-validate>
+        </attribute>
         <attribute type="String" mode="IN" name="ebayCategory" optional="true"/>
         <attribute type="String" mode="IN" name="paymentPayPal" optional="true"/>
         <attribute type="String" mode="IN" name="paymentVisaMC" optional="true"/>
@@ -46,7 +58,11 @@ under the License.
         <attribute type="String" mode="IN" name="paymentMoneyXferAccepted" optional="true"/>
         <attribute type="String" mode="IN" name="paymentPersonalCheck" optional="true"/>
         <attribute type="String" mode="IN" name="payPalEmail" optional="true"/>
-        <attribute type="String" mode="IN" name="listingDuration" optional="false"/>
+        <attribute type="String" mode="IN" name="listingDuration" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingListingDuration"/>
+            </type-validate>
+        </attribute>
         <attribute type="String" mode="IN" name="startPrice" optional="true"/>
         <attribute type="String" mode="IN" name="quantity" optional="true"/>
         <attribute type="String" mode="IN" name="productStoreId" optional="true"/>
@@ -64,22 +80,58 @@ under the License.
     <service name="importOrdersSearchFromEbay" engine="java" transaction-timeout="300"
              location="org.apache.ofbiz.ebay.ImportOrdersFromEbay" invoke="importOrdersSearchFromEbay" auth="true">
         <description>Import Orders Search from eBay</description>
-        <attribute type="String" mode="IN" name="productStoreId" optional="false"/>
-        <attribute type="String" mode="IN" name="fromDate" optional="false"/>
-        <attribute type="String" mode="IN" name="thruDate" optional="false"/>
+        <attribute type="String" mode="IN" name="productStoreId" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingProductStoreId"/>
+            </type-validate>
+        </attribute>
+        <attribute type="String" mode="IN" name="fromDate" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingFromDate"/>
+            </type-validate>
+        </attribute>
+        <attribute type="String" mode="IN" name="thruDate" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingThruDate"/>
+            </type-validate>
+        </attribute>
         <attribute type="List" mode="OUT" name="orderList" optional="true"/>
     </service>
 
     <service name="importOrderFromEbay" engine="java" transaction-timeout="300"
              location="org.apache.ofbiz.ebay.ImportOrdersFromEbay" invoke="importOrderFromEbay" auth="true">
         <description>Import Order from eBay</description>
-        <attribute type="String" mode="IN" name="productStoreId" optional="false"/>
-        <attribute type="String" mode="IN" name="externalId" optional="false"/>
-        <attribute type="String" mode="IN" name="transactionId" optional="false"/>
-        <attribute type="String" mode="IN" name="createdDate" optional="false"/>
+        <attribute type="String" mode="IN" name="productStoreId" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingProductStoreId"/>
+            </type-validate>
+        </attribute>
+        <attribute type="String" mode="IN" name="externalId" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingExternalId"/>
+            </type-validate>
+        </attribute>
+        <attribute type="String" mode="IN" name="transactionId" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingTransactionId"/>
+            </type-validate>
+        </attribute>
+        <attribute type="String" mode="IN" name="createdDate" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingCreatedDate"/>
+            </type-validate>
+        </attribute>
         <attribute type="String" mode="IN" name="productId" optional="true"/>
-        <attribute type="String" mode="IN" name="quantityPurchased" optional="false"/>
-        <attribute type="String" mode="IN" name="transactionPrice" optional="false"/>
+        <attribute type="String" mode="IN" name="quantityPurchased" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingQuantityPurchased"/>
+            </type-validate>
+        </attribute>
+        <attribute type="String" mode="IN" name="transactionPrice" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingTransactionPrice"/>
+            </type-validate>
+        </attribute>
         <attribute type="String" mode="IN" name="shippingService" optional="true"/>
         <attribute type="String" mode="IN" name="shippingServiceCost" optional="true"/>
         <attribute type="String" mode="IN" name="shippingTotalAdditionalCost" optional="true"/>
@@ -114,54 +166,123 @@ under the License.
     <service name="getEbayOrders" engine="java" transaction-timeout="300"
              location="org.apache.ofbiz.ebay.EbayOrderServices" invoke="getEbayOrders" auth="true">
         <description>Get Orders from eBay</description>
-        <attribute name="productStoreId" type="String" mode="IN" optional="false"/>
-        <attribute name="fromDate" type="String" mode="IN" optional="false"/>
-        <attribute name="thruDate" type="String" mode="IN" optional="false"/>
+        <attribute name="productStoreId" type="String" mode="IN" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingProductStoreId"/>
+            </type-validate>
+        </attribute>
+        <attribute name="fromDate" type="String" mode="IN" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingFromDate"/>
+            </type-validate>
+        </attribute>
+        <attribute name="thruDate" type="String" mode="IN" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingthruDate"/>
+            </type-validate>
+        </attribute>
         <attribute name="orderList" type="List" mode="OUT" optional="true"/>
     </service>
     
     <service name="importEbayOrders" engine="java" transaction-timeout="7200"
              location="org.apache.ofbiz.ebay.EbayOrderServices" invoke="importEbayOrders" auth="true">
         <description>Import Order from eBay</description>
-        <attribute name="productStoreId" type="String" mode="IN" optional="false"/>
-        <attribute name="externalId" type="String" mode="IN" optional="false"/>
+        <attribute name="productStoreId" type="String" mode="IN" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingProductStoreId"/>
+            </type-validate>
+        </attribute>
+        <attribute name="externalId" type="String" mode="IN" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingExternalId"/>
+            </type-validate>
+        </attribute>
         <attribute name="emailBuyer" type="String" mode="IN" optional="true"/>
         <attribute name="amountPaid" type="String" mode="IN" optional="true"/>                
-        <attribute name="createdDate" type="String" mode="IN" optional="false"/>
+        <attribute name="createdDate" type="String" mode="IN" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingCreatedDate"/>
+            </type-validate>
+        </attribute>
         <attribute name="paidTime" type="String" mode="IN" optional="true"/>
         <attribute name="shippedTime" type="String" mode="IN" optional="true"/>
         <attribute name="ebayUserIdBuyer" type="String" mode="IN" optional="true"/>
         <attribute name="orderList" type="List" mode="IN" optional="true"/>
     </service>
-    
+
     <service name="createEbayConfiguration" default-entity-name="EbayConfig" engine="entity-auto" invoke="create" auth="true">
         <description>Create a EbayConfiguration</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true" allow-html="any"/>
+        <override name="productStoreId" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingProductStoreId"/>
+            </type-validate>
+        </override>
     </service>
     <service name="updateEbayConfiguration" default-entity-name="EbayConfig" engine="entity-auto" invoke="update" auth="true">
         <description>Update a EbayConfiguration</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true" allow-html="any"/>
+        <override name="productStoreId" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingProductStoreId"/>
+            </type-validate>
+        </override>
     </service>
     <service name="deleteEbayConfiguration" default-entity-name="EbayConfig" engine="entity-auto" invoke="delete" auth="true">
         <description>Delete a EbayConfiguration</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
+        <override name="productStoreId" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingProductStoreId"/>
+            </type-validate>
+        </override>
     </service>
     
     <service name="createEbayShippingMethod" default-entity-name="EbayShippingMethod" engine="entity-auto" invoke="create" auth="true">
         <description>Create a EbayShippingMethod</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
+        <override name="productStoreId" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingProductStoreId"/>
+            </type-validate>
+        </override>
+        <override name="shipmentMethodName" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingShipmentMethodName"/>
+            </type-validate>
+        </override>
     </service>
     <service name="updateEbayShippingMethod" default-entity-name="EbayShippingMethod" engine="entity-auto" invoke="update" auth="true">
         <description>Update a EbayShippingMethod</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
+        <override name="productStoreId" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingProductStoreId"/>
+            </type-validate>
+        </override>
+        <override name="shipmentMethodName" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingShipmentMethodName"/>
+            </type-validate>
+        </override>
     </service>
     <service name="deleteEbayShippingMethod" default-entity-name="EbayShippingMethod" engine="entity-auto" invoke="delete" auth="true">
         <description>Delete a EbayShippingMethod</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
+        <override name="productStoreId" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingProductStoreId"/>
+            </type-validate>
+        </override>
+        <override name="shipmentMethodName" optional="false">
+            <type-validate>
+                <fail-property resource="EbayUiLabels" property="EbayRequiredFieldMissingShipmentMethodName"/>
+            </type-validate>
+        </override>
     </service>
-    
+
 </services>