svn commit: r418907 - in /incubator/ofbiz/trunk/applications: content/config/ product/config/ product/script/org/ofbiz/product/subscription/ product/servicedef/

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

svn commit: r418907 - in /incubator/ofbiz/trunk/applications: content/config/ product/config/ product/script/org/ofbiz/product/subscription/ product/servicedef/

jonesde
Author: jonesde
Date: Mon Jul  3 20:34:15 2006
New Revision: 418907

URL: http://svn.apache.org/viewvc?rev=418907&view=rev
Log:
Finished moving subscription stuff over to product (err msg property, service location, etc); also added SubscriptionResource create/update service

Modified:
    incubator/ofbiz/trunk/applications/content/config/ContentUiLabels.properties
    incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties
    incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/subscription/SubscriptionServices.xml
    incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml

Modified: incubator/ofbiz/trunk/applications/content/config/ContentUiLabels.properties
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/content/config/ContentUiLabels.properties?rev=418907&r1=418906&r2=418907&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/content/config/ContentUiLabels.properties (original)
+++ incubator/ofbiz/trunk/applications/content/config/ContentUiLabels.properties Mon Jul  3 20:34:15 2006
@@ -140,8 +140,6 @@
 SurveyWithQuestion=W/Question
 SurveyWithOption=W/Option
 
-SubscriptionPermissionError=You do not have permission to run this service. ("CONTENTMGR_VIEW" or "CONTENTMGR_ADMIN" needed)
-
 FormFieldTitle_webSiteId=Web Site Id
 FormFieldTitle_siteName=Site Name
 FormFieldTitle_productStoreId=Product Store Id

Modified: incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?rev=418907&r1=418906&r2=418907&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original)
+++ incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties Mon Jul  3 20:34:15 2006
@@ -23,6 +23,9 @@
 # For more informations (french) : http://www.les7arts.com/assist/infos.html
 ####################################################################################################################################
 
+
+GeneralCatalogPermissionError=You do not have permission to run ${methodShortDescription}. ("CATALOG${securityAction}" or "CATALOG_ADMIN" needed)
+
 AccountingBillingAcc=Billing Accounts
 AccountingFixedAsset=Fixed Asset
 AccountingFixedAssetId=Asset Id
@@ -1282,6 +1285,7 @@
 SelectableFeatures=Selectable Features
 ShippingDimensionsAndWeights=Shipping Dimensions and Weights:
 StandardFeatures=Standard Features
+
 UpdateCategories=Update Categories
 UpdateName=Update Name
 UpdateShipping=Update Shipping

Modified: incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/subscription/SubscriptionServices.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/subscription/SubscriptionServices.xml?rev=418907&r1=418906&r2=418907&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/subscription/SubscriptionServices.xml (original)
+++ incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/subscription/SubscriptionServices.xml Mon Jul  3 20:34:15 2006
@@ -1,27 +1,27 @@
 <?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.
 -->
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/simple-methods.xsd">
     
     <simple-method method-name="createSubscription" short-description="create a Subscription">
         <set value="_CREATE" field="securityAction"/>
-        <check-permission permission="CONTENTMGR" action="${securityAction}"><fail-property resource="ContentUiLabels" property="SubscriptionPermissionError"/></check-permission>
+        <check-permission permission="CATALOG" action="${securityAction}"><fail-property resource="ProductUiLabels" property="GeneralCatalogPermissionError"/></check-permission>
         <check-errors/>
         <make-value entity-name="Subscription" value-name="newEntity"/>
         <if-empty field-name="parameters.subscriptionId">
@@ -34,10 +34,9 @@
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         <create-value value-name="newEntity"/>
     </simple-method>  
-    
     <simple-method method-name="updateSubscription" short-description="update a Subscription">
         <set value="_UPDATE" field="securityAction"/>
-        <check-permission permission="CONTENTMGR" action="${securityAction}"><fail-property resource="ContentUiLabels" property="SubscriptionPermissionError"/></check-permission>
+        <check-permission permission="CATALOG" action="${securityAction}"><fail-property resource="ProductUiLabels" property="GeneralCatalogPermissionError"/></check-permission>
         <check-errors/>
         <entity-one entity-name="Subscription" value-name="lookedUpValue"/>
         <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
@@ -46,7 +45,7 @@
     
     <simple-method method-name="isSubscribed" short-description="check if a party has a subscription">
         <set value="_READ" field="securityAction"/>
