<p>Process entity request.</p>
@param pAddParam additional param
@param pRequestData Request Data
@throws Exception - an exception
184592
@Override
  public final void process(final Map<String, Object> pAddParam,
    final IRequestData pRequestData) throws Exception {
    String retrieverName = pRequestData.getParameter("nmRet");
    ICsvDataRetriever ret = this.retrievers.get(retrieverName);
    if (ret == null) {
      throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
        "Can't find retriever " + retrieverName);
    }
    pRequestData.setAttribute("dataTree", ret.getSampleDataRow(pAddParam));
  }
629307
@Override
  public final void checkOtherFraudUpdate(final Map<String, Object> pAddParam,
    final GoodsLoss pEntity, final IRequestData pRequestData,
      final GoodsLoss pOldEntity) throws Exception {
    // nothing
  }
671480
@Override
  public final synchronized List<TrialBalanceLine> retrieveTrialBalance(
    final Map<String, Object> pAddParam,
      final Date pDate) throws Exception {
    recalculateAllIfNeed(pAddParam, pDate);
    List<TrialBalanceLine> result = new ArrayList<TrialBalanceLine>();
    String query = evalQueryBalance(pAddParam, pDate);
    IRecordSet<RS> recordSet = null;
    try {
      recordSet = getSrvDatabase().retrieveRecords(query);
      if (recordSet.moveToFirst()) {
        do {
          String accName = recordSet
            .getString("ITSNAME");
          String accNumber = recordSet
            .getString("ITSNUMBER");
          String subaccName = recordSet
            .getString("SUBACC");
          Double debit = recordSet
            .getDouble("DEBIT");
          Double credit = recordSet
            .getDouble("CREDIT");
          if (debit != 0 || credit != 0) {
            TrialBalanceLine tbl = new TrialBalanceLine();
            tbl.setAccName(accName);
            tbl.setAccNumber(accNumber);
            tbl.setSubaccName(subaccName);
            tbl.setDebit(BigDecimal.valueOf(debit).setScale(
              getSrvAccSettings().lazyGetAccSettings(pAddParam)
                .getBalancePrecision(), getSrvAccSettings()
                  .lazyGetAccSettings(pAddParam).getRoundingMode()));
            tbl.setCredit(BigDecimal.valueOf(credit).setScale(
              getSrvAccSettings().lazyGetAccSettings(pAddParam)
                .getBalancePrecision(), getSrvAccSettings()
                  .lazyGetAccSettings(pAddParam).getRoundingMode()));
            if (tbl.getDebit().doubleValue() != 0
              || tbl.getCredit().doubleValue() != 0) {
              result.add(tbl);
            }
          }
        } while (recordSet.moveToNext());
      }
    } finally {
      if (recordSet != null) {
        recordSet.close();
      }
    }
    //account totals:
    BigDecimal debitAcc = BigDecimal.ZERO;
    BigDecimal creditAcc = BigDecimal.ZERO;
    String accCurr = null;
    int lineCurr = 0;
    int lineStartAcc = 0;
    for (TrialBalanceLine tbl : result) {
      if (!tbl.getAccNumber().equals(accCurr)) {
        //save to old
        if (accCurr != null) {
          for (int j = lineStartAcc; j < lineCurr; j++) {
            result.get(j).setDebitAcc(debitAcc);
            result.get(j).setCreditAcc(creditAcc);
          }
        }
        //init new acc:
        lineStartAcc = lineCurr;
        accCurr = tbl.getAccNumber();
      }
      debitAcc = debitAcc.add(tbl.getDebit());
      creditAcc = creditAcc.add(tbl.getCredit());
      lineCurr++;
    }
    return result;
  }
