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

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


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

        PluginListType list = getRepoPluginList(request, pluginInstaller, repo);
        PluginListType installList = getPluginsFromIds(configIds, list);

        Object downloadKey = pluginInstaller.startInstall(installList, repo, false, user, pass);
        DownloadResults results = pluginInstaller.checkOnInstall(downloadKey);
        request.getPortletSession(true).setAttribute(DOWNLOAD_RESULTS_SESSION_KEY, results);
       
View Full Code Here


    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);
        //try to reuse the server application list
        List<String> appList = getApplicationModuleLists(request);
       
        if(data == null || data.getPlugin() == null) {
            return false;
        }

        listPlugins(request, pluginInstaller, data, appList);
       
View Full Code Here

        this.kernel = kernel;
    }

    public void newServerInstance(String serverName) throws Exception {
        try {
            PluginListType pluginList = new PluginListType();
            for (String artifactString : defaultPlugins) {
                Artifact artifact = Artifact.create(artifactString);
                PluginType plugin = getPlugin(artifact);
                pluginList.getPlugin().add(plugin);
            }
            Artifact query = Artifact.createPartial("///");
            for (PersistentConfigurationList persistentConfigurationList : persistentConfigurationLists) {
                for (Artifact installed : persistentConfigurationList.getListedConfigurations(query)) {
                    PluginType plugin = getPlugin(installed);
                    pluginList.getPlugin().add(plugin);
                }
            }

            Kernel kernel = new BasicKernel("assembly");
View Full Code Here

                        }
                    }
                }
            }
        }
        PluginListType pluginList = new PluginListType();
        pluginList.getPlugin().addAll(pluginMap.values());
        return pluginList;
    }
View Full Code Here

    public void execute() throws MojoExecutionException, MojoFailureException {
        getDependencies(project, false);
        Maven2RepositoryAdapter.ArtifactLookup lookup = new ArtifactLookupImpl();
        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

                }
            }

            // 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

            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

     */
    public static PluginListType loadPluginList(InputStream in) throws ParserConfigurationException, IOException, SAXException, JAXBException, XMLStreamException {
        Unmarshaller unmarshaller = PLUGIN_LIST_CONTEXT.createUnmarshaller();
        XMLStreamReader xmlStream = XMLINPUT_FACTORY.createXMLStreamReader(in);
        JAXBElement<PluginListType> element = unmarshaller.unmarshal(xmlStream, PluginListType.class);
        PluginListType pluginList = element.getValue();
        return pluginList;
    }
View Full Code Here

                    extractPluginFiles(pluginArtifact, instance, 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

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.