Package cn.com.exceptions

Examples of cn.com.exceptions.AppException


        Class<?> clazz = null;
        try {
            clazz = Class.forName(className);
        } catch (ClassNotFoundException ex) {
            throw new AppException(BricksMessagesCodes._E00006, ex, className);
        }

        return instance(clazz, ".", "", null);
    }
View Full Code Here


     */
    public static void copyField(Object dist, Object source) throws AppException {

        // 目标不能为空
        if (dist == null) {
            throw new AppException(BricksMessagesCodes._E00014);
        }
        // 源不能为空
        if (source == null) {
            throw new AppException(BricksMessagesCodes._E00013);
        }

        List<Field> distFields = TypeContentRefecter.getAllFields(dist.getClass());
        if (distFields != null) {
            Object value = null;
View Full Code Here

            converted = this.convertStringToBigDecimal(value);
        } else if (clazz.equals(Date.class)) {
            try {
                converted = this.convertStringToDate(value, partten);
            } catch (ParseException ex) {
                throw new AppException(BricksMessagesCodes._E00007, ex);
            }
        } else {
            converted = value;
        }
        return converted;
View Full Code Here

                        break;
                }

                return rValue;
            } catch (ParseException ex) {
                throw new AppException("E00005", ex);
            }
        }
View Full Code Here

            if (element != null) {
                switch (element.type()) {
                    case DATE:
                        if (element.format().type() != FormatType.DATE) {
                            throw new AppException("E00001");
                        }

                        break;
                    case DATE_TIME:
                        if (element.format().type() != FormatType.TIME) {
                            throw new AppException("E00001");
                        }
                        break;
                    case LINK:
                        if (element.link().url() == null) {
                            throw new AppException("E00004");
                        }
                        break;
                    case SELECT:
                        if (element.source() == null) {
                            throw new AppException("E00003");
                        }
                        break;
                    default:
                        break;
View Full Code Here

    @Override
    public void check(String className, String operat) throws AppException {


        if (!validate(className, operat)) {
            throw new AppException(BricksMessagesCodes._E00012, operat);
        }

    }
View Full Code Here

     * @throws AppException
     */
    public static Process getProcess(String node) throws AppException {

        if (!BricksCacheManager.INSTANCE.containsKeyInCache(_CACHE_NAME, node)) {
            throw new AppException("E00008", node);
        }

        return (Process) BricksCacheManager.INSTANCE.getValue(_CACHE_NAME, node);
    }
View Full Code Here

        String returnValue = null;
        try {
            //通过节点名得到该节点的处理类
            Process nodeProcess = ProcessFactory.getProcess(nodeName);
            if (!(nodeProcess instanceof InitiationProcess)) {
                throw new AppException("E1200000", nodeName);
            }
            // 创建任务
            Task task = ((InitiationProcess) nodeProcess).createTask();
            processData.setTask(task);
            //任务注册到缓存中
View Full Code Here

        String result = null;
        boolean capured = false;
        try {
            capured = task.tryLock();
            if (!capured) {
                throw new AppException("E1200001",task.getTaskid());
            }
            //业务处理
            result = this.process(datas.getData());
            //生成子任务
            if (this instanceof InitationSubProcess) {
View Full Code Here

            String templateName = StringUtil.joinString(_SPLITER_CHAE, getStyle(), parser.getGroup().template().template().toUpperCase());
            try {

                template = GroupTemplateType.valueOf(templateName);
            } catch (Throwable ex) {
                throw new AppException(BricksMessagesCodes._E00011, ex, templateName);
            }
        }

        return template;
    }
View Full Code Here

TOP

Related Classes of cn.com.exceptions.AppException

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.