Package org.apache.geronimo.kernel.config

Examples of org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException


        if(!configId.isResolved()) {
            throw new IllegalArgumentException("Artifact "+configId+" is not fully resolved");
        }
        File location = repository.getLocation(configId);
        if (location.exists()) {
            throw new ConfigurationAlreadyExistsException("Configuration already exists: " + configId);
        }
        location.mkdirs();
        if (!location.exists()) {
            throw new ConfigurationAlreadyExistsException("Could not create configuration directory: " + location);
        }
        return location;
    }
View Full Code Here


        File destination = repository.getLocation(configId);

        // if directory in the correct place -- noop
        if (!source.equals(destination)) {
            if (destination.exists()) {
                throw new ConfigurationAlreadyExistsException(configId.toString());
            }

            if (source.isFile()) {
                // Assume this is a jar file
                // copy it into the repository; repository should unpack it
View Full Code Here

            }

            // 2. Validate that we can install this
            if (!validatePlugin(data)) {
                //already installed
                throw new ConfigurationAlreadyExistsException("Configuration " + toArtifact(data.getPluginArtifact().get(0).getModuleId()) + " is already installed.");
            }

            verifyPrerequisites(data);

            PluginArtifactType instance = data.getPluginArtifact().get(0);
View Full Code Here

                if (log.isDebugEnabled()) {
                    log.debug(location.getPath() + " is empty");
                }
            } else {
                log.error(location.getPath() + " is not an empty directory");
                throw new ConfigurationAlreadyExistsException("Configuration already exists: " + configId);
            }
        } else {
            if (log.isDebugEnabled()) {
                log.debug("Creating configuration directory: " + location.getPath());
            }
            location.mkdirs();
        }
        if (!location.exists()) {
            throw new ConfigurationAlreadyExistsException("Could not create configuration directory: " + location);
        }
        return location;
    }
View Full Code Here

        File destination = repository.getLocation(configId);

        // if directory in the correct place -- noop
        if (!source.equals(destination)) {
            if (destination.exists()) {
                throw new ConfigurationAlreadyExistsException(configId.toString());
            }

            if (source.isFile()) {
                // Assume this is a jar file
                // copy it into the repository; repository should unpack it
View Full Code Here

            }

            // 2. Validate that we can install this
            if (!validatePlugin(data)) {
                //already installed
                throw new ConfigurationAlreadyExistsException("Configuration " + toArtifact(data.getPluginArtifact().get(0).getModuleId()) + " is already installed.");
            }

            verifyPrerequisites(data);

            PluginArtifactType instance = data.getPluginArtifact().get(0);
View Full Code Here

        if (!configId.isResolved()) {
            throw new IllegalArgumentException("Artifact " + configId + " is not fully resolved");
        }
        File location = repository.getLocation(configId);
        if (location.exists()) {
            throw new ConfigurationAlreadyExistsException("Configuration already exists: " + configId);
        }
        File parentDirectory = location.getParentFile();
        if (!parentDirectory.exists()) {
            parentDirectory.mkdirs();
            if (log.isDebugEnabled()) {
View Full Code Here

        if(!configId.isResolved()) {
            throw new IllegalArgumentException("Artifact "+configId+" is not fully resolved");
        }
        File location = repository.getLocation(configId);
        if (location.exists()) {
            throw new ConfigurationAlreadyExistsException("Configuration already exists: " + configId);
        }
        location.mkdirs();
        if (!location.exists()) {
            throw new ConfigurationAlreadyExistsException("Could not create configuration directory: " + location);
        }
        return location;
    }
View Full Code Here

        File destination = repository.getLocation(configId);

        // if directory in the correct place -- noop
        if (!source.equals(destination)) {
            if (destination.exists()) {
                throw new ConfigurationAlreadyExistsException(configId.toString());
            }

            if (source.isFile()) {
                // Assume this is a jar file
                // copy it into the repository; repository should unpack it
View Full Code Here

            }

            // 2. Validate that we can install this
            if (!validatePlugin(data)) {
                //already installed
                throw new ConfigurationAlreadyExistsException("Configuration " + toArtifact(data.getPluginArtifact().get(0).getModuleId()) + " is already installed.");
            }

            verifyPrerequisites(data);

            PluginArtifactType instance = data.getPluginArtifact().get(0);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException

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.