Examples of InvalidPluginConfigurationException


Examples of org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException

    void validateJBossHomeDirProperty() {
        Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
        String jbossHome = getRequiredPropertyValue(pluginConfig, JBOSS_HOME_DIR_CONFIG_PROP);
        File jbossHomeDir = new File(jbossHome);
        if (!jbossHomeDir.isAbsolute()) {
            throw new InvalidPluginConfigurationException(
                JBossASServerComponent.JBOSS_HOME_DIR_CONFIG_PROP
                    + " connection property ('"
                    + jbossHomeDir
                    + "') is not an absolute path. Note, on Windows, absolute paths must start with the drive letter (e.g. C:).");
        }

        if (!jbossHomeDir.exists()) {
            throw new InvalidPluginConfigurationException(JBossASServerComponent.JBOSS_HOME_DIR_CONFIG_PROP
                + " connection property ('" + jbossHomeDir + "') does not exist.");
        }

        if (!jbossHomeDir.isDirectory()) {
            throw new InvalidPluginConfigurationException(JBossASServerComponent.JBOSS_HOME_DIR_CONFIG_PROP
                + " connection property ('" + jbossHomeDir + "') is a file, not a directory.");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.