You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@sandglass-software.com> on 2012/08/07 09:04:28 UTC

Re: svn commit: r1369948 - in /ofbiz/trunk/applications/accounting: data/AccountingTypeData.xml script/org/ofbiz/accounting/invoice/InvoiceServices.xml script/org/ofbiz/accounting/test/AutoPaymentTests.xml servicedef/services_invoice.xml

For anyone who is interested, this is necessary because of recent 
Mini-language schema changes. The Mini-language documentation has always 
said that simple method names should follow the Java method naming 
convention, but that wasn't never enforced. I updated the schema to 
enforce the naming convention. So, the method names that don't follow 
the convention still work, but they will generate XML validation errors.

-Adrian

On 8/6/2012 8:41 PM, erwan@apache.org wrote:
> Author: erwan
> Date: Mon Aug  6 19:41:14 2012
> New Revision: 1369948
>
> URL: http://svn.apache.org/viewvc?rev=1369948&view=rev
> Log:
> Suppressing - in method names which are causing XSD validation to fail
>
> Modified:
>      ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
>      ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
>      ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml
>      ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml
>
> Modified: ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml?rev=1369948&r1=1369947&r2=1369948&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml (original)
> +++ ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml Mon Aug  6 19:41:14 2012
> @@ -947,8 +947,8 @@ under the License.
>       <!-- inventory sequencing mode for accounting preferences -->
>       <CustomMethodType customMethodTypeId="HOOK" parentTypeId="HOOK" hasTable="N" description="Custom Methode Type define HOOK method to resolve specific sequence"/>
>       <CustomMethodType customMethodTypeId="INVOICE_HOOK" parentTypeId="HOOK" hasTable="N" description="Invoice Sequence methods"/>
> -    <CustomMethod customMethodId="INV_HOOK_ENF_SEQ" customMethodTypeId="INVOICE_HOOK" customMethodName="invoiceSequence-enforced" description="Enforced Sequence (no gaps, per organization)"/>
> -    <CustomMethod customMethodId="INV_HOOK_RES_YR" customMethodTypeId="INVOICE_HOOK" customMethodName="invoiceSequence-restart" description="Restart on Fiscal Year (no gaps, per org, reset to 1 each year)"/>
> +    <CustomMethod customMethodId="INV_HOOK_ENF_SEQ" customMethodTypeId="INVOICE_HOOK" customMethodName="invoiceSequenceEnforced" description="Enforced Sequence (no gaps, per organization)"/>
> +    <CustomMethod customMethodId="INV_HOOK_RES_YR" customMethodTypeId="INVOICE_HOOK" customMethodName="invoiceSequenceRestart" description="Restart on Fiscal Year (no gaps, per org, reset to 1 each year)"/>
>       <!-- quote sequencing mode for accounting preferences -->
>       <CustomMethodType customMethodTypeId="QUOTE_HOOK" parentTypeId="HOOK" hasTable="N" description="Quote Sequence methods"/>
>       <CustomMethod customMethodId="QUOTE_HOOK_ENF_SEQ" customMethodTypeId="QUOTE_HOOK" customMethodName="quoteSequence-enforced" description="Enforced Sequence (no gaps, per organization)"/>
>
> Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml?rev=1369948&r1=1369947&r2=1369948&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml (original)
> +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml Mon Aug  6 19:41:14 2012
> @@ -43,7 +43,7 @@ under the License.
>                       <set field="customMethodName" value="invoiceSequence-enforced"/>
>                   </if-compare>
>                   <if-compare operator="equals" value="INVSQ_RESTARTYR" field="partyAcctgPreference.oldInvoiceSequenceEnumId">
> -                    <set field="customMethodName" value="invoiceSequence-restart"/>
> +                    <set field="customMethodName" value="invoiceSequenceRestart"/>
>                   </if-compare>
>               </else>
>           </if-not-empty>
> @@ -74,7 +74,7 @@ under the License.
>           <field-to-result field="invoiceId" result-name="invoiceId"/>
>       </simple-method>
>   
> -    <simple-method method-name="invoiceSequence-enforced" short-description="Enforced Sequence (no gaps, per organization)">
> +    <simple-method method-name="invoiceSequenceEnforced" short-description="Enforced Sequence (no gaps, per organization)">
>           <log level="info" message="In createInvoice sequence enum Enforced"/>
>           <set field="partyAcctgPreference" from-field="parameters.partyAcctgPreference"/>
>           <!-- this is sequential sequencing, we can't skip a number, also it must be a unique sequence per partyIdFrom -->
> @@ -93,7 +93,7 @@ under the License.
>           <field-to-result field="invoiceId" result-name="invoiceId"/>
>      </simple-method>
>   
> -    <simple-method method-name="invoiceSequence-restart" short-description="Restart on Fiscal Year (no gaps, per org, reset to 1 each year)">
> +    <simple-method method-name="invoiceSequenceRestart" short-description="Restart on Fiscal Year (no gaps, per org, reset to 1 each year)">
>           <log level="info" message="In createInvoice sequence enum Restart"/>
>           <set field="partyAcctgPreference" from-field="parameters.partyAcctgPreference"/>
>           <!-- this is sequential sequencing, we can't skip a number; except that it is restarted each fiscal year -->
>
> Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml?rev=1369948&r1=1369947&r2=1369948&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml (original)
> +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml Mon Aug  6 19:41:14 2012
> @@ -501,7 +501,7 @@ under the License.
>           <log level="info" message="AFTER RUNNING VOID PAYMENT : GENERAL CHECKING ACCOUNT ;debitTotal :${undepositedDebitTotal} ; creditTotal:${undepositedCreditTotal} ; debitCreditDifference : ${undepositedDebitCreditDifference}"/>
>       </simple-method>
>   
> -    <simple-method method-name="disabled-testUpdatePaymentMethodAddress" short-description="Creates a new postal address for Company and then calls updatePaymentMethodAddress with the new contactMechId" login-required="false">
> +    <simple-method method-name="disabledTestUpdatePaymentMethodAddress" short-description="Creates a new postal address for Company and then calls updatePaymentMethodAddress with the new contactMechId" login-required="false">
>           <entity-one entity-name="UserLogin" value-field="userLogin">
>               <field-map field-name="userLoginId" value="flexadmin"/>
>           </entity-one>
>
> Modified: ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml?rev=1369948&r1=1369947&r2=1369948&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml (original)
> +++ ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml Mon Aug  6 19:41:14 2012
> @@ -33,15 +33,15 @@ under the License.
>           <attribute name="invoiceId" type="String" mode="OUT" optional="false"/>
>       </service>
>   
> -    <service name="invoiceSequence-enforced" engine="simple"
> -        location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="invoiceSequence-enforced">
> +    <service name="invoiceSequenceEnforced" engine="simple"
> +        location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="invoiceSequenceEnforced">
>           <implements service="getNextInvoiceId"/>
>           <attribute name="partyAcctgPreference" type="org.ofbiz.entity.GenericValue" mode="IN"/>
>           <override name="invoiceId" type="Long" mode="OUT"/>
>       </service>
>   
> -    <service name="invoiceSequence-restart" engine="simple"
> -        location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="invoiceSequence-restart">
> +    <service name="invoiceSequenceRestart" engine="simple"
> +        location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="invoiceSequenceRestart">
>           <implements service="getNextInvoiceId"/>
>           <attribute name="partyAcctgPreference" type="org.ofbiz.entity.GenericValue" mode="IN"/>
>       </service>
>
>


