svn commit: r418893 - in /incubator/ofbiz/trunk/applications: content/entitydef/ content/script/org/ofbiz/content/ content/servicedef/ content/src/org/ofbiz/content/ order/servicedef/ product/entitydef/ product/script/org/ofbiz/product/subscription/ pr...

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

svn commit: r418893 - in /incubator/ofbiz/trunk/applications: content/entitydef/ content/script/org/ofbiz/content/ content/servicedef/ content/src/org/ofbiz/content/ order/servicedef/ product/entitydef/ product/script/org/ofbiz/product/subscription/ pr...

jonesde
Author: jonesde
Date: Mon Jul  3 18:32:06 2006
New Revision: 418893

URL: http://svn.apache.org/viewvc?rev=418893&view=rev
Log:
Moved content.subscription stuff to product.subscription, since it really is more generic and extends the product model rather than being part of the content stuff; note that also resolved the issue with the old updateSubscription service name, which is not very descriptive: changed to updateContentSubscription so that the updateSubscription name can be used where it should be: for the Subscription entity

Added:
    incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/subscription/
    incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/subscription/SubscriptionServices.xml
      - copied unchanged from r418877, incubator/ofbiz/trunk/applications/content/script/org/ofbiz/content/SubscriptionServices.xml
    incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml
      - copied, changed from r418877, incubator/ofbiz/trunk/applications/content/servicedef/services_subscription.xml
Removed:
    incubator/ofbiz/trunk/applications/content/script/org/ofbiz/content/SubscriptionServices.xml
    incubator/ofbiz/trunk/applications/content/servicedef/services_subscription.xml
Modified:
    incubator/ofbiz/trunk/applications/content/entitydef/entitymodel.xml
    incubator/ofbiz/trunk/applications/content/servicedef/services.xml
    incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
    incubator/ofbiz/trunk/applications/order/servicedef/secas.xml
    incubator/ofbiz/trunk/applications/product/entitydef/entitymodel.xml

Modified: incubator/ofbiz/trunk/applications/content/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/content/entitydef/entitymodel.xml?rev=418893&r1=418892&r2=418893&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/content/entitydef/entitymodel.xml (original)
+++ incubator/ofbiz/trunk/applications/content/entitydef/entitymodel.xml Mon Jul  3 18:32:06 2006
@@ -43,11 +43,10 @@
   <!--  - org.ofbiz.content.data -->
   <!--  - org.ofbiz.content.document -->
   <!--  - org.ofbiz.content.preference -->
-  <!--  - org.ofbiz.content.subscription -->
   <!--  - org.ofbiz.content.survey -->
   <!-- ========================================================= -->
 
- <!-- ========================================================= -->
+  <!-- ========================================================= -->
   <!-- org.ofbiz.content.commevent -->
   <!-- ========================================================= -->
    <entity entity-name="CommEventContentAssoc"
@@ -1070,163 +1069,6 @@
       </relation>
       <relation type="one" fk-name="WEB_PREF_PARTY" rel-entity-name="Party">
         <key-map field-name="partyId"/>
