Author: nmalin
Date: Fri Jan 30 21:41:34 2015 New Revision: 1656125 URL: http://svn.apache.org/r1656125 Log: (OFBIZ-6047) Convert DataSource, Enumeration and Note entites CRUD service from simple to entity-auto. I remove also some end line space on CommonService.xml Removed: ofbiz/trunk/framework/common/script/org/ofbiz/common/EnumerationServices.xml ofbiz/trunk/framework/common/script/org/ofbiz/common/datasource/ Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/CommonServices.xml ofbiz/trunk/framework/common/servicedef/services.xml Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/CommonServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/script/org/ofbiz/common/CommonServices.xml?rev=1656125&r1=1656124&r2=1656125&view=diff ============================================================================== --- ofbiz/trunk/framework/common/script/org/ofbiz/common/CommonServices.xml (original) +++ ofbiz/trunk/framework/common/script/org/ofbiz/common/CommonServices.xml Fri Jan 30 21:41:34 2015 @@ -182,6 +182,7 @@ under the License. </else> </if-empty> </simple-method> + <simple-method method-name="getFileUploadProgressStatus" short-description="Look up progress made in File Upload process"> <set field="uploadProgressListener" from-field="parameters.uploadProgressListener"/> <if-not-empty field="uploadProgressListener"> @@ -237,15 +238,6 @@ under the License. <field-to-result field="themeResources"/> </simple-method> - <simple-method method-name="updateNote" short-description="Update a note"> - <entity-one entity-name="NoteData" value-field="noteData"> - <field-map field-name="noteId" from-field="parameters.noteId"/> - </entity-one> - <set-nonpk-fields map="parameters" value-field="noteData"/> - <store-value value-field="noteData"/> - <field-to-result field="noteData.noteId" result-name="noteId"/> - </simple-method> - <simple-method method-name="getCountryList" short-description="Returns a list of country" login-required="false"> <call-class-method method-name="getCountryList" class-name="org.ofbiz.common.CommonWorkers" ret-field="geoList"> <field field="delegator" type="org.ofbiz.entity.Delegator"/> @@ -256,7 +248,7 @@ under the License. </iterate> <field-to-result field="countryList"/> </simple-method> - + <simple-method method-name="getAssociatedStateList" short-description="set the state options for selected country" login-required="false"> <set field="countryGeoId" from-field="parameters.countryGeoId"/> <set field="listOrderBy" from-field="parameters.listOrderBy"/> @@ -290,11 +282,11 @@ under the License. <field-map field-name="geoIdTo" from-field="geoAssoc.geoIdTo"/> </entity-one> <remove-value value-field="oldGeoAssoc"/> - </else> + </else> </if-compare-field> </iterate> <!-- Old list contains current values --> - <iterate list="parameters.geoIds" entry="geoIdTo"> + <iterate list="parameters.geoIds" entry="geoIdTo"> <if-compare-field field="oldGeoIds" operator="contains" to-field="geoIdTo"> <!-- Yes, nothing to do, it already exists and we keep it --> <else> @@ -302,7 +294,7 @@ under the License. <field-map field-name="geoId" from-field="parameters.geoId"/> <field-map field-name="geoIdTo" from-field="geoIdTo"/> </entity-one> - <if-empty field="oldGeoAssoc"> + <if-empty field="oldGeoAssoc"> <!-- Add as it does not exist --> <make-value value-field="newGeoAssoc" entity-name="GeoAssoc"/> <set field="newGeoAssoc.geoId" from-field="parameters.geoId"/> @@ -316,7 +308,7 @@ under the License. <check-errors/> </simple-method> - <simple-method method-name="getRelatedGeos" short-description="get related geos to a geo through a geoAssoc" login-required="false"> + <simple-method method-name="getRelatedGeos" short-description="get related geos to a geo through a geoAssoc" login-required="false"> <entity-and entity-name="GeoAssoc" list="geoAssoc"> <field-map field-name="geoId" from-field="parameters.geoId"/> <field-map field-name="geoAssocTypeId" from-field="parameters.geoAssocTypeId"/> @@ -331,8 +323,8 @@ under the License. </else> </if-empty> <field-to-result field="geoList"/> - </simple-method> - + </simple-method> + <simple-method method-name="checkUomConversion" short-description="Returns true if an UomConversion record exists"> <entity-one entity-name="UomConversion" value-field="uomConversion"> <field-map field-name="uomId" from-field="parameters.uomId"/> @@ -346,7 +338,7 @@ under the License. </if-not-empty> <field-to-result field="exist"/> </simple-method> - + <simple-method method-name="checkUomConversionDated" short-description="Returns true if an UomConversionDated record exists"> <entity-condition entity-name="UomConversionDated" list="uomConversions" filter-by-date="true"> <condition-list> @@ -363,21 +355,20 @@ under the License. </if-not-empty> <field-to-result field="exist"/> </simple-method> - <simple-method method-name="getServerTimestamp" login-required="false"> <now field="serverTimestamp" type="java.sql.Timestamp"/> <field-to-result field="serverTimestamp"/> </simple-method> - + <simple-method method-name="getServerTimeZone" login-required="false"> <set field="serverTimeZone" value="${util:defaultTimeZone()}" type="String"/> <field-to-result field="serverTimeZone"/> </simple-method> - + <simple-method method-name="getServerTimestampAsLong" login-required="false"> <now field="serverTimestamp" type="java.lang.Long"/> <field-to-result field="serverTimestamp"/> </simple-method> - + </simple-methods> Modified: ofbiz/trunk/framework/common/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services.xml?rev=1656125&r1=1656124&r2=1656125&view=diff ============================================================================== --- ofbiz/trunk/framework/common/servicedef/services.xml (original) +++ ofbiz/trunk/framework/common/servicedef/services.xml Fri Jan 30 21:41:34 2015 @@ -66,15 +66,14 @@ under the License. <attribute name="note" type="String" mode="IN" allow-html="any"/> <attribute name="noteId" type="String" mode="OUT"/> </service> - - <service name="updateNote" engine="simple" default-entity-name="NoteData" - location="component://common/script/org/ofbiz/common/CommonServices.xml" invoke="updateNote"> + + <service name="updateNote" default-entity-name="NoteData" engine="entity-auto" invoke="update"> <description>Update a note record</description> <auto-attributes include="pk" mode="INOUT" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="noteInfo" allow-html="any"/> </service> - + <service name="adjustDebugLevels" engine="java" location="org.ofbiz.common.CommonServices" invoke="adjustDebugLevels" auth="true"> <description>Sets/Updates cached debugging levels</description> @@ -95,8 +94,7 @@ under the License. </service> <!-- Enumeration Services --> - <service name="createEnumeration" default-entity-name="Enumeration" engine="simple" - location="component://common/script/org/ofbiz/common/EnumerationServices.xml" invoke="createEnumeration" auth="true"> + <service name="createEnumeration" default-entity-name="Enumeration" engine="entity-auto" invoke="create" auth="true"> <description>Create a Enumeration</description> <permission-service service-name="commonGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="OUT" optional="false"/> @@ -104,8 +102,7 @@ under the License. <override name="enumTypeId" optional="false"/> <override name="description" optional="false" allow-html="any"/> </service> - <service name="updateEnumeration" default-entity-name="Enumeration" engine="simple" - location="component://common/script/org/ofbiz/common/EnumerationServices.xml" invoke="updateEnumeration" auth="true"> + <service name="updateEnumeration" default-entity-name="Enumeration" engine="entity-auto" invoke="update" auth="true"> <description>Update a Enumeration</description> <permission-service service-name="commonGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> @@ -118,27 +115,24 @@ under the License. <permission-service service-name="commonGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> - + <!-- DataSource Services --> <service name="interfaceDataSource" engine="interface" location="" invoke=""> <attribute name="dataSourceId" type="String" mode="IN" optional="false"/> <attribute name="dataSourceTypeId" type="String" mode="IN" optional="false"/> <attribute name="description" type="String" mode="IN" optional="true"/> </service> - <service name="createDataSource" engine="simple" - location="component://common/script/org/ofbiz/common/datasource/DataSourceServices.xml" invoke="createDataSource" auth="true"> + <service name="createDataSource" engine="entity-auto" default-entity-name="DataSource" invoke="create" auth="true"> <description>Create a DataSource record</description> <permission-service service-name="commonGenericPermission" main-action="CREATE"/> <implements service="interfaceDataSource"/> </service> - <service name="updateDataSource" engine="simple" - location="component://common/script/org/ofbiz/common/datasource/DataSourceServices.xml" invoke="updateDataSource" auth="true"> + <service name="updateDataSource" engine="entity-auto" default-entity-name="DataSource" invoke="update" auth="true"> <description>Update a DataSource record</description> <permission-service service-name="commonGenericPermission" main-action="UPDATE"/> <implements service="interfaceDataSource"/> </service> - <service name="deleteDataSource" engine="simple" - location="component://common/script/org/ofbiz/common/datasource/DataSourceServices.xml" invoke="deleteDataSource" auth="true"> + <service name="deleteDataSource" engine="entity-auto" default-entity-name="DataSource" invoke="delete" auth="true"> <description>Delete a DataSource record</description> <permission-service service-name="commonGenericPermission" main-action="DELETE"/> <attribute name="dataSourceId" type="String" mode="IN" optional="false"/> @@ -149,20 +143,17 @@ under the License. <attribute name="dataSourceTypeId" type="String" mode="IN" optional="false"/> <attribute name="description" type="String" mode="IN" optional="true"/> </service> - <service name="createDataSourceType" engine="simple" - location="component://common/script/org/ofbiz/common/datasource/DataSourceTypeServices.xml" invoke="createDataSourceType" auth="true"> + <service name="createDataSourceType" engine="entity-auto" default-entity-name="DataSourceType" invoke="create" auth="true"> <description>Create a DataSourceType record</description> <permission-service service-name="commonGenericPermission" main-action="CREATE"/> <implements service="interfaceDataSourceType"/> </service> - <service name="updateDataSourceType" engine="simple" - location="component://common/script/org/ofbiz/common/datasource/DataSourceTypeServices.xml" invoke="updateDataSourceType" auth="true"> + <service name="updateDataSourceType" engine="entity-auto" default-entity-name="DataSourceType" invoke="update" auth="true"> <description>Update a DataSourceType record</description> <permission-service service-name="commonGenericPermission" main-action="UPDATE"/> <implements service="interfaceDataSourceType"/> </service> - <service name="deleteDataSourceType" engine="simple" - location="component://common/script/org/ofbiz/common/datasource/DataSourceTypeServices.xml" invoke="deleteDataSourceType" auth="true"> + <service name="deleteDataSourceType" engine="entity-auto" default-entity-name="DataSourceType" invoke="delete" auth="true"> <description>Delete a DataSourceType record</description> <permission-service service-name="commonGenericPermission" main-action="DELETE"/> <attribute name="dataSourceTypeId" type="String" mode="IN" optional="false"/> @@ -720,7 +711,7 @@ under the License. <auto-attributes include="pk" mode="INOUT"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="geoName" optional="false"/> - <override name="geoTypeId" optional="false"/> + <override name="geoTypeId" optional="false"/> </service> <service name="updateGeo" default-entity-name="Geo" engine="entity-auto" invoke="update" auth="true"> <description>Update a Geo</description> @@ -734,7 +725,7 @@ under the License. <auto-attributes include="pk" mode="IN" optional="false"/> </service> <service name="linkGeos" engine="simple" auth="true" - location="component://common/script/org/ofbiz/common/CommonServices.xml" invoke="linkGeos"> + location="component://common/script/org/ofbiz/common/CommonServices.xml" invoke="linkGeos"> <description>Link Geos to another Geo</description> <permission-service service-name="commonGenericPermission" main-action="CREATE"/> <attribute name="geoIds" type="List" mode="IN" optional="true"/> @@ -744,7 +735,7 @@ under the License. <service name="getRelatedGeos" engine="simple" auth="false" location="component://common/script/org/ofbiz/common/CommonServices.xml" invoke="getRelatedGeos"> <attribute name="geoId" mode="IN" type="String"/> - <attribute name="geoAssocTypeId" mode="IN" type="String"/> + <attribute name="geoAssocTypeId" mode="IN" type="String"/> <attribute name="geoList" mode="OUT" type="java.util.List"/> </service> <service name="getCountryList" engine="simple" auth="false" |
Free forum by Nabble | Edit this page |