<commit_before>/*
 * Copyright 2003 - 2012 The eFaps Team
 *
 * 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.
 *
 * Revision:        $Rev: 8342 $
 * Last Changed:    $Date: 2012-12-11 09:42:17 -0500 (Tue, 11 Dec 2012) $
 * Last Changed By: $Author: <EMAIL> $
 */


package org.efaps.esjp.imex;

import org.efaps.admin.event.Parameter;
import org.efaps.admin.event.Return;
import org.efaps.admin.program.esjp.EFapsRevision;
import org.efaps.admin.program.esjp.EFapsUUID;
import org.efaps.db.Insert;
import org.efaps.esjp.ci.CIFormImEx;
import org.efaps.esjp.ci.CIImEx;
import org.efaps.esjp.sales.document.DocumentSum;
import org.efaps.util.EFapsException;

/**
 * TODO comment!
 * 
 * @author The eFaps Team
 * @version $Id: Import_Base.java 10301 2013-09-24 21:23:03Z <EMAIL> $
 */
@EFapsUUID("be9290b7-4ab4-42b6-9db2-8ab4530ada2e")
@EFapsRevision("$Rev: 1010 $")
public abstract class CustomsDuties_Base
    extends DocumentSum
{

    /**
     * Method for create a new Quotation.
     * 
     * @param _parameter Parameter as passed from eFaps API.
     * @return new Return.
     * @throws EFapsException on error.
     */
    @SuppressWarnings("unused")
    public Return create(final Parameter _parameter)
        throws EFapsException
    {
        final CreatedDoc createdDoc = createDoc(_parameter);
        return new Return();
    }

    @Override
    protected void add2DocCreate(Parameter _parameter,
                                 Insert _insert,
                                 CreatedDoc _createdDoc)
        throws EFapsException
    {
        _insert.add(CIImEx.CustomsDuties.AduanasAgency,
                        _parameter.getParameterValue(CIFormImEx.ImEx_CustomsDutiesForm.aduanasAgency.name));
        _insert.add(CIImEx.CustomsDuties.Bank,<commit_msg>- importexport: renaming DocumentSum to AbstractDocumentSum<commit_after>/*
 * Copyright 2003 - 2012 The eFaps Team
 *
 * 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.
 *
 * Revision:        $Rev: 8342 $
 * Last Changed:    $Date: 2012-12-11 09:42:17 -0500 (Tue, 11 Dec 2012) $
 * Last Changed By: $Author: <EMAIL> $
 */


package org.efaps.esjp.imex;

import org.efaps.admin.event.Parameter;
import org.efaps.admin.event.Return;
import org.efaps.admin.program.esjp.EFapsRevision;
import org.efaps.admin.program.esjp.EFapsUUID;
import org.efaps.db.Insert;
import org.efaps.esjp.ci.CIFormImEx;
import org.efaps.esjp.ci.CIImEx;
import org.efaps.esjp.sales.document.AbstractSumDocument;
import org.efaps.util.EFapsException;

/**
 * TODO comment!
 * 
 * @author The eFaps Team
 * @version $Id: Import_Base.java 10301 2013-09-24 21:23:03Z <EMAIL> $
 */
@EFapsUUID("be9290b7-4ab4-42b6-9db2-8ab4530ada2e")
@EFapsRevision("$Rev: 1010 $")
public abstract class CustomsDuties_Base
    extends AbstractSumDocument
{

    /**
     * Method for create a new Quotation.
     * 
     * @param _parameter Parameter as passed from eFaps API.
     * @return new Return.
     * @throws EFapsException on error.
     */
    @SuppressWarnings("unused")
    public Return create(final Parameter _parameter)
        throws EFapsException
    {
        final CreatedDoc createdDoc = createDoc(_parameter);
        return new Return();
    }

    @Override
    protected void add2DocCreate(Parameter _parameter,
                                 Insert _insert,
                                 CreatedDoc _createdDoc)
        throws EFapsException
    {
        _insert.add(CIImEx.CustomsDuties.AduanasAgency,
                        _parameter.getParameterValue(CIFormImEx.ImEx_CustomsDutiesForm.aduanasAgency.name));
        _insert.add(CIImEx.CustomsDuties.Bank,
{'fraction_non_alphanumeric': 0.09455958549222798, 'fraction_numerical': 0.03540587219343696, 'mean_word_length': 3.05336832895888, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2142281', 'n_tokens_mistral': 1556, 'n_tokens_neox': 1424, 'n_words': 394}