Package certmngrscraper.sourceforge.net

Examples of certmngrscraper.sourceforge.net.ConfigurationException


        properties = new Properties();
        try {
            final File file = new File(System.getProperty(USER_HOME), PROPERTIES_FILE_NAME);
            properties.load(new FileInputStream(file));
        } catch (IOException e) {
            throw new ConfigurationException("Error loading mail.properties", e);
        }
        // validate properties
        mailUser = properties.getProperty(MAIL_USER);
        if (GenericValidator.isBlankOrNull(mailUser)) {
            throw new ConfigurationException("Property 'mail.user' cannot be blank or null");
        }
        mailPassword = properties.getProperty(MAIL_PASSWORD);
        if (GenericValidator.isBlankOrNull(mailPassword)) {
            throw new ConfigurationException("Property 'mail.password' cannot be blank or null");
        }
        try {
            recipient = new InternetAddress(properties.getProperty(RECIPIENT_PROPERTY));
        } catch (AddressException e) {
            throw new ConfigurationException("Property 'recipient' must be a valid email address", e);
        }
    }
View Full Code Here

TOP

Related Classes of certmngrscraper.sourceforge.net.ConfigurationException

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.