Package cli_fmw.main

Examples of cli_fmw.main.ClipsException


        int[] cc = parseCode(code);

        if (isActual(code)) {//только для актуальных
            if (cc[0] == 0) {
                throw new ClipsException("Неверный код объекта: " + code);
            }

            //определяем уровень и код
            item.kladrCode = new KladrCode(cc);
            //оставляем только код родителя
            for (int level = code_section_count - 1; level >= 0; level--) {
                if (cc[level] > 0) {
                    itemLevel = level + 1;
                    cc[level] = 0;
                    break;
                }
            }
            KladrCode parentCode = new KladrCode(cc);

            //set type by abbrivation and level
            DirectoryKladrTypeItem type = kladrTypes.get(abbr + itemLevel);
            if (type == null) {
                throw new ClipsException("Неизвестный тип адресуемого объекта (abbrivation: " + abbr + " level: " + itemLevel + "), обновите файл сокращений");
            }
            item.typeId = type.getID();

            Set<KladrItem> childrenFromMap = notAddedYet.get(item.kladrCode);    //add children from 'needParent' map
            if (childrenFromMap != null) {
View Full Code Here


    public void logout() throws ClipsException {
        try {
            instance = null;
            getLoginBean().logout(securityData.sessionId);
        } catch (Exception ex) {
            throw new ClipsException("Logout failed", ex);
        }
    }
View Full Code Here

        }
    }

    protected static SessionSecurityDetails tryLogin(Object aCollaboratorID, char[] aPassword) throws Exception {
        if (get() != null) {
            throw new ClipsException("Внутренняя ошибка: попытка зарегистрировать сессию во второй раз.");
        }
        LoginRemoteAbstarct loginBean = getLoginBean();
        int sessId = loginBean.login(aCollaboratorID,
                loginBean.getEncryptor().encryptPasswd(aPassword));
        return loginBean.getSessionRemote(sessId);
View Full Code Here

                /*try {
                    str += " (" + this.toString() + ")";
                } catch (Exception ex2) {
                    ex2.printStackTrace();
                }*/
                throw new ClipsException(str, ex1);
            }
        }
        detailsOriginal = (DETAILSTYPE) details.clone();
        initializedID = details.getId();
    }
View Full Code Here

  }
 
    final public void remove() throws ClipsException {
        if (! UserInfoAbstract.get().isSuperUser()){
            if (!canRemove()){
                throw new ClipsException("У вас нет прав для удаления объекта " + understandableName);
            }
        }

        int auditcount = auditDetailsList.size();
        try {
            ModificationInfo remove = getBean().remove();
      afterRemove();
            auditDetailsList.addAll(remove.getAudit());

        } catch (Exception ex) {
            try {
                clearBean();
                ModificationInfo audit = getBean().remove();
                auditDetailsList.addAll(audit.getAudit());
                afterRemove();
            } catch (Exception ex1) {
                clearBean();
                throw new ClipsException("Не удалось удалить объект \'" + understandableName + "\' (" + this.toString() + ")", ex1);
            }
        }
        if(auditcount != auditDetailsList.size()) {
            fireAuditEvent();
        }
View Full Code Here

                detailsOriginal = (DETAILSTYPE) details.clone();
                auditDetailsList.addAll(modificationInfo.getAudit());
            }
        } catch (Exception ex) {
            clearBean();
            throw new ClipsException("Не удалось сохранить объект \'"+ understandableName +"\' (" + this.toString()+")", ex);
        }
        edm.saveExtraCache();
        fireContentStateEvent();
        if(auditcount != auditDetailsList.size()) {
            fireAuditEvent();
View Full Code Here

                beanRights = bean.initByID(initializedID, UserInfoAbstract.get().getSessionId());
                understandableName = bean.getEntityName();
                /*System.out.println("Initialized bean " + getBeanName() + "\n"
                    + beanRights.toString());                */
            } catch (Exception ex) {
                throw new ClipsException("Элемент ("+ DelegateLine2.this.getClass().getSimpleName()
                        +") с ID = " + initializedID + " отсутствует в базе",ex);
            }
        }
View Full Code Here

    protected void appendDB(ITEM item) throws ClipsException {
        try{
            item.getDetails().parentItem = getID();
            getDirectory().appendDB(item);
        }catch(Exception ex){
            throw new ClipsException("Не удалось добвавить элемент в справочник", ex);
        }
    }
View Full Code Here

        try {
            itemDirectory.getBean().get().update(details);
            setDetails(details);
        } catch (Exception ex) {
            itemDirectory.getBean().clear();
            throw new ClipsException("Ошибка при сохранении элемента справочника", ex);                       
        }
    } 
View Full Code Here

            out.println("Обновление завершено");
            out.println("Локальное время : " + new Date());
            out.flush();
            out.close();
        } catch (FileNotFoundException ex) {
            throw new ClipsException("Не удалось создать файл " + f.getAbsolutePath(), ex);
        } finally {
            out.close();
        }
    }
View Full Code Here

TOP

Related Classes of cli_fmw.main.ClipsException

Copyright © 2018 www.massapicom. 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.