Examples of PluginListType


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

                }
            }

            // 4. Use the standard logic to remove obsoletes, install dependencies, etc.
            //    This will validate all over again (oh, well)
            PluginListType pluginList = new PluginListType();
            pluginList.getPlugin().add(data);
            pluginList.getDefaultRepository().addAll(instance.getSourceRepository());
            install(pluginList, defaultRepository, restrictToDefaultRepository, username, password, poller);
        } catch (Exception e) {
            poller.setFailure(e);
        } finally {
            poller.setFinished();
View Full Code Here

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

            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

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

        }
        return data;
    }

    public PluginListType getLocalPluginCategories(GeronimoDeploymentManager mgr, ConsoleReader consoleReader) throws DeploymentException, IOException {
        PluginListType data;
        try {
            data = mgr.createPluginListForRepositories(null);
        } catch (NoSuchStoreException e) {
            throw new DeploymentException("Unable to list configurations", e);
        }
        if (data == null || data.getPlugin().size() == 0) {
            return null;
        }
        return data;
    }
View Full Code Here

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

        consoleReader.flushConsole();
        String answer = consoleReader.readLine("Install Services [enter a comma separated list of numbers or 'q' to quit]: ").trim();
        if (answer.equalsIgnoreCase("q")) {
            return null;
        }
        PluginListType list = new PluginListType();
        for (String instance : answer.split(",")) {
            int selection = Integer.parseInt(instance.trim());
            PluginType target = available.get(selection - 1);
            list.getPlugin().add(target);
        }
        if (repo != null) {
            list.getDefaultRepository().add(repo);
        }
        return list;
    }
View Full Code Here

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

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

        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

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

        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

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

            }
        }, 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

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

        super(mode, viewName);
    }

    protected PluginListType getRepoPluginList(PortletRequest request, PluginInstaller pluginInstaller, String repo, String user, String pass) throws IOException, PortletException {
        PortletSession session = request.getPortletSession(true);
        PluginListType list = (PluginListType) session.getAttribute(CONFIG_LIST_SESSION_KEY);
        String listRepo = (String) session.getAttribute(CONFIG_LIST_REPO_SESSION_KEY);

        if (list == null || !repo.equals(listRepo)) {
            try {
                list = pluginInstaller.listPlugins(new URL(repo), user, pass);
View Full Code Here

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

        }
        return list;
    }

    protected PluginListType getServerPluginList(PortletRequest request, PluginInstaller pluginInstaller) throws PortletException {
        PluginListType data = (PluginListType) request.getPortletSession(true).getAttribute(SERVER_CONFIG_LIST_SESSION_KEY);
        if (data==null) {
            try {
                data = pluginInstaller.createPluginListForRepositories(null);
            } catch (NoSuchStoreException e) {
                throw new PortletException("Server in unknown state", e);
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.