Package org.apache.geronimo.system.plugin.model

Examples of org.apache.geronimo.system.plugin.model.PluginListType


        int time = (int) (System.currentTimeMillis() - start) / 1000;
        CommandInstallCAR.printResults(consoleReader, results, time);
    }

    public void installPlugins(GeronimoDeploymentManager mgr, List<String> list, PluginListType all, String defaultRepository, ConsoleReader consoleReader, ServerConnection connection) throws IOException, DeploymentException {
        PluginListType selected = getPluginsFromIds(list, all);
        installPlugins(mgr, selected, defaultRepository, consoleReader, connection);
    }
View Full Code Here


        PluginListType selected = getPluginsFromIds(list, all);
        installPlugins(mgr, selected, defaultRepository, consoleReader, connection);
    }

    private static PluginListType getPluginsFromIds(List<String> configIds, PluginListType list) throws IllegalStateException {
        PluginListType installList = new PluginListType();
        for (String configId : configIds) {
            PluginType plugin = null;
            for (PluginType metadata : list.getPlugin()) {
                for (PluginArtifactType testInstance : metadata.getPluginArtifact()) {
                    if (PluginInstallerGBean.toArtifact(testInstance.getModuleId()).toString().equals(configId)) {
                        plugin = PluginInstallerGBean.copy(metadata, testInstance);
                        installList.getPlugin().add(plugin);
                        break;
                    }
                }
            }
            if (plugin == null) {
View Full Code Here

        DownloadResults results = mgr.installPluginList(repositoryPath, relativeServerPath, list);
        int time = (int) (System.currentTimeMillis() - start) / 1000;
        CommandInstallCAR.printResults(consoleReader, results, time);
    }
    public void assembleServer(GeronimoDeploymentManager mgr, List<String> list, PluginListType all, String repositoryPath, String relativeServerPath, ConsoleReader consoleReader) throws Exception {
        PluginListType selected = getPluginsFromIds(list, all);
        assembleServer(mgr, selected, repositoryPath, relativeServerPath, consoleReader);
    }
View Full Code Here

            }
        }, new ArrayList<ServerInstance>());
    }

    public void testParsing() throws Exception {
        PluginListType list = installer.listPlugins(new URL(testRepo), null, null);
        assertNotNull(list);
        assertEquals(1, list.getDefaultRepository().size());
        assertEquals(fakeRepo, list.getDefaultRepository().get(0));
        assertTrue(list.getPlugin().size() > 0);
        int prereqCount = 0;
        for (PluginType metadata: list.getPlugin()) {
            PluginArtifactType instance = metadata.getPluginArtifact().get(0);
            prereqCount += instance.getPrerequisite().size();
//            for (PrerequisiteType prerequisite: instance.getPrerequisite()) {
//                assertFalse(prerequisite.getId());
//            }
View Full Code Here

                    extractPluginFiles(pluginArtifact, data, monitor);
                }
            }

            // 4. Use the standard logic to remove obsoletes, install dependencies, etc.
            PluginListType pluginList = new PluginListType();
            pluginList.getPlugin().add(data);
            pluginList.getDefaultRepository().addAll(instance.getSourceRepository());
           
            SourceRepository defaultSourceRepository = getDefaultSourceRepository(defaultRepository, restrictToDefaultRepository);
           
            install(pluginList, defaultSourceRepository, restrictToDefaultRepository, username, password, poller, false);
        } catch (Exception e) {
View Full Code Here

            return result;
        }
    }

    public PluginListType createPluginListForRepositories(String repo) throws NoSuchStoreException {
        PluginListType pluginList = localSourceRepository.getPluginList();
        if (repo != null) {
            pluginList.getDefaultRepository().add(repo);
        }
        return pluginList;
    }
View Full Code Here

    private void generateConfigFile(HttpServletRequest request, Kernel kernel, PrintWriter out) throws NoSuchStoreException, JAXBException, XMLStreamException {
        String repo = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+request.getServletPath();
        if(!repo.endsWith("/")) repo += "/";
        ConfigurationManager mgr = ConfigurationUtil.getConfigurationManager(kernel);
        PluginInstaller installer = getInstaller(kernel);
        PluginListType pluginList = installer.createPluginListForRepositories(repo);
        PluginXmlUtil.writePluginList(pluginList, out);
    }
View Full Code Here

        String groupId = request.getParameter("groupId");
        String artifactId = request.getParameter("artifactId");
        String version = request.getParameter("version");
        String format = request.getParameter("format");

        PluginListType list = getServerPluginList(request, pluginInstaller);
        PluginListType installList = getPluginsFromIds(configIds, list);
        List<PluginInfoBean> plugins = new ArrayList<PluginInfoBean>();
        for (PluginType pluginType: installList.getPlugin()) {
            PluginInfoBean infoBean = new PluginInfoBean();
            infoBean.setPlugin(pluginType);
            infoBean.setPluginArtifact(pluginType.getPluginArtifact().get(0));
            plugins.add(infoBean);
        }
View Full Code Here

        PluginInstaller pluginInstaller = ManagementHelper.getManagementHelper(request).getPluginInstaller();
        ServerArchiver archiver = ManagementHelper.getManagementHelper(request).getArchiver();
        String[] configIds = request.getParameterValues("configId");

        PluginListType list = getServerPluginList(request, pluginInstaller);
        PluginListType installList = getPluginsFromIds(configIds, list);
       
       
        // if the targetPath doesn't end with "/" or "\", add one.
        if (targetPath.lastIndexOf("/") != targetPath.length()-1){
            if (targetPath.lastIndexOf("\\") != targetPath.length()-1){
View Full Code Here

        String[] configIds = request.getParameterValues("pluginIds");
        String repo = request.getParameter("repository");
        String user = request.getParameter("repo-user");
        String pass = request.getParameter("repo-pass");

        PluginListType list = getRepoPluginList(request, pluginInstaller, repo);
        PluginListType installList = getPluginsFromIds(configIds, list);
        List<PluginInfoBean> plugins = new ArrayList<PluginInfoBean>();
        for (PluginType pluginType: installList.getPlugin()) {
            PluginInfoBean infoBean = new PluginInfoBean();
            infoBean.setPlugin(pluginType);
            infoBean.setPluginArtifact(pluginType.getPluginArtifact().get(0));
            plugins.add(infoBean);
        }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.system.plugin.model.PluginListType

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.