78172
public final <T extends IHasIdLongVersionName> void makeIt(
    final Map<String, Object> pAddParam, final IRequestData pRequestData,
      final Class<T> pItemClass) throws Exception {
    Set<String> filterAppearance = new HashSet<String>();
    pAddParam.put("filterAppearance", filterAppearance);
    StringBuffer sbWhere = this.srvEntitiesPage
      .revealPageFilterData(pAddParam, pRequestData, pItemClass);
    if (sbWhere.length() == 0) {
      throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
        "filter_must_be_not_empty");
    }
    String itemsCatalogAction = pRequestData
      .getParameter("itemsCatalogAction");
    if (!("add".equals(itemsCatalogAction)
      || "remove".equals(itemsCatalogAction))) {
      throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
        "wrong_action");
    }
    Long catalogId = Long.valueOf(pRequestData
      .getParameter(CatalogGs.class.getSimpleName() + ".itsId"));
    if (catalogId == null) {
      throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
        "catalog_must_be_not_empty");
    }
    CatalogGs catalogOfGoods = this.srvOrm
      .retrieveEntityById(pAddParam, CatalogGs.class, catalogId);
    if (catalogOfGoods == null) {
      throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
        "catalog_must_be_not_empty");
    }
    if (catalogOfGoods.getHasSubcatalogs()) {
      throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
        "catalog_must_not_has_subcatalog");
    }
    String whereStr = sbWhere.toString();
    Integer rowCount = this.srvOrm.evalRowCountWhere(pAddParam, pItemClass,
        whereStr);
    TradingSettings ts = (TradingSettings) pAddParam.get("tradSet");
    if (rowCount > ts.getMaxQuantityOfBulkItems()) {
      throw new ExceptionWithCode(ExceptionWithCode.SOMETHING_WRONG,
        "filtered_list_size_exceed_max_bulk");
    }
    Integer totalItems = Integer
      .valueOf(pRequestData.getParameter("totalItems"));
    if (!rowCount.equals(totalItems)) {
      throw new ExceptionWithCode(ExceptionWithCode.SOMETHING_WRONG,
        "filtered_list_has_changed");
    }
    List<T> itemsList = this.srvOrm.retrieveListWithConditions(pAddParam,
      pItemClass, "where " + whereStr);
    for (T items : itemsList) {
      AItemCatalog ic;
      if (pItemClass == InvItem.class) {
        ic = new GoodsCatalog();
      } else if (pItemClass == ServiceToSale.class) {
        ic = new ServiceCatalog();
      } else {
        throw new Exception("NEI: " + pItemClass);
      }
      ic.setItsCatalog(catalogOfGoods);
      ic.setItem(items);
      if ("add".equals(itemsCatalogAction)) {
        // add items to catalog
        this.srvOrm.insertEntity(pAddParam, ic);
      } else {
        // remove items from catalog
        this.srvOrm.deleteEntity(pAddParam, ic);
      }
    }
    pRequestData.setAttribute("itemsCatalogAction", itemsCatalogAction);
    pRequestData.setAttribute("filterAppearance", filterAppearance);
    pRequestData.setAttribute("totalItems", totalItems);
    pRequestData.setAttribute("itemsList", itemsList);
    pRequestData.setAttribute("catalogOfItems", catalogOfGoods);
  }
969938
@Override
  public final AItemSpecifics<T, ID> process(
    final Map<String, Object> pReqVars,
      final AItemSpecifics<T, ID> pEntity,
        final IRequestData pRequestData) throws Exception {
    String fileToUploadName = (String) pRequestData
      .getAttribute("fileToUploadName");
    OutputStream outs = null;
    InputStream ins = null;
    try {
      String filePath;
      if (pEntity.getStringValue1() == null) { //in base language:
        String ft = String.valueOf(new Date().getTime());
        filePath = this.webAppPath + File.separator
          + this.uploadDirectory + File.separator
            + ft + fileToUploadName;
        pEntity.setStringValue2(filePath);
        pEntity.setStringValue1(this.uploadDirectory
              + "/" + ft + fileToUploadName);
      } else { //I18N files:
        String fileLang = pRequestData.getParameter("fileLang");
        if (pEntity.getStringValue3() == null
          || !pEntity.getStringValue3().contains(fileLang)) {
          throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
            "notset_language");
        }
        int idhHtml = pEntity.getStringValue1().indexOf(".html");
        String urlWithoutHtml = pEntity.getStringValue1().substring(0, idhHtml);
        filePath = this.webAppPath + File.separator
          + urlWithoutHtml + "_" + fileLang + ".html";
      }
      ins = (InputStream) pRequestData.getAttribute("fileToUploadInputStream");
      outs = new BufferedOutputStream(new FileOutputStream(filePath));
      byte[] data = new byte[1024];
      int count;
      while ((count = ins.read(data)) != -1) {
        outs.write(data, 0, count);
      }
      outs.flush();
    } finally {
      if (ins != null) {
        ins.close();
      }
      if (outs != null) {
        outs.close();
      }
    }
    getSrvOrm().updateEntity(pReqVars, pEntity);
    return pEntity;
  }