-      </relation>
-    </entity>
-
-  <!-- ========================================================= -->
-  <!-- org.ofbiz.content.subscription -->
-  <!-- ========================================================= -->
-
-    <entity entity-name="Subscription" package-name="org.ofbiz.content.subscription" title="Subscription Entity">
-      <field name="subscriptionId" type="id-ne"></field>
-      <field name="subscriptionResourceId" type="id"></field>
-      <field name="communicationEventId" type="id"></field>
-      <field name="contactMechId" type="id"></field>
-      <field name="originatedFromPartyId" type="id"></field>
-      <field name="originatedFromRoleTypeId" type="id"></field>
-      <field name="partyId" type="id"></field>
-      <field name="roleTypeId" type="id"></field>
-      <field name="partyNeedId" type="id"></field>
-      <field name="needTypeId" type="id"></field>
-      <field name="orderId" type="id"></field>
-      <field name="orderItemSeqId" type="id"></field>
-      <field name="productId" type="id"></field>
-      <field name="productCategoryId" type="id"></field>
-      <field name="subscriptionTypeId" type="id"></field>
-      <field name="externalSubscriptionId" type="id"></field>
-      <field name="fromDate" type="date-time"></field>
-      <field name="thruDate" type="date-time"></field>
-      <prim-key field="subscriptionId"/>
-      <relation type="one" fk-name="SUBSC_SRESRC" rel-entity-name="SubscriptionResource">
-        <key-map field-name="subscriptionResourceId"/>
-      </relation>
-      <relation type="one" fk-name="SUBSC_COM_EVENT" rel-entity-name="CommunicationEvent">
-        <key-map field-name="communicationEventId"/>
-      </relation>
-      <relation type="one" fk-name="SUBSC_CONT_MECH" rel-entity-name="ContactMech">
-        <key-map field-name="contactMechId"/>
-      </relation>
-      <relation type="one" fk-name="SUBSC_PARTY" rel-entity-name="Party">
-        <key-map field-name="partyId"/>
-      </relation>
-      <relation type="one" fk-name="SUBSC_ROLE_TYPE" rel-entity-name="RoleType">
-        <key-map field-name="roleTypeId"/>
-      </relation>
-      <relation type="one-nofk" rel-entity-name="PartyRole">
-        <key-map field-name="partyId"/>
-        <key-map field-name="roleTypeId"/>
-      </relation>
-      <relation type="one" fk-name="SUBSC_OPARTY" title="OriginatedFrom" rel-entity-name="Party">
-        <key-map field-name="originatedFromPartyId" rel-field-name="partyId"/>
-      </relation>
-      <relation type="one" fk-name="SUBSC_OROLE_TYPE" title="OriginatedFrom" rel-entity-name="RoleType">
-        <key-map field-name="originatedFromRoleTypeId" rel-field-name="roleTypeId"/>
-      </relation>
-      <relation type="one-nofk" title="OriginatedFrom" rel-entity-name="PartyRole">
-        <key-map field-name="originatedFromPartyId" rel-field-name="partyId"/>
-        <key-map field-name="originatedFromRoleTypeId" rel-field-name="roleTypeId"/>
-      </relation>
-      <relation type="one-nofk" rel-entity-name="PartyNeed">
-        <description>No foreign key because we want to optionally be able to have a partyId without the other fields.</description>
-        <key-map field-name="partyNeedId"/>
-        <key-map field-name="partyId"/>
-        <key-map field-name="roleTypeId"/>
-      </relation>
-      <relation type="one" fk-name="SUBSC_NEED_TYPE" rel-entity-name="NeedType">
-        <key-map field-name="needTypeId"/>
-      </relation>
-      <relation type="one-nofk" rel-entity-name="OrderHeader">
-        <description>Note that foreign key not needed because there is an fk for OrderItem.</description>
-        <key-map field-name="orderId"/>
-      </relation>
-      <relation type="one" fk-name="SUBSC_ORDERITM" rel-entity-name="OrderItem">
-        <key-map field-name="orderId"/>
-        <key-map field-name="orderItemSeqId"/>
-      </relation>
-      <relation type="one" fk-name="SUBSC_PRODUCT" rel-entity-name="Product">
-        <key-map field-name="productId"/>
-      </relation>
-      <relation type="one" fk-name="SUBSC_PROD_CAT" rel-entity-name="ProductCategory">
-        <key-map field-name="productCategoryId"/>
-      </relation>
-      <relation type="one" fk-name="SUBSC_TO_TYPE" rel-entity-name="SubscriptionType">
-        <key-map field-name="subscriptionTypeId"/>
-      </relation>
-      <relation type="many" rel-entity-name="SubscriptionTypeAttr">
-        <key-map field-name="subscriptionTypeId"/>
-      </relation>
-    </entity>
-    <entity entity-name="SubscriptionActivity" package-name="org.ofbiz.content.subscription" title="Subscription Activity Entity">
-      <field name="subscriptionActivityId" type="id-ne"></field>
-      <field name="comments" type="comment"></field>
-      <field name="dateSent" type="date-time"></field>
-      <prim-key field="subscriptionActivityId"/>
-    </entity>
-    <entity entity-name="SubscriptionAttribute" package-name="org.ofbiz.content.subscription" title="Subscription Attribute Entity">
-      <field name="subscriptionId" type="id-ne"></field>
-      <field name="attrName" type="id-long-ne"></field>
-      <field name="attrValue" type="value"></field>
-      <prim-key field="subscriptionId"/>
-      <prim-key field="attrName"/>
-      <relation type="one" fk-name="SUBSC_ATTR" rel-entity-name="Subscription">
-        <key-map field-name="subscriptionId"/>
-      </relation>
-      <relation type="many" rel-entity-name="SubscriptionTypeAttr">
-        <key-map field-name="attrName"/>
-      </relation>
-    </entity>
-    <entity entity-name="SubscriptionFulfillmentPiece" package-name="org.ofbiz.content.subscription" title="Subscription Fulfillment Piece Entity">
-      <field name="subscriptionActivityId" type="id-ne"></field>
-      <field name="subscriptionId" type="id-ne"></field>
-      <prim-key field="subscriptionActivityId"/>
-      <prim-key field="subscriptionId"/>
-      <relation type="one" fk-name="SUBSC_FP" rel-entity-name="Subscription">
-        <key-map field-name="subscriptionId"/>
-      </relation>
-      <relation type="one" fk-name="SUBSC_FP_ACT" rel-entity-name="SubscriptionActivity">
-        <key-map field-name="subscriptionActivityId"/>
-      </relation>
-    </entity>
-    <entity entity-name="SubscriptionResource" package-name="org.ofbiz.content.subscription" title="Subscription Resource Entity">
-        <field name="subscriptionResourceId" type="id-ne"></field>
-        <field name="parentResourceId" type="id"></field>
-        <field name="description" type="description"></field>
-        <field name="contentId" type="id"><description>Optional (use if applicable) ID of a Content record that this would represent a subscription to.</description></field>
-        <field name="webSiteId" type="id"><description>Optional (use if applicable) ID of a WebSite record that this would represent a subscription to.</description></field>
-        <prim-key field="subscriptionResourceId"/>
-        <relation type="one" fk-name="SUBSC_RES_PARENT" title="Parent" rel-entity-name="SubscriptionResource">
-            <key-map field-name="parentResourceId" rel-field-name="subscriptionResourceId"/>
-        </relation>
-        <relation type="one" fk-name="SUBSC_RES_CNTNT" rel-entity-name="Content">
-            <key-map field-name="contentId"/>
-        </relation>
-        <relation type="one" fk-name="SUBSC_RES_WBSITE" rel-entity-name="WebSite">
-            <key-map field-name="webSiteId"/>
-        </relation>
-    </entity>
-    <entity entity-name="SubscriptionType" package-name="org.ofbiz.content.subscription" title="Subscription Type Entity">
-      <field name="subscriptionTypeId" 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="subscriptionTypeId"/>
-      <relation type="one" fk-name="SUBSC_TYPE_PARENT" title="Parent" rel-entity-name="SubscriptionType">
-        <key-map field-name="parentTypeId" rel-field-name="subscriptionTypeId"/>
-      </relation>
-    </entity>
-    <entity entity-name="SubscriptionTypeAttr" package-name="org.ofbiz.content.subscription" title="Subscription Type Attribute Entity">
-      <field name="subscriptionTypeId" type="id-ne"></field>
-      <field name="attrName" type="id-long-ne"></field>
-      <prim-key field="subscriptionTypeId"/>
-      <prim-key field="attrName"/>
-      <relation type="one" fk-name="SUBSC_TYPE_ATTR" rel-entity-name="SubscriptionType">
-        <key-map field-name="subscriptionTypeId"/>
-      </relation>
-      <relation type="many" rel-entity-name="SubscriptionAttribute">
-        <key-map field-name="attrName"/>
-      </relation>
-      <relation type="many" rel-entity-name="Subscription">
-        <key-map field-name="subscriptionTypeId"/>
       </relation>
     </entity>
 

