Examples of ErrorList


Examples of clips.administrator.register.ErrorList

            DirectoryDvr dirDvr = DirectoryLocator.getDirectory(DirectoryDvr.class);
            DirectoryDiagnosisEncounter dirDiagEnc = DirectoryLocator.getDirectory(DirectoryDiagnosisEncounter.class);
            DirectoryMedicalAidType dirVmu = DirectoryLocator.getDirectory(DirectoryMedicalAidType.class);
            DirectoryVisitingPurpose dirVisPurp = DirectoryLocator.getDirectory(DirectoryVisitingPurpose.class);

            ErrorList target = new ErrorList();
            count = 0;
            for (RegisterData data : list) {
                if (!needWrite(data)) {
                    continue;
                }
                int id = data.id;

                //ID
                lf.id.put(id, target, data.uuid);
                //System.out.println("Запись посещения id = " + id);

                //HISTORY
                if (data.history.trim().isEmpty()) {
                    target.add(id, "Номер мед. карты не указан", ErrorList.CLIENT_ERROR);
                }
                lf.history.put(id, target, data.history);

                //FAM
                if (data.fam == 0) {
                    target.add(id, "Фамилия не указана", ErrorList.CLIENT_ERROR);
                    lf.fam.put(id, target, "");
                } else {
                    String surname = dirSurname.getItemFromID(data.fam).getTitle();
                    if (surname.trim().isEmpty()) {
                        target.add(id, "Фамилия пустая", ErrorList.CLIENT_ERROR);
                    }
                    lf.fam.put(id, target, surname);
                }

                //NAM
                if (data.nam == 0) {
                    target.add(id, "Имя не указано", ErrorList.CLIENT_ERROR);
                    lf.nam.put(id, target, "");
                } else {
                    String name = dirName.getItemFromID(data.nam).getTitle();
                    if (name.trim().isEmpty()) {
                        target.add(id, "Имя пустое", ErrorList.CLIENT_ERROR);
                    }
                    lf.nam.put(id, target, name);
                }

                //FNAM
                if (data.fnam == 0) {
                    target.add(id, "Отчество не указано", ErrorList.CLIENT_ERROR);
                    lf.fnam.put(id, target, "-");
                } else {
                    String patron = dirPatron.getItemFromID(data.fnam).getTitle();
                    if (patron.trim().isEmpty()) {
                        target.add(id, "Отчество пустое", ErrorList.CLIENT_ERROR);
                        patron = "-";
                    }
                    lf.fnam.put(id, target, patron);
                }

                //POL_SER
                lf.pol_ser.put(id, target, data.pol_ser);

                //POL_NUM
                if (data.pol_num.equals("0000000000000000")) {
                    target.add(id, "Полис фиктивный", ErrorList.CLIENT_ERROR);
                }
                lf.pol_num.put(id, target, data.pol_num);

                //BDAY
                if (data.bday == null) {
                    target.add(id, "Дата рождения не указана", ErrorList.CLIENT_ERROR);
                    lf.bday.put("");
                } else {
                    Calendar cal = Calendar.getInstance();
                    cal.setTime(data.bday);
                    lf.bday.put(cal);
                }

                //SEX
                if (data.sex == 0) {
                    target.add(id, "Пол не указан", ErrorList.CLIENT_ERROR);
                }
                lf.sex.put(data.sex);

                //STATUS
                if (data.status == 0) {
                    target.add(id, "Социальный статус не указан", ErrorList.CLIENT_ERROR);
                    lf.status.put(0);
                } else {
                    try {
                        String extKey = dirStatus.getItemFromID(data.status).getExtKey();
                        lf.status.put(Integer.parseInt(extKey));
                    } catch (NumberFormatException ex) {
                        target.add(id, "Код социального статуса должен быть числом", ErrorList.CLIENT_ERROR);
                        lf.status.put(0);
                    }

                }

                //PRED
                lf.pred.put(data.pred);

                //P_STATUS
                if (data.p_status == 0) {
                    lf.p_status.put("");
                } else {
                    lf.p_status.put(data.p_status);
                }

                //P_FAM
                if (data.p_fam == 0) {
                    lf.p_fam.put(id, target, "");
                } else {
                    lf.p_fam.put(id, target, dirSurname.getItemFromID(data.p_fam).getTitle());
                }

                //P_NAM
                if (data.p_nam == 0) {
                    lf.p_nam.put(id, target, "");
                } else {
                    lf.p_nam.put(id, target, dirName.getItemFromID(data.p_nam).getTitle());
                }

                //P_FNAM
                if (data.p_fnam == 0) {
                    lf.p_fnam.put(id, target, "");
                } else {
                    lf.p_fnam.put(id, target, dirPatron.getItemFromID(data.p_fnam).getTitle());
                }

                //C_OKSM
                if (data.c_oksm.trim().isEmpty()) {
                    target.add(id, "Гражданство не указано", ErrorList.CLIENT_ERROR);
                }
                lf.oksm.put(id, target, data.c_oksm);

                //DOC_TYPE
                if (data.type_doc == 0) {
                    lf.doc_type.put(0);
                } else {
                    try {
                        String extKey = dirDocType.getItemFromID(data.type_doc).getExtKey();
                        lf.doc_type.put(Integer.parseInt(extKey));
                    } catch (NumberFormatException ex) {
                        target.add(id, "Код социального статуса должен быть числом", ErrorList.CLIENT_ERROR);
                        lf.doc_type.put(0);
                    }
                }

                //DOC_SER
                lf.doc_ser.put(id, target, data.doc_ser);

                //DOC_NUM
                lf.doc_num.put(id, target, data.doc_num);

                //INS_ID_AR
                if (data.ins_id_ar == 0) {
                    lf.ins_id_ar.put("0");
                } else {
                    try {
                        String extKey = dirRegCode.getItemFromID(data.ins_id_ar).getExtKey();
                        lf.ins_id_ar.put(Integer.parseInt(extKey));
                    } catch (NumberFormatException ex) {
                        target.add(id, "ИД территории страховой организации должен быть числом", ErrorList.CLIENT_ERROR);
                        lf.ins_id_ar.put("");
                    }
                }

                //INS_ORG
                String arExtKey = dirRegCode.getItemFromID(data.ins_id_ar).getExtKey();
                DirectoryInsurerItem insurer = dirInsurer.getItemFromID(data.id_ins_org);
                if (!arExtKey.equals(RegisterBean.REGION_CODE) && !insurer.getExtKey().isEmpty()) {
                    lf.ins_org.put(id, target, "");
                } else if (data.pol_num.isEmpty() && insurer.getExtKey() != null && !insurer.getExtKey().isEmpty()) {
                    lf.ins_org.put(id, target, "");
                } else {
                    lf.ins_org.put(id, target, insurer.getTitle());
                }

                if (!arExtKey.equals(RegisterBean.REGION_CODE)
                        && lf.ins_org.get().trim().isEmpty()) {
                    target.add(id, "Для инотерриториального больного не указан филиал ФОМС", ErrorList.CLIENT_ERROR);
                }

                //INS_ID
                try {
                    String extKey = insurer.getExtKey();
                    if (!arExtKey.equals(RegisterBean.REGION_CODE) && !insurer.getExtKey().isEmpty()) {
                        lf.ins_id.put("");
                    } else if (data.pol_num.isEmpty() && extKey != null && !extKey.isEmpty()) {
                        lf.ins_id.put("0");
                    } else if (extKey == null || extKey.isEmpty()) {
                        lf.ins_id.put("");
                    } else {
                        lf.ins_id.put(Integer.parseInt(extKey));
                    }
                } catch (NumberFormatException ex) {
                    target.add(id, "ИД страховой организации должен быть числом", ErrorList.CLIENT_ERROR);
                    lf.ins_id.put("");
                }

                //KLADR
                lf.kladr.put(id, target, data.kladr);

                //AREA
                DirectoryKladrItem area = dirKladr.getItemFromID(data.area);
                if (area != null) {
                    lf.area.put(id, target, area.getTitle());
                } else {
                    lf.area.put(id, target, "");
                }

                //REGION
                lf.region.put(id, target, data.region);

                //REG_CITY
                if (data.region.trim().toUpperCase().equals("УФА") && data.reg_city.isEmpty()) {
                    target.add(id, "Неполный адрес: отсутствует район г. Уфа", ErrorList.CLIENT_ERROR);
                }
                lf.reg_city.put(id, target, data.reg_city);

                //ITEM
                lf.item.put(id, target, data.item);

                //TYPE_ITEM
                DirectoryKladrTypeItem typeItem = dirKladrType.getItemFromID(data.type_item);
                if (typeItem == null) {
                    lf.type_item.put("");
                } else {
                    try {
                        String extKey = typeItem.getExtKey();
                        if (extKey == null || extKey.isEmpty()) {
                            lf.type_item.put("");
                        } else {
                            lf.type_item.put(Integer.parseInt(extKey));
                        }
                    } catch (NumberFormatException ex) {
                        target.add(id, "Код типа населенного пункта должен быть числом", ErrorList.CLIENT_ERROR);
                        lf.type_item.put("");
                    }
                }

                //TYPE_UL
                if (data.type_ul == 0) {
                    lf.type_ul.put("");
                } else {
                    lf.type_ul.put(data.type_ul);
                }

                //STREET
                lf.street.put(id, target, data.street);

                //HOUSE
                try {
                    if (data.house.isEmpty()) {
                        lf.house.put("");
                    } else {
                        lf.house.put(Integer.parseInt(data.house));
                    }
                } catch (NumberFormatException ex) {
                    target.add(id, "Номер дома должен быть числом", ErrorList.CLIENT_ERROR);
                    lf.house.put("");
                }

                //LITER
                if (data.liter.length() > 1) {
                    try {
                        Integer.parseInt(data.liter);
                    } catch (NumberFormatException ex) {
                        target.add(id, "Буква дома имеет неправильный формат : " + data.liter, ErrorList.CLIENT_ERROR);
                    }
                }
                lf.liter.put(id, target, data.liter);

                //FLAT
                if (data.flat.equals("0")) {
                    lf.flat.put(id, target, "");
                } else {
                    lf.flat.put(id, target, data.flat);
                }

                //WORK
                if (data.is_ext != 0) {
                    lf.work.put(id, target, data.work);
                } else {
                    lf.work.put(id, target, "");
                }

                //DATE_BEGIN
                Calendar cal = Calendar.getInstance();
                cal.setTime(data.date_begin);
                lf.date_begin.put(cal);
                //DATE_END
                lf.date_end.put("");
                //MES
                if (!Pattern.matches("[0-9]{6}",data.mes)) {
                    target.add(id, "Неправильный код посещения");
                }
                lf.mes.put(id, target, data.mes);

                //UKL
                //Для поликлиник не заполняется
                lf.ukl.put("");

                //OUT
                if (data.out == 0) {
                    target.add(id, "Не указан исход лечения");
                    lf.out.put("");
                } else {
                    try {
                        DirectoryDiseaseResultItem item = dirDisResult.getItemFromID(data.out);
                        lf.out.put(Integer.parseInt(item.getExtKey()));
                    } catch (NumberFormatException ex) {
                        target.add(id, "Исход лечения должен быть числом");
                        lf.out.put("");
                    }
                }

                //FLAG
                lf.flag.put(id, target, "");

                //MKB
                if (data.mkb.isEmpty()) {
                    target.add(id, "Отсутствует диагноз");
                }
                lf.mkb.put(id, target, data.mkb);

                //MKB_S
                lf.mkb_s.put(id, target, data.mkb_s);

                //INN
                lf.inn.put(id, target, data.inn);

                //MU
                lf.mu.put(data.c_mu);

                //KMU
                lf.kmu.put(data.k_mu / 100.0);

                //SS
                lf.ss.put(id, target, data.ss);

                //SSD
                lf.ssd.put(id, target, data.ssd);

                //VR_SPEC
                if (data.vr_spec == 0) {
                    target.add(id, "Не указан код специальности врача");
                    lf.vr_spec.put("");
                } else {
                    try {
                        DirectoryReceptionTypeItem item = dirRecType.getItemFromID(data.vr_spec);
                        lf.vr_spec.put(Integer.parseInt(item.getExtKey()));
                    } catch (NumberFormatException ex) {
                        target.add(id, "Код специальности врача должен быть числом");
                        lf.vr_spec.put("");
                    }
                }

                //VR_DOL
                if (data.vr_dol == 0) {
                    //target.add(id, "Не указан код должности врача");
                    lf.vr_dol.put(0);
                } else {
                    try {
                        DirectoryDvrItem item = dirDvr.getItemFromID(data.vr_dol);
                        lf.vr_dol.put(Integer.parseInt(item.getExtKey()));
                    } catch (NumberFormatException ex) {
                        target.add(id, "Код должности врача должен быть числом");
                        lf.vr_dol.put("");
                    }
                }

                //QZ
                if (data.qz == 0) {
                    target.add(id, "Не указан код характера заболевания");
                    lf.qz.put("0");
                } else {
                    try {
                        DirectoryDiagnosisEncounterItem item = dirDiagEnc.getItemFromID(data.qz);
                        int qz = Integer.parseInt(item.getExtKey());
                        /* Не знаю почему, но у них в отчетах характер заболевания
                         * на 1 меньше чем в базе.
                         * К примеру код 1 - здоров в отчет идет как 0
                         * (у них это в ТАЛ2008. У АММовской проги вообще не заполняется)
                         */
                        lf.qz.put(qz - 1);
                    } catch (NumberFormatException ex) {
                        target.add(id, "Код характера заболевания должен быть числом");
                        lf.qz.put("");
                    }
                }

                //VMU
                if (data.vmu == 0) {
                    target.add(id, "Не указан вид первичной медико-санитарной помощи");
                    lf.vmu.put("");
                } else {
                    try {
                        DirectoryMedicalAidTypeItem item = dirVmu.getItemFromID(data.vmu);
                        lf.vmu.put(Integer.parseInt(item.getExtKey()));
                    } catch (NumberFormatException ex) {
                        target.add(id, "Вид первичной медико-санитарной помощи должен быть числом");
                        lf.vmu.put("");
                    }
                }

                //D_LISTIN
View Full Code Here

Examples of clips.administrator.register.ErrorList

    }

    public ErrorList fillPersonInfo(List<PersonalData> list) throws xBaseJException, IOException, ClipsException {
        try {
            createPersonInfo();
            ErrorList errorList = new ErrorList();

            for (PersonalData person : list) {

                //ID
                int id = person.id;

                //SNILS
                String snils = person.snils;
                if (snils == null || snils.isEmpty()) {
                    errorList.add(id, "Не указан СНИЛС", ErrorList.CLIENT_ERROR);
                }
                else {
                    personF.snils.put(id, errorList, snils);
                }

                //POLIS_SN
                String polisSN = person.polisSN;
                if (polisSN == null || polisSN.isEmpty()) {
                    errorList.add(id, "Не указаны серия, номер полиса ОМС", ErrorList.CLIENT_ERROR);
                }
                else {
                    personF.polisSN.put(id, errorList, polisSN);
                }

                //SURNAME
                String surname = person.surname;
                if (surname == null || surname.isEmpty()) {
                    errorList.add(id, "Не указана фамилия пациента", ErrorList.CLIENT_ERROR);
                }
                else {
                    personF.surname.put(id, errorList, surname);
                }

                //NAME
                String name = person.name;
                if (name == null || name.isEmpty()) {
                    errorList.add(id, "Не указано имя пациента", ErrorList.CLIENT_ERROR);
                }
                else {
                    personF.name.put(id, errorList, name);
                }

                //PATHRONYMIC
                String pathronymic = person.pathronymic;
                if (pathronymic == null || pathronymic.isEmpty()) {
                    errorList.add(id, "Не указано отчество пациента", ErrorList.CLIENT_ERROR);
                }
                else {
                    personF.pathronymic.put(id, errorList, pathronymic);
                }

                //SEX
                char sex = person.sex;
                if (sex == Character.MIN_VALUE) {
                    errorList.add(id, "Не указан пол пациента", ErrorList.CLIENT_ERROR);
                }
                else {
                    personF.sex.put(id, errorList, Character.toString(sex));
                }

                //BORN_DATE
                Date bornDate = person.bornDate;
                if (bornDate ==  null) {
                    errorList.add(id, "Не указана дата рождения пациента", ErrorList.CLIENT_ERROR);
                    personF.bornDate.put("");
                }
                else {
                    Calendar cal = Calendar.getInstance();
                    cal.setTime(bornDate);
                    personF.bornDate.put(cal);
                }

                //EXEMPTION_CODE
                String exemptionID = person.exemptionID;
                if (exemptionID == null || exemptionID.isEmpty()) {
                    errorList.add(id, "Не указан код категории льготности", ErrorList.CLIENT_ERROR);
                }
                else {
                    personF.exemCode.put(id, errorList, exemptionID);
                }

                //DOCUMENT_SN
                String docSN = person.docSN;
                if (docSN == null || docSN.isEmpty()) {
                    errorList.add(id, "Не указаны серия, номер документа, удостоверяющего личность", ErrorList.CLIENT_ERROR);
                }
                else {
                    personF.docSN.put(id, errorList, docSN);
                }

                //DOCUMENT_TYPE
                String docTypeID = person.docTypeID;
                if (docTypeID == null || docTypeID.isEmpty()) {
                    errorList.add(id, "Не указан тип документа, удостоверяющего личность", ErrorList.CLIENT_ERROR);
                }
                else {
                    try {
                        Integer docType = Integer.parseInt(docTypeID);
                        personF.docType.put(docType);
                    } catch (NumberFormatException ex) {
                        errorList.add(id, "Код типа документа должен быть числом", ErrorList.CLIENT_ERROR);
                        personF.docType.put(0);
                    }
                }

                //OKATO__OMC
                int okatoOmc = person.okatoOMC;
                if (okatoOmc == Integer.MIN_VALUE) {
                    errorList.add(id, "Не указан код территории страхования по ОМС по ОКАТО", ErrorList.CLIENT_ERROR);
                }
                else {
                    personF.okatoOMC.put(okatoOmc);
                }

                //TODO ОГРН СМО

                //OKATO_REG
                int okatoReg = person.okatoReg;
                if (okatoReg == Integer.MIN_VALUE) {
                    errorList.add(id, "Не указан код территории постоянной регистрации пациента (ОКАТО)", ErrorList.CLIENT_ERROR);
                }
                else {
                    personF.okatoReg.put(okatoReg);
                }
View Full Code Here

Examples of clips.administrator.register.ErrorList

    }

    public ErrorList fillRecipeInfo(List<RecipeData> list) throws xBaseJException, IOException, ClipsException {
        try {
            createRecipeInfo();
            ErrorList errorList = new ErrorList();

            for (RecipeData recipe : list) {

                //ID
                int id = recipe.id;

                //SNILS
                String snils = recipe.snils;
                if (snils == null || snils.isEmpty()) {
                    errorList.add(id, "Не указан СНИЛС", ErrorList.CLIENT_ERROR);
                }
                else {
                    recipeF.snils.put(id, errorList, snils);
                }

                //LPU_TFOMS_CODE
                String lpuTFOMSCode = recipe.lpuTFOMScode;
                if (lpuTFOMSCode == null || lpuTFOMSCode.isEmpty()) {
                    errorList.add(id, "Не указан код ЛПУ в кодировке ТФОМС", ErrorList.CLIENT_ERROR);
                }
                else {
                    recipeF.lpuTFOMScode.put(id, errorList, lpuTFOMSCode);
                }

                //EXEMPTION_CODE
                String exemptionID = recipe.exemptionID;
                if (exemptionID == null || exemptionID.isEmpty()) {
                    errorList.add(id, "Не указан код категории льготности", ErrorList.CLIENT_ERROR);
                }
                else {
                    recipeF.exemCode.put(id, errorList, exemptionID);
                }

                //POLIS_SN
                String polisSN = recipe.polisSN;
                if (polisSN == null || polisSN.isEmpty()) {
                    errorList.add(id, "Не указаны серия, номер полиса ОМС", ErrorList.CLIENT_ERROR);
                }
                else {
                    recipeF.polisSN.put(id, errorList, polisSN);
                }

                //LPU_OGRN
                String lpuOGRN = recipe.lpuOGRN;
                if (lpuOGRN == null || lpuOGRN.isEmpty()) {
                    errorList.add(id, "Не указан ОГРН ЛПУ", ErrorList.CLIENT_ERROR);
                }
                else {
                    recipeF.lpuOGRN.put(id, errorList, lpuOGRN);
                }

                //COLLABORATOR_CODE
                String collabCode = recipe.collabCode;
                if (collabCode == null || collabCode.isEmpty()) {
                    errorList.add(id, "Не указан идентификационный код врача");
                }
                else {
                    recipeF.collCode.put(id, errorList, collabCode);
                }

                //MKB_CODE
                String mkbCode = recipe.mkbCode;
                if (mkbCode == null || mkbCode.isEmpty()) {
                    errorList.add(id, "Не указан МКБ-код заболевания (диагноз)");
                }
                else {
                    recipeF.mkbCode.put(id, errorList, mkbCode);
                }

                //RECIPE_SN
                String recipeSN = recipe.recipeSN;
                if (recipeSN == null || recipeSN.isEmpty()) {
                    errorList.add(id, "Не указаны серия, номер рецепта");
                }
                else {
                    recipeF.recipeSN.put(id, errorList, recipeSN);
                }

                //RECIPE_DATE
                Date recipeDate = recipe.recipeDate;
                if (recipeDate ==  null) {
                    errorList.add(id, "Не указана дата выписки рецепта");
                    recipeF.recipeDate.put("");
                }
                else {
                    Calendar cal = Calendar.getInstance();
                    cal.setTime(recipeDate);
                    recipeF.recipeDate.put(cal);
                }

                //FINANCE_SOURCE
                int financeSource = recipe.financeSource;
                if (financeSource == 0) {
                    errorList.add(id, "Не указан источник финансирования");
                }
                else {
                    recipeF.financeSource.put(financeSource);
                }
               
                //PERCENT
                int percent = recipe.percent;
                recipeF.percent.put(percent);
               
                //MNN & TRADE_NAME
                String mnn = recipe.mnn;
                if (mnn == null || mnn.isEmpty()) {
                    String trn = recipe.trn;
                    if (trn == null || trn.isEmpty()) {
                        errorList.add(id, "Не указаны коды ЛС ни по МНН, ни по торговому наименованию");
                    }
                    else {
                        try {
                            recipeF.trn.put(Integer.parseInt(trn));
                        } catch (NumberFormatException ex) {
                            errorList.add(id, "Код ЛС по торговому наименованию должен быть числом");
                            recipeF.trn.put(0);
                        }
                    }
                }
                else {
                    try {
                        recipeF.mnn.put(Integer.parseInt(mnn));
                    } catch (NumberFormatException ex) {
                        errorList.add(id, "Код ЛС по МНН должен быть числом");
                        recipeF.mnn.put(0);
                    }
                }

                //DOSAGE_FORM
                String dosageForm = recipe.dosageForm;
                if (dosageForm != null && !dosageForm.isEmpty()) {
                    try {
                        recipeF.dosForm.put(Integer.parseInt(dosageForm));
                    } catch (NumberFormatException ex) {
                        errorList.add(id, "Код лекарственной формы должен быть числом");
                        recipeF.dosForm.put(0);
                    }
                }
                else {
                    recipeF.dosForm.put(0);
                }

                //DOSAGE
                String dosage = recipe.dosage;
                if (dosage == null || dosage.isEmpty()) {
                    errorList.add(id, "Не указана дозировка");
                }
                else {
                    recipeF.dosage.put(id, errorList, dosage);
                }

                //DOSAGE_UNIT
                String dosageUnit = recipe.dosageUnit;
                if (dosageUnit == null || dosageUnit.isEmpty()) {
                    errorList.add(id, "Не указан код единицы измерения дозировки");
                }
                else {
                    try {
                        recipeF.dosUnit.put(Integer.parseInt(dosageUnit));
                    } catch (NumberFormatException ex) {
                        errorList.add(id, "Код единицы измерения дозировки должен быть числом");
                        recipeF.dosUnit.put(0);
                    }
                }

                //QUANTITY
                double quantity = recipe.quantity;
                recipeF.quantity.put(quantity);

                //PERIOD
                int period = recipe.period;
                if (period == 0) {
                    errorList.add(id, "Не указан срок действия рецепта");
                }
                else {
                    recipeF.period.put(period);
                }
View Full Code Here

Examples of nl.clockwork.mule.ebms.model.ebxml.ErrorList

      GregorianCalendar timestamp = new GregorianCalendar();

      EbMSMessage msg = (EbMSMessage)message.getPayload();
      MessageHeader messageHeader = EbMSMessageUtils.createMessageHeader(msg.getMessageHeader(),hostname,timestamp,EbMSMessageType.MESSAGE_ERROR.action());
     
      ErrorList errorList = new ErrorList();

      errorList.setVersion(Constants.EBMS_VERSION);
      errorList.setMustUnderstand(true);
      errorList.setHighestSeverity(SeverityType.ERROR);

      Error error = (Error)message.getProperty(Constants.EBMS_ERROR);
      if (error == null)
        EbMSMessageUtils.createError(Constants.EbMSErrorLocation.UNKNOWN.location(),Constants.EbMSErrorCode.UNKNOWN.errorCode(),"An unknown error occurred!");
      errorList.getError().add(error);
     
      message.setPayload(new EbMSMessageError(messageHeader,errorList));
      return message;
    }
    catch (DatatypeConfigurationException e)
View Full Code Here

Examples of org.eclipse.wst.wsi.internal.core.util.ErrorList

    TestAssertion testAssertion,
    EntryContext entryContext)
    throws WSIException
  {
    result = AssertionResult.RESULT_PASSED;
    ErrorList errorList = new ErrorList();

    // Get the types from the entry context
    Types types = (Types) entryContext.getEntry().getEntryDetail();

    if (types != null)
    {
      ExtensibilityElement extElement;
      List extElements = types.getExtensibilityElements();

      // Process each ext. element
      for (int i = 0; i < extElements.size(); i++)
      {
        // If it is an unknown ext. element and it is a schema, then check it
        if ((extElement = (ExtensibilityElement) extElements.get(i))
          instanceof Schema)
        {
          if (!extElement.getElementType().equals(WSITag.ELEM_XSD_SCHEMA))
          {
            // If it is not a schema definition, then it is an error
            errorList.add(
              extElement.getElementType().toString()
                + " can not be a child of the wsdl:types element.");
          }
        }
      }
    }

    // If XMLSchemaValidator could not find any errors, check errors from the inline schema validator
    if (errorList.isEmpty())
      errorList.add(validator.wsdlDocument.getSchemasValidationErrors());

    if (!errorList.isEmpty())
    {
      result = AssertionResult.RESULT_FAILED;
      failureDetail = this.validator.createFailureDetail(errorList.toString(), entryContext);
    }

    return validator.createAssertionResult(testAssertion, result, failureDetail);
  }
View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

         * @param product
         * @return
         * @throws AppException
         */
        public ErrorList create(Product product) throws AppException {
                ErrorList errorList = new ErrorList();

                ProductSet productSet = null;
                try {
                        productSet = list(product.getProductID());
                } catch (AppException ex) {
                        errorList.addError("[ProductManager::create]", ex.getMessage());
                }

                if (productSet != null) {
                        if (productSet.length() != 0) {
                                //means product code is exist, do not allow duplicate product code
                                errorList.addError(MEMBER_DUPLICATE_ENTRY);
                                return errorList;
                        }
                }

                try {
View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

                return errorList;
        }

        public ErrorList update(Product newCategory, Product oldCategory) {
                ErrorList errorList = new ErrorList();
                return errorList;
        }
View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

                ErrorList errorList = new ErrorList();
                return errorList;
        }

        public ErrorList delete(Product product) throws AppException {
                ErrorList errorList = new ErrorList();
                return errorList;
        }
View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

                ErrorList errorList = new ErrorList();
                return errorList;
        }

        public ErrorList delete(String productID) throws AppException {
                ErrorList errorList = new ErrorList();
                return errorList;
        }
View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

         * @param product
         * @return
         * @throws AppException
         */
        public ErrorList create(Product product) throws AppException {
                ErrorList errorList = new ErrorList();

                ProductSet productSet = null;
                try {
                        productSet = list(product.getProductID());
                } catch (AppException ex) {
                        errorList.addError("[ProductManager::create]", ex.getMessage());
                }

                if (productSet != null) {
                        if (productSet.length() != 0) {
                                //means product code is exist, do not allow duplicate product code
                                errorList.addError(MEMBER_DUPLICATE_ENTRY);
                                return errorList;
                        }
                }

                try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.