1231167
@Override
  public final <T> void deleteEntityWhere(final Map<String, Object> pAddParam,
    final Class<T> pEntityClass, final String pWhere) throws Exception {
    if (pWhere == null) {
      throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
        "param_null_not_accepted");
    }
    getSrvDatabase().executeDelete(pEntityClass.getSimpleName()
      .toUpperCase(), pWhere);
  }
579130
@Override
  public final void makeOtherEntries(final Map<String, Object> pAddParam,
    final ManufacturingProcess pEntity, final IRequestData pRequestData,
      final boolean pIsNew) throws Exception {
    String actionAdd = pRequestData.getParameter("actionAdd");
    if ("makeAccEntries".equals(actionAdd)
      && pEntity.getReversedId() != null) {
      pEntity.setTheRest(BigDecimal.ZERO);
      //reverse none-reversed lines:
      ManufacturingProcess reversed = getSrvOrm()
        .retrieveEntityById(pAddParam, ManufacturingProcess.class,
          pEntity.getReversedId());
      reversed.setTheRest(BigDecimal.ZERO);
      getSrvOrm().updateEntity(pAddParam, reversed);
      UsedMaterialLine umlrd = new UsedMaterialLine();
      umlrd.setItsOwner(reversed);
      List<UsedMaterialLine> reversedMaterials = getSrvOrm().
        retrieveListForField(pAddParam, umlrd, "itsOwner");
      String langDef = (String) pAddParam.get("langDef");
      for (UsedMaterialLine reversedLine : reversedMaterials) {
        if (reversedLine.getReversedId() == null) {
          UsedMaterialLine reversingLine = new UsedMaterialLine();
          reversingLine.setIdDatabaseBirth(getSrvOrm().getIdDatabase());
          reversingLine.setReversedId(reversedLine.getItsId());
          reversingLine.setItsCost(reversedLine.getItsCost());
          reversingLine.setInvItem(reversedLine.getInvItem());
          reversingLine.setUnitOfMeasure(reversedLine.getUnitOfMeasure());
          reversingLine.setItsQuantity(reversedLine.getItsQuantity().negate());
          reversingLine.setItsTotal(reversedLine.getItsTotal().negate());
          reversingLine.setIsNew(true);
          reversingLine.setItsOwner(pEntity);
          reversingLine.setDescription(getSrvI18n()
            .getMsg("reversed_n", langDef) + reversedLine.getIdDatabaseBirth()
              + "-" + reversedLine.getItsId()); //local
          getSrvOrm().insertEntity(pAddParam, reversingLine);
          reversingLine.setIsNew(false);
          getSrvWarehouseEntry().reverseDraw(pAddParam, reversingLine);
          getSrvUseMaterialEntry().reverseDraw(pAddParam, reversingLine,
            pEntity.getItsDate(), pEntity.getItsId());
          String descr;
          if (reversedLine.getDescription() == null) {
            descr = "";
          } else {
            descr = reversedLine.getDescription();
          }
          reversedLine.setDescription(descr
            + " " + getSrvI18n().getMsg("reversing_n", langDef) + reversingLine
              .getIdDatabaseBirth() + "-" + reversingLine.getItsId());
          reversedLine.setReversedId(reversingLine.getItsId());
          getSrvOrm().updateEntity(pAddParam, reversedLine);
        }
      }
      AdditionCostLine acl = new AdditionCostLine();
      acl.setItsOwner(reversed);
      List<AdditionCostLine> reversedAcl = getSrvOrm().
        retrieveListForField(pAddParam, acl, "itsOwner");
      for (AdditionCostLine reversedLine : reversedAcl) {
        if (reversedLine.getReversedId() == null) {
          AdditionCostLine reversingLine = new AdditionCostLine();
          reversingLine.setIdDatabaseBirth(getSrvOrm().getIdDatabase());
          reversingLine.setReversedId(reversedLine.getItsId());
          reversingLine.setSubaccExpense(reversedLine.getSubaccExpense());
          reversingLine.setSubaccExpenseId(reversedLine.getSubaccExpenseId());
          reversingLine.setSubaccExpenseType(reversedLine
            .getSubaccExpenseType());
          reversingLine.setAccExpense(reversedLine.getAccExpense());
          reversingLine.setItsTotal(reversedLine.getItsTotal().negate());
          reversingLine.setIsNew(true);
          reversingLine.setItsOwner(pEntity);
          reversingLine.setDescription(getSrvI18n()
            .getMsg("reversed_n", langDef) + reversedLine.getIdDatabaseBirth()
              + "-" + reversedLine.getItsId()); //local
          getSrvOrm().insertEntity(pAddParam, reversingLine);
          reversingLine.setIsNew(false);
          String descr;
          if (reversedLine.getDescription() == null) {
            descr = "";
          } else {
            descr = reversedLine.getDescription();
          }
          reversedLine.setDescription(descr
            + " " + getSrvI18n().getMsg("reversing_n", langDef) + reversingLine
              .getIdDatabaseBirth() + "-" + reversingLine.getItsId());
          reversedLine.setReversedId(reversingLine.getItsId());
          getSrvOrm().updateEntity(pAddParam, reversedLine);
        }
      }
    }
    if (pEntity.getIsComplete()) { //need to make warehouse entries
      if (pEntity.getItsCost().doubleValue() <= 0) {
        throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
          "cost_less_or_eq_zero");
      }
      //load or reverse load:
      getSrvWarehouseEntry().load(pAddParam, pEntity,
        pEntity.getWarehouseSite());
    }
  }