Modified: incubator/ofbiz/trunk/applications/content/servicedef/services.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/content/servicedef/services.xml?rev=418893&r1=418892&r2=418893&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/content/servicedef/services.xml (original)
+++ incubator/ofbiz/trunk/applications/content/servicedef/services.xml Mon Jul  3 18:32:06 2006
@@ -1131,8 +1131,8 @@
         <attribute name="dataResourceId" type="String" mode="IN" optional="false"/>
         <attribute name="imageData" type="org.ofbiz.entity.util.ByteWrapper" mode="IN" optional="false"/>
     </service>
-    <service name="updateSubscription" engine="java" transaction-timeout="72000" auth="true"
-            location="org.ofbiz.content.ContentManagementServices" invoke="updateSubscription">
+    <service name="updateContentSubscription" engine="java" transaction-timeout="72000" auth="true"
+        location="org.ofbiz.content.ContentManagementServices" invoke="updateContentSubscription">
         <description>Creates or updates ContentRole</description>
         <attribute name="partyId" type="String" mode="IN" optional="false"/>
         <attribute name="contentId" type="String" mode="IN" optional="true"/>
@@ -1140,16 +1140,16 @@
         <attribute name="useTimeUomId" type="String" mode="IN" optional="false"/>
         <attribute name="useTime" type="Integer" mode="IN" optional="false"/>
     </service>
