Examples of exportConfiguration()


Examples of org.apache.geronimo.kernel.config.ConfigurationStore.exportConfiguration()

        ConfigurationStore store = mgr.getStoreForConfiguration(artifact);
        try {
            response.setContentType("application/zip");
            String filename = artifact.getArtifactId() + "-" + artifact.getVersion() + "." + artifact.getType();
            response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(filename, "UTF-8"));
            store.exportConfiguration(artifact, response.getOutputStream());
        } catch (NoSuchConfigException e) {
            throw new ServletException("No such configuration '"+configId+"'");
        }
    }
}
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationStore.exportConfiguration()

            response.setContentType("application/zip");
            if(!reply) {
                return true;
            }
            try {
                store.exportConfiguration(configId, response.getOutputStream());
                return true;
            } catch (NoSuchConfigException e) {
                log.error("Inconsistent ConfigurationStore data; ConfigManager claims it has configuration "+configId+" but store claims it doesn't",e);
                throw new IOException("Unable to write ZIP file; see server log for details");
            }
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationStore.exportConfiguration()

        Kernel kernel = KernelRegistry.getSingleKernel();
        ConfigurationManager mgr = ConfigurationUtil.getConfigurationManager(kernel);
        ConfigurationStore store = mgr.getStoreForConfiguration(artifact);
        try {
            response.setContentType("application/zip");
            store.exportConfiguration(artifact, response.getOutputStream());
        } catch (NoSuchConfigException e) {
            throw new ServletException("No such configuration '"+configId+"'");
        }
    }
}
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationStore.exportConfiguration()

            response.setContentType("application/zip");
            if(!reply) {
                return true;
            }
            try {
                store.exportConfiguration(configId, response.getOutputStream());
                return true;
            } catch (NoSuchConfigException e) {
                log.error("Inconsistent ConfigurationStore data; ConfigManager claims it has configuration "+configId+" but store claims it doesn't",e);
                throw new IOException("Unable to write ZIP file; see server log for details");
            }
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationStore.exportConfiguration()

            location = File.createTempFile("geronimo-plugin-download-", ".tmp");
            OutputStream output = new FileOutputStream(location);
            WritableListableRepository writableRepo = new RepoWrapper(repo);
            ConfigurationStore store = new RepositoryConfigurationStore(writableRepo);
            try {
                store.exportConfiguration(artifact, output);
            } catch (NoSuchConfigException e) {
                throw (IOException)new IOException("Could not locate artefact " + artifact).initCause(e);
            }

            return location;
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationStore.exportConfiguration()

            response.setContentType("application/zip");
            if(!reply) {
                return true;
            }
            try {
                store.exportConfiguration(configId, response.getOutputStream());
                return true;
            } catch (NoSuchConfigException e) {
                log.error("Inconsistent ConfigurationStore data; ConfigManager claims it has configuration "+configId+" but store claims it doesn't",e);
                throw new IOException("Unable to write ZIP file; see server log for details");
            }
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationStore.exportConfiguration()

        ConfigurationStore store = mgr.getStoreForConfiguration(artifact);
        try {
            response.setContentType("application/zip");
            String filename = artifact.getArtifactId() + "-" + artifact.getVersion() + "." + artifact.getType();
            response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(filename, "UTF-8"));
            store.exportConfiguration(artifact, response.getOutputStream());
        } catch (NoSuchConfigException e) {
            throw new ServletException("No such configuration '"+configId+"'");
        }
    }
}
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationStore.exportConfiguration()

            location = File.createTempFile("geronimo-plugin-download-", ".tmp");
            OutputStream output = new FileOutputStream(location);
            WritableListableRepository writableRepo = new RepoWrapper(repo);
            ConfigurationStore store = new RepositoryConfigurationStore(writableRepo);
            try {
                store.exportConfiguration(artifact, output);
            } catch (NoSuchConfigException e) {
                throw (IOException)new IOException("Could not locate artefact " + artifact).initCause(e);
            }

            return location;
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationStore.exportConfiguration()

            response.setContentType("application/zip");
            if(!reply) {
                return true;
            }
            try {
                store.exportConfiguration(configId, response.getOutputStream());
                return true;
            } catch (NoSuchConfigException e) {
                log.error("Inconsistent ConfigurationStore data; ConfigManager claims it has configuration "+configId+" but store claims it doesn't",e);
                throw new IOException("Unable to write ZIP file; see server log for details");
            }
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationStore.exportConfiguration()

        Kernel kernel = KernelRegistry.getSingleKernel();
        ConfigurationManager mgr = ConfigurationUtil.getConfigurationManager(kernel);
        ConfigurationStore store = mgr.getStoreForConfiguration(artifact);
        try {
            response.setContentType("application/zip");
            store.exportConfiguration(artifact, response.getOutputStream());
        } catch (NoSuchConfigException e) {
            throw new ServletException("No such configuration '"+configId+"'");
        }
    }
}
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.