Package org.pomizer.exception

Examples of org.pomizer.exception.ApplicationException


                + "%s";
       
        if (-1 == outputText.indexOf(STATUS_TAG)) {
            final String errorText = readInputStream(process.getErrorStream());
            if (StringUtils.isNullOrEmptyOrBlank(errorText)) {
                throw new ApplicationException(String.format(errorMessageFormat, outputText));
            }
            else {
                throw new ApplicationException(String.format(errorMessageFormat, errorText));
            }
        }
       
        result = XmlUtils.loadXmlDocumentFromString(outputText);
       
View Full Code Here


                        DeployerResourceInfo resourceInfo = new DeployerResourceInfo();
                        Node resourceNode = (Node)resources.get(j);
                        resourceInfo.path = XmlUtils.getAttributeValue(resourceNode, "path");
                        File resourcePath = new File(FilenameUtils.concat(project.path, resourceInfo.path));
                        if (!resourcePath.exists()) {
                            throw new ApplicationException("Resource path \"" + resourceInfo.path + "\" doesn't exists in the project \""
                                    + project.path + "\" ");
                        }
                        loadDeploymentPaths(resourceInfo, resourceNode, resourcePath.isFile());
                        project.resources.add(resourceInfo);
                    }
View Full Code Here

                Node deploymentPath = (Node)deploymentPaths.get(k);
                final String path = deploymentPath.getText();
                resourceInfo.deploymentPaths.add(path);
                if (mustBeFile) {
                    if (!JavaUtils.isFile(path)) {
                        throw new ApplicationException("Target path \"" + path + "\" for resorce should be a file");
                    }
                }
                else {
                    if (JavaUtils.isFile(path)) {
                        throw new ApplicationException("Target path \"" + path + "\" for resorce should be a directory");
                    }
                }
            }
        }
    }
View Full Code Here

            throws SAXException, IOException, ApplicationException {
       
        final ValidationDriver validationDriver = new ValidationDriver();
        if (!validationDriver.loadSchema(new InputSource(
                XmlUtils.class.getResourceAsStream("/" + validationFileName)))) {
            throw new ApplicationException("Error during loading RNG schema");
        }
        if (!validationDriver.validate(ValidationDriver.fileInputSource(xmlFileName))) {
            throw new ApplicationException("Error during parsing project file");
        }
    }
View Full Code Here

TOP

Related Classes of org.pomizer.exception.ApplicationException

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.