496750
@Override
  public final void makeOtherEntries(final Map<String, Object> pAddParam,
    final PrepaymentFrom pEntity, final IRequestData pRequestData,
      final boolean pIsNew) throws Exception {
    // nothing
  }
666132
@Override
  public final void fill(final Map<String, Object> pAddParam,
    final Object pEntity, final String pFieldName,
      final String pFieldStrValue) throws Exception {
    if (SeSeller.class != pEntity.getClass()) {
      throw new ExceptionWithCode(ExceptionWithCode
        .CONFIGURATION_MISTAKE, "It's wrong service to fill that field: "
          + pEntity + "/" + pFieldName + "/" + pFieldStrValue);
    }
    SeSeller seSeller = (SeSeller) pEntity;
    if ("NULL".equals(pFieldStrValue)) {
      seSeller.setUserAuth(null);
      return;
    }
    try {
      UserTomcat ownedEntity = new UserTomcat();
      ownedEntity.setItsUser(pFieldStrValue);
      seSeller.setUserAuth(ownedEntity);
    } catch (Exception ex) {
      throw new ExceptionWithCode(ExceptionWithCode
        .WRONG_PARAMETER, "Can not fill field: " + pEntity + "/" + pFieldName
          + "/" + pFieldStrValue + ", " + ex.getMessage(), ex);
    }
  }
404597
@Override
  public final DatabaseWriterXml<RS> create(
    final Map<String, Object> pAddParam) throws Exception {
    DatabaseWriterXml<RS> dbWriterXmlFullImport = new DatabaseWriterXml<RS>();
    SrvEntityWriterXml srvEntityWriterXml = new SrvEntityWriterXml();
    SrvFieldWriterXmlStd srvFieldWriterXmlStd = new SrvFieldWriterXmlStd();
    srvFieldWriterXmlStd.setUtilXml(this.factoryAppBeans.lazyGetUtilXml());
    SrvFieldHasIdWriterXml srvFieldHasIdWriterXml =
      new SrvFieldHasIdWriterXml();
    srvFieldHasIdWriterXml.setUtilXml(this.factoryAppBeans.lazyGetUtilXml());
    srvEntityWriterXml.setUtlReflection(this.factoryAppBeans
      .lazyGetUtlReflection());
    Map<String, ISrvFieldWriter> fieldsWritersMap =
      new HashMap<String, ISrvFieldWriter>();
    fieldsWritersMap.put("SrvFieldWriterXmlStd", srvFieldWriterXmlStd);
    fieldsWritersMap.put("SrvFieldHasIdWriterXml", srvFieldHasIdWriterXml);
    srvEntityWriterXml.setFieldsWritersMap(fieldsWritersMap);
    srvEntityWriterXml.setMngSettings(this.factoryAppBeans
      .lazyGetMngSettingsGetDbCopy());
    dbWriterXmlFullImport.setLogger(this.factoryAppBeans.lazyGetLogger());
    dbWriterXmlFullImport.setSrvEntityWriter(srvEntityWriterXml);
    dbWriterXmlFullImport.setSrvDatabase(this.factoryAppBeans
      .lazyGetSrvDatabase());
    dbWriterXmlFullImport.setSrvOrm(this.factoryAppBeans.lazyGetSrvOrm());
    return dbWriterXmlFullImport;
  }
