Examples of PluginListType


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

                if (commandArgs.getArgs().length == 1) {
                    repo = commandArgs.getArgs()[0];
                } else {
                    repo = getRepository(consoleReader, mgr);
                }
                PluginListType plugins = getPluginCategories(repo, mgr, consoleReader);
                if (plugins == null) {
                    return;
                }

                PluginListType list = getInstallList(plugins, consoleReader, repo);
                if (list == null) {
                    return;
                }

                installPlugins(mgr, list, repo, consoleReader, connection);
View Full Code Here

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

    public PluginListType getPluginCategories(String repo, GeronimoDeploymentManager mgr, ConsoleReader consoleReader) throws DeploymentException, IOException {
        if (repo == null) {
            return null;
        }
        PluginListType data;
        URL repository;
        try {
            repository = new URL(repo);
            data = mgr.listPlugins(repository, null, null);
        } catch (IOException e) {
            throw new DeploymentException("Unable to list configurations", e);
        } catch (FailedLoginException e) {
            throw new DeploymentException("Invalid login for Maven repository '" + repo + "'", 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

        }
        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

    private boolean loadFromServer(RenderRequest request) throws IOException, PortletException {

        PluginInstaller pluginInstaller = ManagementHelper.getManagementHelper(request).getPluginInstaller();

        // try to reuse the catalog data if it was already downloaded
        PluginListType data = getServerPluginList(request, pluginInstaller);

        if(data == null || data.getPlugin() == null) {
            return false;
        }

        listPlugins(request, pluginInstaller, data, false);
        request.getPortletSession(true).setAttribute(SERVER_CONFIG_LIST_SESSION_KEY, data);
View Full Code Here

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

    protected void doExecute() throws Exception {
        getDependencies(project);
        Maven2RepositoryAdapter.ArtifactLookup lookup = new ArtifactLookupImpl(new HashMap<Artifact, org.apache.maven.artifact.Artifact>());
        SourceRepository sourceRepo = new Maven2RepositoryAdapter(dependencies, lookup);
        PluginListType pluginList = new PluginListType();
        String localRepo = sourceRepository.getUrl();
        if ("file".equals(sourceRepository.getProtocol())) {
            File localRepoDir = new File(sourceRepository.getBasedir());
            localRepo = localRepoDir.toURI().toString();
        }
        pluginList.getDefaultRepository().add(localRepo);
        for (org.apache.maven.model.Repository repository: (List<org.apache.maven.model.Repository>)project.getRepositories()) {
            pluginList.getDefaultRepository().add(repository.getUrl());
        }

        if (artifact != null) {
            pluginList.getPlugin().add(toPluginType(Artifact.create(artifact)));
        } else {
            addDependencies(pluginList);
        }
        DownloadResults downloadPoller = new DownloadResults();
        String targetServerPath = targetServerDirectory.getAbsolutePath();
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
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.