Re: svn commit: r1369948 - in /ofbiz/trunk/applications/accounting: data/AccountingTypeData.xml script/org/ofbiz/accounting/invoice/InvoiceServices.xml script/org/ofbiz/accounting/test/AutoPaymentTests.xml servicedef/services_invoice.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks for the heads up Adrian

Jacques

From: "Adrian Crum" <ad...@sandglass-software.com>
> For anyone who is interested, this is necessary because of recent Mini-language schema changes. The Mini-language documentation 
> has always said that simple method names should follow the Java method naming convention, but that wasn't never enforced. I 
> updated the schema to enforce the naming convention. So, the method names that don't follow the convention still work, but they 
> will generate XML validation errors.
>
> -Adrian
>
> On 8/6/2012 8:41 PM, erwan@apache.org wrote:
>> Author: erwan
>> Date: Mon Aug  6 19:41:14 2012
>> New Revision: 1369948
>>
>> URL: http://svn.apache.org/viewvc?rev=1369948&view=rev
>> Log:
>> Suppressing - in method names which are causing XSD validation to fail
>>
>> Modified:
>>      ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
>>      ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
>>      ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml
>>      ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml
>>
>> Modified: ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml?rev=1369948&r1=1369947&r2=1369948&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml (original)
>> +++ ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml Mon Aug  6 19:41:14 2012
>> @@ -947,8 +947,8 @@ under the License.
>>       <!-- inventory sequencing mode for accounting preferences -->
>>       <CustomMethodType customMethodTypeId="HOOK" parentTypeId="HOOK" hasTable="N" description="Custom Methode Type define HOOK 
>> method to resolve specific sequence"/>
>>       <CustomMethodType customMethodTypeId="INVOICE_HOOK" parentTypeId="HOOK" hasTable="N" description="Invoice Sequence 
>> methods"/>
>> -    <CustomMethod customMethodId="INV_HOOK_ENF_SEQ" customMethodTypeId="INVOICE_HOOK" 
>> customMethodName="invoiceSequence-enforced" description="Enforced Sequence (no gaps, per organization)"/>
>> -    <CustomMethod customMethodId="INV_HOOK_RES_YR" customMethodTypeId="INVOICE_HOOK" customMethodName="invoiceSequence-restart" 
>> description="Restart on Fiscal Year (no gaps, per org, reset to 1 each year)"/>
>> +    <CustomMethod customMethodId="INV_HOOK_ENF_SEQ" customMethodTypeId="INVOICE_HOOK" customMethodName="invoiceSequenceEnforced" 
>> description="Enforced Sequence (no gaps, per organization)"/>
>> +    <CustomMethod customMethodId="INV_HOOK_RES_YR" customMethodTypeId="INVOICE_HOOK" customMethodName="invoiceSequenceRestart" 
>> description="Restart on Fiscal Year (no gaps, per org, reset to 1 each year)"/>
>>       <!-- quote sequencing mode for accounting preferences -->
>>       <CustomMethodType customMethodTypeId="QUOTE_HOOK" parentTypeId="HOOK" hasTable="N" description="Quote Sequence methods"/>
>>       <CustomMethod customMethodId="QUOTE_HOOK_ENF_SEQ" customMethodTypeId="QUOTE_HOOK" customMethodName="quoteSequence-enforced" 
>> description="Enforced Sequence (no gaps, per organization)"/>
>>
>> Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml?rev=1369948&r1=1369947&r2=1369948&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml (original)
>> +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml Mon Aug  6 19:41:14 2012
>> @@ -43,7 +43,7 @@ under the License.
>>                       <set field="customMethodName" value="invoiceSequence-enforced"/>
>>                   </if-compare>
>>                   <if-compare operator="equals" value="INVSQ_RESTARTYR" field="partyAcctgPreference.oldInvoiceSequenceEnumId">
>> -                    <set field="customMethodName" value="invoiceSequence-restart"/>
>> +                    <set field="customMethodName" value="invoiceSequenceRestart"/>
>>                   </if-compare>
>>               </else>
>>           </if-not-empty>
>> @@ -74,7 +74,7 @@ under the License.
>>           <field-to-result field="invoiceId" result-name="invoiceId"/>
>>       </simple-method>
>>   -    <simple-method method-name="invoiceSequence-enforced" short-description="Enforced Sequence (no gaps, per organization)">
>> +    <simple-method method-name="invoiceSequenceEnforced" short-description="Enforced Sequence (no gaps, per organization)">
>>           <log level="info" message="In createInvoice sequence enum Enforced"/>
>>           <set field="partyAcctgPreference" from-field="parameters.partyAcctgPreference"/>
>>           <!-- this is sequential sequencing, we can't skip a number, also it must be a unique sequence per partyIdFrom -->
>> @@ -93,7 +93,7 @@ under the License.
>>           <field-to-result field="invoiceId" result-name="invoiceId"/>
>>      </simple-method>
>>   -    <simple-method method-name="invoiceSequence-restart" short-description="Restart on Fiscal Year (no gaps, per org, reset to 
>> 1 each year)">
>> +    <simple-method method-name="invoiceSequenceRestart" short-description="Restart on Fiscal Year (no gaps, per org, reset to 1 
>> each year)">
>>           <log level="info" message="In createInvoice sequence enum Restart"/>
>>           <set field="partyAcctgPreference" from-field="parameters.partyAcctgPreference"/>
>>           <!-- this is sequential sequencing, we can't skip a number; except that it is restarted each fiscal year -->
>>
>> Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml?rev=1369948&r1=1369947&r2=1369948&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml (original)
>> +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml Mon Aug  6 19:41:14 2012
>> @@ -501,7 +501,7 @@ under the License.
>>           <log level="info" message="AFTER RUNNING VOID PAYMENT : GENERAL CHECKING ACCOUNT ;debitTotal :${undepositedDebitTotal} 
>> ; creditTotal:${undepositedCreditTotal} ; debitCreditDifference : ${undepositedDebitCreditDifference}"/>
>>       </simple-method>
>>   -    <simple-method method-name="disabled-testUpdatePaymentMethodAddress" short-description="Creates a new postal address for 
>> Company and then calls updatePaymentMethodAddress with the new contactMechId" login-required="false">
>> +    <simple-method method-name="disabledTestUpdatePaymentMethodAddress" short-description="Creates a new postal address for 
>> Company and then calls updatePaymentMethodAddress with the new contactMechId" login-required="false">
>>           <entity-one entity-name="UserLogin" value-field="userLogin">
>>               <field-map field-name="userLoginId" value="flexadmin"/>
>>           </entity-one>
>>
>> Modified: ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml?rev=1369948&r1=1369947&r2=1369948&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml (original)
>> +++ ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml Mon Aug  6 19:41:14 2012
>> @@ -33,15 +33,15 @@ under the License.
>>           <attribute name="invoiceId" type="String" mode="OUT" optional="false"/>
>>       </service>
>>   -    <service name="invoiceSequence-enforced" engine="simple"
>> -        location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml" 
>> invoke="invoiceSequence-enforced">
>> +    <service name="invoiceSequenceEnforced" engine="simple"
>> +        location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml" 
>> invoke="invoiceSequenceEnforced">
>>           <implements service="getNextInvoiceId"/>
>>           <attribute name="partyAcctgPreference" type="org.ofbiz.entity.GenericValue" mode="IN"/>
>>           <override name="invoiceId" type="Long" mode="OUT"/>
>>       </service>
>>   -    <service name="invoiceSequence-restart" engine="simple"
>> -        location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml" 
>> invoke="invoiceSequence-restart">
>> +    <service name="invoiceSequenceRestart" engine="simple"
>> +        location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml" 
>> invoke="invoiceSequenceRestart">
>>           <implements service="getNextInvoiceId"/>
>>           <attribute name="partyAcctgPreference" type="org.ofbiz.entity.GenericValue" mode="IN"/>
>>       </service>
>>
>>
>