-        <check-permission permission="CONTENTMGR" action="${securityAction}"><fail-property resource="ContentUiLabels" property="SubscriptionPermissionError"/></check-permission>
+        <check-permission permission="CATALOG" action="${securityAction}"><fail-property resource="ProductUiLabels" property="GeneralCatalogPermissionError"/></check-permission>
         <check-errors/>
         <set field="pfInput.inputFields" from-field="parameters"/>
         <set field="pfInput.entityName" value="Subscription"/>
@@ -75,12 +74,30 @@
     
     <simple-method method-name="getSubscription" short-description="get Subscription data">
         <set value="_READ" field="securityAction"/>
-        <check-permission permission="CONTENTMGR" action="${securityAction}"><accept-userlogin-party/><fail-property resource="ContentUiLabels" property="SubscriptionPermissionError"/></check-permission>
+        <check-permission permission="CATALOG" action="${securityAction}"><accept-userlogin-party/><fail-property resource="ProductUiLabels" property="GeneralCatalogPermissionError"/></check-permission>
         <check-errors/>
         <entity-one entity-name="Subscription" value-name="subscription"/>
         <field-to-result field-name="parameters.subscriptionId" result-name="subscriptionId"/>
         <if-not-empty field-name="subscription">
             <field-to-result field-name="subscription" result-name="subscription"/>
         </if-not-empty>
+    </simple-method>
+
+    <simple-method method-name="createSubscriptionResource" short-description="create a SubscriptionResource">
+        <set value="_CREATE" field="securityAction"/>
+        <check-permission permission="CATALOG" action="${securityAction}"><fail-property resource="ProductUiLabels" property="GeneralCatalogPermissionError"/></check-permission>
+        <check-errors/>
+        <make-value entity-name="SubscriptionResource" value-name="newEntity"/>
+        <set-pk-fields map-name="parameters" value-name="newEntity"/>
+        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
+        <create-value value-name="newEntity"/>
+    </simple-method>  
+    <simple-method method-name="updateSubscriptionResource" short-description="update a SubscriptionResource">
+        <set value="_UPDATE" field="securityAction"/>
+        <check-permission permission="CATALOG" action="${securityAction}"><fail-property resource="ProductUiLabels" property="GeneralCatalogPermissionError"/></check-permission>
+        <check-errors/>
+        <entity-one entity-name="SubscriptionResource" value-name="lookedUpValue"/>
+        <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
+        <store-value value-name="lookedUpValue"/>
     </simple-method>
 </simple-methods>

Modified: incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml?rev=418907&r1=418906&r2=418907&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml (original)
+++ incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml Mon Jul  3 20:34:15 2006
@@ -23,21 +23,21 @@
     <vendor>OFBiz</vendor>
     
     <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>
+        location="org/ofbiz/product/subscription/SubscriptionServices.xml" invoke="createSubscription">
+        <description>Create a Subscription Record</description>
         <auto-attributes include="pk" mode="INOUT" optional="true"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     
     <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>
+        location="org/ofbiz/product/subscription/SubscriptionServices.xml" invoke="updateSubscription">
+        <description>Update a Subscription Record</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     
     <service name="isSubscribed" default-entity-name="Subscription" auth="true" engine="simple"
-        location="org/ofbiz/content/SubscriptionServices.xml" invoke="isSubscribed">
+        location="org/ofbiz/product/subscription/SubscriptionServices.xml" invoke="isSubscribed">
         <description>check if a particular party has at this moment a subscription</description>
         <auto-attributes include="all" mode="IN" optional="true"/>
         <attribute name="filterByDate" type="String" mode="IN" optional="true"/><!-- default is "Y" -->
@@ -47,9 +47,23 @@
     </service>
     
     <service name="getSubscriptionEnt" default-entity-name="Subscription" auth="true" engine="simple"
-        location="org/ofbiz/content/SubscriptionServices.xml" invoke="getSubscription">
+        location="org/ofbiz/product/subscription/SubscriptionServices.xml" invoke="getSubscription">
         <description>Retrieve a single Subscription Entity Record</description>
         <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <attribute name="subscription" type="GenericValue" mode="OUT" optional="true"/>
+    </service>
+
+    <service name="createSubscriptionResource" default-entity-name="SubscriptionResource" auth="true" engine="simple"
+        location="org/ofbiz/product/subscription/SubscriptionServices.xml" invoke="createSubscriptionResource">
+        <description>Create a SubscriptionResource Record</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+    </service>
+    
+    <service name="updateSubscriptionResource" default-entity-name="SubscriptionResource" auth="true" engine="simple"
+        location="org/ofbiz/product/subscription/SubscriptionServices.xml" invoke="updateSubscriptionResource">
+        <description>Update a SubscriptionResource Record</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
 </services>