Package org.zeroexchange.exception

Examples of org.zeroexchange.exception.BusinessLogicException


                        Link link = linkFactory.getLink("leftMenuLink", new PageTarget(pageClass));
                        link.add(new Label("leftMenuSign", menuService.getTitle(menuItem)).setEscapeModelStrings(false));
                        item.add(link);
                    } catch (BusinessLogicException e) {
                        log.error("Cannot create link component for the left menu item", e);
                        throw new BusinessLogicException("Cannot create link component for the left menu item", e);
                    }
                }
               
            }
View Full Code Here


                if(log.isInfoEnabled()) {
                    log.info("Uploading data from file '" + fileName + "'");
                }
                if(fileName.endsWith(XML_EXT)) {
                    if(xmlScript2RepresentationClass == null) {
                        throw new BusinessLogicException("The xml script requires configured name2class mapping!");
                    }
                    int divIdx1 = fileName.indexOf('_');
                    int divIdx2 = fileName.indexOf('.');
                    if(divIdx1 == -1 || divIdx2 == -1) {
                        throw new BusinessLogicException("Illegal file name format: '" + fileName + "'");
                    }
                    Class dataRepresentationClass = xmlScript2RepresentationClass.get(fileName.substring(divIdx1 + 1, divIdx2));
                    if(dataRepresentationClass == null) {
                        throw new BusinessLogicException("Cannot find data representation mapping for the file '" + fileName + "'");
                    }
                    JAXBContext context;
                    try {
                        context = JAXBContext.newInstance(dataRepresentationClass);
                    } catch (JAXBException e) {
                        throw new BusinessLogicException("Cannot create JAXB context for class '" + dataRepresentationClass.getName() + "'", e);
                    }
                    Object dataRepresentation;
                    try {
                        dataRepresentation = context.createUnmarshaller().unmarshal(nextScript);
                    } catch (JAXBException e) {
                        throw new BusinessLogicException("Cannot marshal script '" + nextScript + "'", e);
                    }
                    dataImportersFactory.importData(dataRepresentation);
                } else if(fileName.endsWith(SQL_EXT)){
                    sqlScriptsExecutor.executeScripts(nextScript);
                }
View Full Code Here

        if(dataRepresentation == null) {
            return;
        }
        DataImporter<? super Object> importer = getProcessor(dataRepresentation.getClass());
        if(importer == null) {
            throw new BusinessLogicException("Cannot find importer for data of class '" + dataRepresentation.getClass() + "'");
        }
        importer.importData(dataRepresentation);
    }
View Full Code Here

            Property targetProperty = new Property();
            targetProperty.setCategory(targetCategory);
            targetProperty.setName(sourceProperty.getName());
            PropertyType propertyType = (PropertyType) propertyTypeDAO.getById(sourceProperty.getPropertyType());
            if(propertyType == null) {
                throw new BusinessLogicException("Property type is unknown: '" + sourceProperty.getPropertyType() + "'");
            }
            targetProperty.setPropertyType(propertyType);
            targetProperty.setDictionary(sourceProperty.getDictonary());
           
            //Setup property titles
View Full Code Here

        } catch (MailException e) {
            String lineSeparator = System.getProperty("line.separator");
            log.error("Cannot send feedback." + lineSeparator +
                     "Subject:" + subject + lineSeparator +
                     "Body:" + body, e);
            throw new BusinessLogicException("", e);
        }
    }
View Full Code Here

                    item.add(linkFactory.getLink("breadcrumbLink", breadcrumb.getTarget()).
                            add(new Label("breadcrumbSign", breadcrumbTitle))
                    );
                } catch (BusinessLogicException e) {
                    log.error("Cannot create link component for the breadcrumb", e);
                    throw new BusinessLogicException("Cannot create link component for the breadcrumb", e);
                }
                item.add(new Label("breadcrumbsDivider", BREADCRUMB_DIVIDER).
                          setVisible(breadcrumb.getIndex() > 0));
            }
        };
View Full Code Here

     */
    @Override
    public String getTargetKey(Target target) {
        TargetKeyProvider<Target> provider = getProcessor(target.getClass());
        if(provider == null) {
            throw new BusinessLogicException("Cannot find key provider for the target of class '" +
                    target.getClass().getName() + "'");
        }
        return provider.getTargetKey(target);
    }
View Full Code Here

     */
    @Override
    public String getMenuLeafKey(Target target) {
        TargetKeyProvider<Target> provider = getProcessor(target.getClass());
        if(provider == null) {
            throw new BusinessLogicException("Cannot find key provider for the target of class '" +
                    target.getClass().getName() + "'");
        }
        return provider.getMenuLeafKey(target);
    }
View Full Code Here

            return "ta";
        } else if(control instanceof FormComponentPanel) {
            return "fcp";
        }
       
        throw new BusinessLogicException("Unsupported control type '" + control.getClass().getName() + "'");
    }
View Full Code Here

                        link.add(new ContextImage("topMenuImage", MENU_IMAGES_FOLDER + menuService.getImage(menuItem)));
                       
                        item.add(link);
                    } catch (BusinessLogicException e) {
                        log.error("Cannot create Link component for the top menu item", e);
                        throw new BusinessLogicException("Cannot create Link component for the top menu item", e);
                    }

                }
            }
        });
View Full Code Here

TOP

Related Classes of org.zeroexchange.exception.BusinessLogicException

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.