|
Author: jleroux
Date: Sat Sep 1 10:44:14 2012 New Revision: 1379740 URL: http://svn.apache.org/viewvc?rev=1379740&view=rev Log: Revert r1379389 it was incomplete and need more work, see https://issues.apache.org/jira/browse/OFBIZ-5020#comment-13446639 Modified: ofbiz/trunk/applications/content/entitydef/entitymodel.xml ofbiz/trunk/applications/content/script/org/ofbiz/content/ContentManagementMapProcessors.xml ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java Modified: ofbiz/trunk/applications/content/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/entitydef/entitymodel.xml?rev=1379740&r1=1379739&r2=1379740&view=diff ============================================================================== --- ofbiz/trunk/applications/content/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/content/entitydef/entitymodel.xml Sat Sep 1 10:44:14 2012 @@ -159,10 +159,7 @@ under the License. <field name="dataSourceId" type="id"></field> <field name="statusId" type="id"></field> <field name="privilegeEnumId" type="id"></field> - <field name="oldServiceName" type="long-varchar" col-name="service_name"> - <description>Deprecated : use customMethod pattern instead of. Keep for backward compatibility</description> - </field> - <field name="customMethodId" type="id"></field> + <field name="serviceName" type="long-varchar"></field> <field name="contentName" type="name"></field> <field name="description" type="description"></field> <field name="localeString" type="very-short"></field> @@ -190,9 +187,6 @@ under the License. <relation type="one" fk-name="CONTENT_PRIVENM" title="Privilege" rel-entity-name="Enumeration"> <key-map field-name="privilegeEnumId" rel-field-name="enumId"/> </relation> - <relation type="one" fk-name="CONTENT_CUSTMET" rel-entity-name="CustomMethod"> - <key-map field-name="customMethodId"/> - </relation> <!-- the relationship to MimeType is one-nofk so that you can still do a lookup on MimeType but a new and unexpected mime type would not cause a foreign key constraint violation, so MimeType can store the most common mime types instead of an exhaustive list of all possible mime types --> Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/ContentManagementMapProcessors.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/ContentManagementMapProcessors.xml?rev=1379740&r1=1379739&r2=1379740&view=diff ============================================================================== --- ofbiz/trunk/applications/content/script/org/ofbiz/content/ContentManagementMapProcessors.xml (original) +++ ofbiz/trunk/applications/content/script/org/ofbiz/content/ContentManagementMapProcessors.xml Sat Sep 1 10:44:14 2012 @@ -27,8 +27,7 @@ under the License. <process field="dataResourceId"><copy to-field="dataResourceId" replace="true" set-if-null="false"/></process> <process field="dataSourceId"><copy to-field="dataSourceId" replace="true" set-if-null="false"/></process> <process field="statusId"><copy to-field="statusId" replace="true" set-if-null="false"/></process> - <process field="customMethodId"><copy to-field="customMethodId" replace="true" set-if-null="false"/></process> - <process field="oldServiceName"><copy to-field="oldServiceName" replace="true" set-if-null="false"/></process> + <process field="serviceName"><copy to-field="serviceName" replace="true" set-if-null="false"/></process> <process field="contentName"><copy to-field="contentName" replace="true" set-if-null="false"/></process> <process field="description"><copy to-field="description" replace="true" set-if-null="false"/></process> <process field="localeString"><copy to-field="localeString" replace="true" set-if-null="false"/></process> @@ -113,8 +112,7 @@ under the License. <process field="dataResourceId"><copy to-field="dataResourceId" replace="true" set-if-null="false"/></process> <process field="dataSourceId"><copy to-field="dataSourceId" replace="true" set-if-null="false"/></process> <process field="statusId"><copy to-field="statusId" replace="true" set-if-null="false"/></process> - <process field="customMethodId"><copy to-field="customMethodId" replace="true" set-if-null="false"/></process> - <process field="oldServiceName"><copy to-field="oldServiceName" replace="true" set-if-null="false"/></process> + <process field="serviceName"><copy to-field="serviceName" replace="true" set-if-null="false"/></process> <process field="contentName"><copy to-field="contentName" replace="true" set-if-null="false"/></process> <process field="description"><copy to-field="description" replace="true" set-if-null="false"/></process> <process field="localeString"><copy to-field="localeString" replace="true" set-if-null="false"/></process> Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=1379740&r1=1379739&r2=1379740&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java Sat Sep 1 10:44:14 2012 @@ -177,10 +177,7 @@ public class ContentWorker implements or Map<String,Object>templateContext, Locale locale, String mimeTypeId, boolean cache, List<GenericValue> webAnalytics) throws GeneralException, IOException { // if the content has a service attached run the service - //search serviceName to call on associate customMethod and if empty get value from old serviceName field - String serviceName = content.getString("oldServiceName"); - GenericValue custMethod = content.getRelatedOne("CustomMethod", true); - if (custMethod != null) serviceName = custMethod.getString("customMethodName"); + String serviceName = content.getString("serviceName"); if (dispatcher != null && UtilValidate.isNotEmpty(serviceName)) { DispatchContext dctx = dispatcher.getDispatchContext(); ModelService service = dctx.getModelService(serviceName); |
| Free forum by Nabble | Edit this page |