-    <service name="updateSubscriptionByProduct" engine="java" transaction-timeout="72000" auth="true"
-            location="org.ofbiz.content.ContentManagementServices" invoke="updateSubscriptionByProduct">
+    <service name="updateContentSubscriptionByProduct" engine="java" transaction-timeout="72000" auth="true"
+        location="org.ofbiz.content.ContentManagementServices" invoke="updateContentSubscriptionByProduct">
         <description>Creates or updates ContentRole</description>
         <attribute name="partyId" type="String" mode="IN" optional="false"/>
         <attribute name="productId" type="String" mode="IN" optional="false"/>
         <attribute name="orderCreatedDate" type="Timestamp" mode="IN" optional="true" />
         <attribute name="quantity" type="Integer" mode="IN" optional="false"/>
     </service>
-    <service name="updateSubscriptionByOrder" engine="java" transaction-timeout="72000" auth="true"
-            location="org.ofbiz.content.ContentManagementServices" invoke="updateSubscriptionByOrder">
+    <service name="updateContentSubscriptionByOrder" engine="java" transaction-timeout="72000" auth="true"
+        location="org.ofbiz.content.ContentManagementServices" invoke="updateContentSubscriptionByOrder">
         <description>Creates or updates ContentRole</description>
         <attribute name="orderId" type="String" mode="IN" optional="false"/>
     </service>

Modified: incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=418893&r1=418892&r2=418893&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original)
+++ incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Mon Jul  3 18:32:06 2006
@@ -1447,7 +1447,7 @@
         return result;
     }
     
