I'm all in favor of this Marco... great work so far!
I was thinking we could have a closer tie between the carrier
information in the database, but as I think about it more it's better
to have them independent (and the entities related to the carrier are
structured as relationships anyway, so best left as they are).
Anyway, try as I might I'm having a hard time finding anything that
needs to be changed in these entity defs... if this is anything amiss
I hope someone else has better eyes on this than I do.
-David
On May 29, 2009, at 3:20 AM, [email protected] wrote:
Hi developers,
I'm near to complete the migration of payment gateways to use the
new payment gateway entities but I'm still waiting some test user
account for testing the new integrations in OFBiz (PCCharge,
ValueLink, ClearCommerce).
While I'm waiting to test it I'm thinking if we could extend this
job also to the shipment gateways and so I propose to add some new
entities/fields to move the shipment gateway config from
shipment.properties to the new entities.
We could add those entities :
<entity entity-name="ShipmentGatewayConfigType"
package-name="org.ofbiz.shipment.shipment"
title="Shipment Gateway Config Type">
<field name="shipmentGatewayConfigTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id"></field>
<field name="hasTable" type="indicator"></field>
<field name="description" type="description"></field>
<prim-key field="shipmentGatewayConfigTypeId"/>
<relation type="one" fk-name="SGCT_PAR" title="Parent" rel-
entity-name="ShipmentGatewayConfigType">
<key-map field-name="parentTypeId" rel-field-
name="shipmentGatewayConfigTypeId"/>
</relation>
<relation type="many" title="Sibling" rel-entity-
name="shipmentGatewayConfigTypeId">
<key-map field-name="parentTypeId"/>
</relation>
</entity>
<entity entity-name="ShipmentGatewayConfig"
package-name="org.ofbiz.shipment.shipment"
title="Shipment Gateway Config">
<field name="shipmentGatewayConfigId" type="id-ne"></field>
<field name="shipmentGatewayConfigTypeId" type="id-ne"></field>
<field name="description" type="description"></field>
<prim-key field="shipmentGatewayConfigId"/>
<relation type="one" fk-name="SGC_SGCT" rel-entity-
name="ShipmentGatewayConfigType">
<key-map field-name="shipmentGatewayConfigTypeId" rel-field-
name="shipmentGatewayConfigTypeId"/>
</relation>
</entity>
<entity entity-name="ShipmentGatewayUps"
package-name="org.ofbiz.shipment.shipment"
title="UPS Shipment Gateway Configuration">
<field name="shipmentGatewayConfigId" type="id-ne"></field>
<field name="connectUrl" type="value"><description>UPS
Connection URL</description></field>
<field name="connectTimeout"
type="numeric"><description>Timeout in seconds</description></field>
<field name="shipperNumber" type="value"><description>UPS
Shipper Number</description></field>
<field name="billShipperAccountNumber"
type="value"><description>UPS Bill Shipper Account Number</
description></field>
<field name="accessLicenseNumber" type="value"
encrypt="true"><description>UPS XPCI Access License Number</
description></field>
<field name="accessUserId" type="value"
encrypt="true"><description>UPS XPCI Access User ID</description></
field>
<field name="accessPassword" type="value"
encrypt="true"><description>UPS XPCI Access Password</description></
field>
<field name="saveCertInfo" type="short-
varchar"><description>Setting to save files needed for UPS
certification (true|false)</description></field>
<field name="saveCertPath" type="value"><description>UPS file
certificate path</description></field>
<field name="shipperPickupType" type="short-
varchar"><description>Shipper Default Pickup Type</description></
field>
<field name="maxEstimateWeight"
type="numeric"><description>Estimate split into packages</
description></field>
<field name="minEstimateWeight"
type="numeric"><description>Minimum weight for a package</
description></field>
<field name="codAllowCOD" type="value"><description>All
shipment package items are from orders which have been fully paid
via EXT_COD</description></field>
<field name="codSurchargeAmount" type="fixed-
point"><description>Surcharge amount</description></field>
<field name="surcharge.currencyUomId" type="short-
varchar"><description>Surcharge currency</description></field>
<field name="codSurchargeApplyToPackages" type="short-
varchar"><description>Surcharge amount will be applied to each
shipment package</description></field>
<field name="codFundsCode" type="short-
varchar"><description>The code that indicates the type of funds used
for the COD payment</description></field>
<prim-key field="shipmentGatewayConfigId"/>
<relation type="one" fk-name="SGUPS_SGC" rel-entity-
name="ShipmentGatewayConfig">
<key-map field-name="shipmentGatewayConfigId"/>
</relation>
</entity>
And add two new fields (shipmentCustomMethodId,
shipmentGatewayConfigId) on ProductStoreShipmentMeth entity in thiw
way :
<entity entity-name="ProductStoreShipmentMeth"
package-name="org.ofbiz.product.store"
title="Product Store Carrier Shipment Method Entity">
<field name="productStoreShipMethId" type="id-ne"></field>
<field name="productStoreId" type="id-ne"></field>
<field name="shipmentMethodTypeId" type="id-ne"></field>
<field name="partyId" type="id-ne"></field>
<field name="roleTypeId" type="id-ne"></field>
<field name="companyPartyId" type="id"></field>
<field name="minWeight" type="fixed-point"></field>
<field name="maxWeight" type="fixed-point"></field>
<field name="minSize" type="fixed-point"></field>
<field name="maxSize" type="fixed-point"></field>
<field name="minTotal" type="currency-amount"></field>
<field name="maxTotal" type="currency-amount"></field>
<field name="allowUspsAddr" type="indicator"></field>
<field name="requireUspsAddr" type="indicator"></field>
<field name="allowCompanyAddr" type="indicator"></field>
<field name="requireCompanyAddr" type="indicator"></field>
<field name="includeNoChargeItems" type="indicator"></field>
<field name="includeFeatureGroup" type="id"></field>
<field name="excludeFeatureGroup" type="id"></field>
<field name="includeGeoId" type="id"></field>
<field name="excludeGeoId" type="id"></field>
<field name="serviceName" type="long-varchar"></field>
<field name="configProps" type="long-varchar"></field>
<field name="shipmentCustomMethodId" type="id"></field>
<field name="shipmentGatewayConfigId" type="id"></field>
<field name="sequenceNumber" type="numeric"></field>
<prim-key field="productStoreShipMethId"/>
<relation type="one-nofk" rel-entity-name="Party">
<key-map field-name="companyPartyId" rel-field-name="partyId"/>
</relation>
<relation type="one-nofk" title="Include" rel-entity-name="Geo">
<key-map field-name="includeGeoId" rel-field-name="geoId"/>
</relation>
<relation type="one-nofk" title="Exclude" rel-entity-name="Geo">
<key-map field-name="excludeGeoId" rel-field-name="geoId"/>
</relation>
<relation type="one" fk-name="PRDS_SM_SGC" rel-entity-
name="ShipmentGatewayConfig">
<key-map field-name="shipmentGatewayConfigId"/>
</relation>
<relation type="one" fk-name="PRDS_SM_CUS_MET" rel-entity-
name="CustomMethod">
<key-map field-name="shipmentCustomMethodId" rel-field-
name="customMethodId"/>
</relation>
</entity>
Any tought on it will be very appreciate.
Thanks in advance
Marco