107869
@Override
  public final T process(final Map<String, Object> pReqVars,
    final T pEntity, final IRequestData pRequestData) throws Exception {
    SeSeller ses = findSeSeller.find(pReqVars, pRequestData.getUserName());
    pEntity.setSeller(ses);
    T entOld = this.srvOrm.retrieveEntity(pReqVars, pEntity);
    if (!entOld.getSeller().getItsId().getItsId()
      .equals(pEntity.getSeller().getItsId().getItsId())) {
      throw new ExceptionWithCode(ExceptionWithCode.FORBIDDEN,
      "Attempt to delete smb. else's entity: user/entity/EID/SEOLDID/SEID - "
        + pRequestData.getUserName() + "/" + pEntity.getClass()
         .getSimpleName() + "/" + pEntity.getItsId() + "/" + entOld
          .getSeller().getItsId().getItsId() + "/" + pEntity.getSeller()
            .getItsId().getItsId());
    }
    this.srvOrm.deleteEntity(pReqVars, pEntity);
    return null;
  }
461179
@Override
  public final void makeFirstPrepareForSave(final Map<String, Object> pAddParam,
    final Manufacture pEntity,
      final IRequestData pRequestData) throws Exception {
    // Beige-ORM refresh:
    pEntity.setManufacturingProcess(getSrvOrm()
      .retrieveEntity(pAddParam, pEntity.getManufacturingProcess()));
    pEntity.setInvItem(getSrvOrm()
      .retrieveEntity(pAddParam, pEntity.getInvItem()));
    if (!(InvItem.FINISHED_PRODUCT_ID.equals(pEntity.getInvItem()
      .getItsType().getItsId()) || InvItem.MATERIAL_ID
        .equals(pEntity.getInvItem().getItsType().getItsId()))) {
      throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
        "type_must_be_product_material");
    }
    if (pEntity.getItsQuantity().compareTo(pEntity.getManufacturingProcess()
      .getItsQuantity()) > 0) {
      throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
        "source_has_no_enough_item");
    }
    if (!pEntity.getUnitOfMeasure().getItsId().equals(pEntity
      .getManufacturingProcess().getUnitOfMeasure().getItsId())) {
      throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
        "UnitOfMeasure_fiffer_with_source");
    }
    if (pEntity.getItsQuantity().doubleValue() < 0
      && pEntity.getReversedId() == null) {
      throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
        "reversed_manufacture_is_null");
    }
    pEntity.setItsQuantity(pEntity.getItsQuantity().setScale(
      getSrvAccSettings().lazyGetAccSettings(pAddParam).getQuantityPrecision(),
        getSrvAccSettings().lazyGetAccSettings(pAddParam).getRoundingMode()));
    if (pEntity.getReversedId() != null) {
      Manufacture reversed = getSrvOrm().retrieveEntityById(pAddParam,
        Manufacture.class, pEntity.getReversedId());
      if (reversed.getReversedId() != null) {
        throw new ExceptionWithCode(ExceptionWithCode.FORBIDDEN,
          "Attempt to double reverse" + pAddParam.get("user"));
      }
      if (!reversed.getItsQuantity().equals(reversed.getTheRest())) {
        throw new ExceptionWithCode(ExceptionWithCode
          .WRONG_PARAMETER, "where_is_withdrawals_from_this_source");
      }
      reversed.setTheRest(BigDecimal.ZERO);
      getSrvOrm().updateEntity(pAddParam, reversed);
      pEntity.setTheRest(BigDecimal.ZERO);
    } else {
      pEntity.setTheRest(pEntity.getItsQuantity());
    }
    pEntity.setItsCost(pEntity.getManufacturingProcess().getItsCost());
    if (pEntity.getItsQuantity()
      .compareTo(pEntity.getManufacturingProcess().getItsQuantity()) == 0) {
      //to reduce rounding error:
      pEntity.setItsTotal(pEntity.getManufacturingProcess().getItsTotal());
    } else {
      pEntity.setItsTotal(pEntity.getItsCost()
        .multiply(pEntity.getItsQuantity()).setScale(getSrvAccSettings()
          .lazyGetAccSettings(pAddParam).getCostPrecision(), getSrvAccSettings()
            .lazyGetAccSettings(pAddParam).getRoundingMode()));
    }
  }