-    public static Map updateSubscription(DispatchContext dctx, Map context) throws GenericServiceException{
+    public static Map updateContentSubscription(DispatchContext dctx, Map context) throws GenericServiceException{
         Map result = new HashMap();
         GenericDelegator delegator = dctx.getDelegator();
         LocalDispatcher dispatcher = dctx.getDispatcher();
@@ -1526,7 +1526,7 @@
         return result;
     }
     
-    public static Map updateSubscriptionByProduct(DispatchContext dctx, Map context) throws GenericServiceException{
+    public static Map updateContentSubscriptionByProduct(DispatchContext dctx, Map context) throws GenericServiceException{
         Map result = new HashMap();
         GenericDelegator delegator = dctx.getDelegator();
         LocalDispatcher dispatcher = dctx.getDispatcher();
@@ -1566,19 +1566,19 @@
         context.put("useTimeUomId", productContent.get("useTimeUomId"));
         context.put("useRoleTypeId", productContent.get("useRoleTypeId"));
         context.put("contentId", productContent.get("contentId"));
-        ModelService subscriptionModel = dispatcher.getDispatchContext().getModelService("updateSubscription");
+        ModelService subscriptionModel = dispatcher.getDispatchContext().getModelService("updateContentSubscription");
         Map ctx = subscriptionModel.makeValid(context, "IN");
-        result = dispatcher.runSync("updateSubscription", ctx);
+        result = dispatcher.runSync("updateContentSubscription", ctx);
         return result;
     }
     
-    public static Map updateSubscriptionByOrder(DispatchContext dctx, Map context) throws GenericServiceException{
+    public static Map updateContentSubscriptionByOrder(DispatchContext dctx, Map context) throws GenericServiceException{
         Map result = new HashMap();
         GenericDelegator delegator = dctx.getDelegator();
         LocalDispatcher dispatcher = dctx.getDispatcher();
         String orderId = (String) context.get("orderId");
         
-        Debug.logInfo("In updateSubscriptionByOrder service with orderId: " + orderId, module);
+        Debug.logInfo("In updateContentSubscriptionByOrder service with orderId: " + orderId, module);
         
         GenericValue orderHeader = null;
         try {
@@ -1603,7 +1603,7 @@
             context.put("orderCreatedDate", orderCreatedDate);
             List orderItemList = orderHeader.getRelated("OrderItem");
             Iterator orderItemIter = orderItemList.iterator();
-                ModelService subscriptionModel = dispatcher.getDispatchContext().getModelService("updateSubscriptionByProduct");
+                ModelService subscriptionModel = dispatcher.getDispatchContext().getModelService("updateContentSubscriptionByProduct");
             while (orderItemIter.hasNext()) {
                 GenericValue orderItem = (GenericValue)orderItemIter.next();  
                 Double qty = (Double) orderItem.get("quantity");
@@ -1614,7 +1614,7 @@
                     context.put("productId", productId);
                     context.put("quantity", new Integer(qty.intValue()));
                     Map ctx = subscriptionModel.makeValid(context, "IN");
-                    Map thisResult = dispatcher.runSync("updateSubscriptionByProduct", ctx);  
+                    Map thisResult = dispatcher.runSync("updateContentSubscriptionByProduct", ctx);  
                 }
             }
         } catch(GenericEntityException e) {

Modified: incubator/ofbiz/trunk/applications/order/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/servicedef/secas.xml?rev=418893&r1=418892&r2=418893&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/order/servicedef/secas.xml (original)
+++ incubator/ofbiz/trunk/applications/order/servicedef/secas.xml Mon Jul  3 18:32:06 2006
@@ -76,7 +76,7 @@
         <condition field-name="statusId" operator="equals" value="ORDER_APPROVED"/>
         <condition field-name="orderTypeId" operator="equals" value="SALES_ORDER"/>
         <condition-field field-name="statusId" operator="not-equals" to-field-name="oldStatusId"/>
-        <action service="updateSubscriptionByOrder" mode="sync"/>
+        <action service="updateContentSubscriptionByOrder" mode="sync"/>
     </eca>
 
     <!-- create adjustment change -->

Modified: incubator/ofbiz/trunk/applications/product/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=418893&r1=418892&r2=418893&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
+++ incubator/ofbiz/trunk/applications/product/entitydef/entitymodel.xml Mon Jul  3 18:32:06 2006
@@ -51,6 +51,7 @@
     <!--  - org.ofbiz.product.promo -->
     <!--  - org.ofbiz.product.storage -->
     <!--  - org.ofbiz.product.store -->
+    <!--  - org.ofbiz.product.subscription -->
     <!--  - org.ofbiz.product.supplier -->
     <!-- ========================================================= -->
 
@@ -3587,9 +3588,166 @@
       </relation>
     </entity>
 
-  <!-- ========================================================= -->
-  <!-- org.ofbiz.product.supplier -->
-  <!-- ========================================================= -->
+    <!-- ========================================================= -->
+    <!-- org.ofbiz.product.subscription -->
+    <!-- ========================================================= -->
+    
+    <entity entity-name="Subscription" package-name="org.ofbiz.product.subscription" title="Subscription Entity">
+        <field name="subscriptionId" type="id-ne"></field>
+        <field name="subscriptionResourceId" type="id"></field>
+        <field name="communicationEventId" type="id"></field>
+        <field name="contactMechId" type="id"></field>
+        <field name="originatedFromPartyId" type="id"></field>
+        <field name="originatedFromRoleTypeId" type="id"></field>
+        <field name="partyId" type="id"></field>
+        <field name="roleTypeId" type="id"></field>
+        <field name="partyNeedId" type="id"></field>
+        <field name="needTypeId" type="id"></field>
+        <field name="orderId" type="id"></field>
+        <field name="orderItemSeqId" type="id"></field>
+        <field name="productId" type="id"></field>
+        <field name="productCategoryId" type="id"></field>
+        <field name="subscriptionTypeId" type="id"></field>
+        <field name="externalSubscriptionId" type="id"></field>
+        <field name="fromDate" type="date-time"></field>
+        <field name="thruDate" type="date-time"></field>
+        <prim-key field="subscriptionId"/>
+        <relation type="one" fk-name="SUBSC_SRESRC" rel-entity-name="SubscriptionResource">
+            <key-map field-name="subscriptionResourceId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_COM_EVENT" rel-entity-name="CommunicationEvent">
+            <key-map field-name="communicationEventId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_CONT_MECH" rel-entity-name="ContactMech">
+            <key-map field-name="contactMechId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_PARTY" rel-entity-name="Party">
+            <key-map field-name="partyId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_ROLE_TYPE" rel-entity-name="RoleType">
+            <key-map field-name="roleTypeId"/>
+        </relation>
+        <relation type="one-nofk" rel-entity-name="PartyRole">
+            <key-map field-name="partyId"/>
+            <key-map field-name="roleTypeId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_OPARTY" title="OriginatedFrom" rel-entity-name="Party">
+            <key-map field-name="originatedFromPartyId" rel-field-name="partyId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_OROLE_TYPE" title="OriginatedFrom" rel-entity-name="RoleType">
+            <key-map field-name="originatedFromRoleTypeId" rel-field-name="roleTypeId"/>
+        </relation>
+        <relation type="one-nofk" title="OriginatedFrom" rel-entity-name="PartyRole">
+            <key-map field-name="originatedFromPartyId" rel-field-name="partyId"/>
+            <key-map field-name="originatedFromRoleTypeId" rel-field-name="roleTypeId"/>
+        </relation>
+        <relation type="one-nofk" rel-entity-name="PartyNeed">
+            <description>No foreign key because we want to optionally be able to have a partyId without the other fields.</description>
+            <key-map field-name="partyNeedId"/>
+            <key-map field-name="partyId"/>
+            <key-map field-name="roleTypeId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_NEED_TYPE" rel-entity-name="NeedType">
+            <key-map field-name="needTypeId"/>
+        </relation>
+        <relation type="one-nofk" rel-entity-name="OrderHeader">
+            <description>Note that foreign key not needed because there is an fk for OrderItem.</description>
+            <key-map field-name="orderId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_ORDERITM" rel-entity-name="OrderItem">
+            <key-map field-name="orderId"/>
+            <key-map field-name="orderItemSeqId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_PRODUCT" rel-entity-name="Product">
+            <key-map field-name="productId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_PROD_CAT" rel-entity-name="ProductCategory">
+            <key-map field-name="productCategoryId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_TO_TYPE" rel-entity-name="SubscriptionType">
+            <key-map field-name="subscriptionTypeId"/>
+        </relation>
+        <relation type="many" rel-entity-name="SubscriptionTypeAttr">
+            <key-map field-name="subscriptionTypeId"/>
+        </relation>
+    </entity>
+    <entity entity-name="SubscriptionActivity" package-name="org.ofbiz.product.subscription" title="Subscription Activity Entity">
+        <field name="subscriptionActivityId" type="id-ne"></field>
+        <field name="comments" type="comment"></field>
+        <field name="dateSent" type="date-time"></field>
+        <prim-key field="subscriptionActivityId"/>
+    </entity>
+    <entity entity-name="SubscriptionAttribute" package-name="org.ofbiz.product.subscription" title="Subscription Attribute Entity">
+        <field name="subscriptionId" type="id-ne"></field>
+        <field name="attrName" type="id-long-ne"></field>
+        <field name="attrValue" type="value"></field>
+        <prim-key field="subscriptionId"/>
+        <prim-key field="attrName"/>
+        <relation type="one" fk-name="SUBSC_ATTR" rel-entity-name="Subscription">
+            <key-map field-name="subscriptionId"/>
+        </relation>
+        <relation type="many" rel-entity-name="SubscriptionTypeAttr">
+            <key-map field-name="attrName"/>
+        </relation>
+    </entity>
+    <entity entity-name="SubscriptionFulfillmentPiece" package-name="org.ofbiz.product.subscription" title="Subscription Fulfillment Piece Entity">
+        <field name="subscriptionActivityId" type="id-ne"></field>
+        <field name="subscriptionId" type="id-ne"></field>
+        <prim-key field="subscriptionActivityId"/>
+        <prim-key field="subscriptionId"/>
+        <relation type="one" fk-name="SUBSC_FP" rel-entity-name="Subscription">
+            <key-map field-name="subscriptionId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_FP_ACT" rel-entity-name="SubscriptionActivity">
+            <key-map field-name="subscriptionActivityId"/>
+        </relation>
+    </entity>
+    <entity entity-name="SubscriptionResource" package-name="org.ofbiz.product.subscription" title="Subscription Resource Entity">
+        <field name="subscriptionResourceId" type="id-ne"></field>
+        <field name="parentResourceId" type="id"></field>
+        <field name="description" type="description"></field>
+        <field name="contentId" type="id"><description>Optional (use if applicable) ID of a Content record that this would represent a subscription to.</description></field>
+        <field name="webSiteId" type="id"><description>Optional (use if applicable) ID of a WebSite record that this would represent a subscription to.</description></field>
+        <prim-key field="subscriptionResourceId"/>
+        <relation type="one" fk-name="SUBSC_RES_PARENT" title="Parent" rel-entity-name="SubscriptionResource">
+            <key-map field-name="parentResourceId" rel-field-name="subscriptionResourceId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_RES_CNTNT" rel-entity-name="Content">
+            <key-map field-name="contentId"/>
+        </relation>
+        <relation type="one" fk-name="SUBSC_RES_WBSITE" rel-entity-name="WebSite">
+            <key-map field-name="webSiteId"/>
+        </relation>
+    </entity>
+    <entity entity-name="SubscriptionType" package-name="org.ofbiz.product.subscription" title="Subscription Type Entity">
+        <field name="subscriptionTypeId" 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="subscriptionTypeId"/>
+        <relation type="one" fk-name="SUBSC_TYPE_PARENT" title="Parent" rel-entity-name="SubscriptionType">
+            <key-map field-name="parentTypeId" rel-field-name="subscriptionTypeId"/>
+        </relation>
+    </entity>
+    <entity entity-name="SubscriptionTypeAttr" package-name="org.ofbiz.product.subscription" title="Subscription Type Attribute Entity">
+        <field name="subscriptionTypeId" type="id-ne"></field>
+        <field name="attrName" type="id-long-ne"></field>
+        <prim-key field="subscriptionTypeId"/>
+        <prim-key field="attrName"/>
+        <relation type="one" fk-name="SUBSC_TYPE_ATTR" rel-entity-name="SubscriptionType">
+            <key-map field-name="subscriptionTypeId"/>
+        </relation>
+        <relation type="many" rel-entity-name="SubscriptionAttribute">
+            <key-map field-name="attrName"/>
+        </relation>
+        <relation type="many" rel-entity-name="Subscription">
+            <key-map field-name="subscriptionTypeId"/>
+        </relation>
+    </entity>
+
+    <!-- ========================================================= -->
+    <!-- org.ofbiz.product.supplier -->
+    <!-- ========================================================= -->
 
     <entity entity-name="MarketInterest"
             package-name="org.ofbiz.product.supplier"

Copied: incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml (from r418877, incubator/ofbiz/trunk/applications/content/servicedef/services_subscription.xml)
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml?p2=incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml&p1=incubator/ofbiz/trunk/applications/content/servicedef/services_subscription.xml&r1=418877&r2=418893&rev=418893&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/content/servicedef/services_subscription.xml (original)
+++ incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml Mon Jul  3 18:32:06 2006
@@ -1,35 +1,35 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    $Id: $
-    
-    Copyright 2001-2006 The Apache Software Foundation
-    
-    Licensed under the Apache License, Version 2.0 (the "License"); you may not
-    use this file except in compliance with the License. You may obtain a copy of
-    the License at
-    
-    http://www.apache.org/licenses/LICENSE-2.0
-    
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-    License for the specific language governing permissions and limitations
-    under the License.
+$Id: $
+
+Copyright 2001-2006 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations
+under the License.
 -->
 
 <services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/services.xsd">
-    <description>Content Component Services for subscriptions entity (subscription entity not ContentRoles)</description>
+    <description>Product Component Services for subscriptions entity (subscription entity not ContentRoles)</description>
     <vendor>OFBiz</vendor>
     
-    <service name="createSubscriptionEnt" default-entity-name="Subscription" auth="true" engine="simple"
+    <service name="createSubscription" default-entity-name="Subscription" auth="true" engine="simple"
         location="org/ofbiz/content/SubscriptionServices.xml" invoke="createSubscription">
         <description>Create a Subscription Entity record</description>
         <auto-attributes include="pk" mode="INOUT" optional="true"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     
-    <service name="updateSubscriptionEnt" default-entity-name="Subscription" auth="true" engine="simple"
+    <service name="updateSubscription" default-entity-name="Subscription" auth="true" engine="simple"
         location="org/ofbiz/content/SubscriptionServices.xml" invoke="updateSubscription">
         <description>Update a Subscription Entity Record</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
@@ -52,4 +52,4 @@
         <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <attribute name="subscription" type="GenericValue" mode="OUT" optional="true"/>
     </service>
-</services>        
\ No newline at end of file
+</services>