592031
@Override
  public final void process(final Map<String, Object> pAddParam,
    final IRequestData pRequestData) throws Exception {
    this.srvEntitiesPage.retrievePage(pAddParam, pRequestData);
  }
467462
@Override
  public final SeGoodsSpecifics process(final Map<String, Object> pReqVars,
    final SeGoodsSpecifics pEntity,
      final IRequestData pRequestData) throws Exception {
    SeSeller ses = findSeSeller.find(pReqVars, pRequestData.getUserName());
    pEntity.setSeller(ses);
    pEntity.setSpecifics(getSrvOrm().retrieveEntity(pReqVars,
      pEntity.getSpecifics()));
    if (pEntity.getSpecifics().getChooseableSpecificsType() != null) {
      pEntity.setLongValue2(pEntity.getSpecifics().getChooseableSpecificsType()
        .getItsId());
      pEntity.setStringValue2(pEntity.getSpecifics()
        .getChooseableSpecificsType().getItsName());
    }
    if (pEntity.getIsNew()) {
      this.srvOrm.insertEntity(pReqVars, pEntity);
      pEntity.setIsNew(false);
    } else {
      SeGoodsSpecifics entOld = this.srvOrm.retrieveEntity(pReqVars, pEntity);
      if (!entOld.getSeller().getItsId().getItsId()
        .equals(pEntity.getSeller().getItsId().getItsId())) {
        throw new ExceptionWithCode(ExceptionWithCode.FORBIDDEN,
        "Attempt to update smb. else's entity: user/entity/EID/SEOLDID/SEID - "
          + pRequestData.getUserName() + "/" + pEntity.getClass()
           .getSimpleName() + "/" + pEntity.getItsId() + "/" + entOld
            .getSeller().getItsId().getItsId() + "/" + pEntity.getSeller()
              .getItsId().getItsId());
      }
      this.srvOrm.updateEntity(pReqVars, pEntity);
    }
    return pEntity;
  }
1218142
@Override
  public final void makeFirstPrepareForSave(final Map<String, Object> pAddParam,
    final GoodsLoss pEntity,
      final IRequestData pRequestData) throws Exception {
    // nothing
  }
59544
protected final PrcItSpecEmbFlDel<RS, IHasIdLongVersion, AItemSpecificsId<IHasIdLongVersion>>
    lazyGetPrcItSpecEmbFlDel(final Map<String, Object> pAddParam) throws Exception {
    String beanName = PrcItSpecEmbFlDel.class.getSimpleName();
    @SuppressWarnings("unchecked")
    PrcItSpecEmbFlDel<RS, IHasIdLongVersion, AItemSpecificsId<IHasIdLongVersion>> proc =
      (PrcItSpecEmbFlDel<RS, IHasIdLongVersion, AItemSpecificsId<IHasIdLongVersion>>)
        this.processorsMap.get(beanName);
    if (proc == null) {
      proc = new PrcItSpecEmbFlDel<RS, IHasIdLongVersion, AItemSpecificsId<IHasIdLongVersion>>();
      proc.setSrvOrm(getSrvOrm());
      proc.setUploadDirectory(getUploadDirectory());
      proc.setWebAppPath(getWebAppPath());
      //assigning fully initialized object:
      this.processorsMap.put(beanName, proc);
      this.logger.info(null, FctBnTradeEntitiesProcessors.class, beanName + " has been created.");
    }
    return proc;
  }
405128
@Override
  public final void addCheckIsReadyToAccount(
    final Map<String, Object> pAddParam,
      final ManufacturingProcess pEntity,
        final IRequestData pRequestData) throws Exception {
    if (!pEntity.getIsComplete()) {
      throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
        "manufacturing_must_be_completed");
    }
  }