Package org.apache.geronimo.system.plugin

Examples of org.apache.geronimo.system.plugin.PluginRepositoryList


    public URL[] getRepositories() {
        List<URL> list = new ArrayList<URL>();
        Set<AbstractName> set = kernel.listGBeans(new AbstractNameQuery(PluginRepositoryList.class.getName()));
        for (AbstractName name : set) {
            PluginRepositoryList repo = (PluginRepositoryList) kernel.getProxyManager().createProxy(name,
                    PluginRepositoryList.class);
            list.addAll(repo.getRepositories());
            kernel.getProxyManager().destroyProxy(repo);
        }
        return list.toArray(new URL[list.size()]);
    }
View Full Code Here


    private URL getFirstPluginRepository(Kernel kernel) throws ServletException {
        Set installers = kernel.listGBeans(new AbstractNameQuery(PluginRepositoryList.class.getName()));
        if (installers.size() == 0) {
            throw new ServletException("Unable to install sample application; no plugin repository list found");
        }
        PluginRepositoryList repos = ((PluginRepositoryList) kernel.getProxyManager().createProxy((AbstractName) installers.iterator().next(),
                PluginRepositoryList.class));

        List<URL> urls = repos.getRepositories();
        if (urls.isEmpty()) {
            repos.refresh();
            urls = repos.getRepositories();
            if (urls.isEmpty()) {
                throw new ServletException("Unable to install sample applicatoin; unable to download repository list");
            }
        }
        return urls.get(0);
View Full Code Here

    public URL[] getRepositories() {
        List<URL> list = new ArrayList<URL>();
        Set<AbstractName> set = kernel.listGBeans(new AbstractNameQuery(PluginRepositoryList.class.getName()));
        for (AbstractName name : set) {
            PluginRepositoryList repo = (PluginRepositoryList) kernel.getProxyManager().createProxy(name,
                    PluginRepositoryList.class);
            list.addAll(repo.getRepositories());
            kernel.getProxyManager().destroyProxy(repo);
        }
        return list.toArray(new URL[list.size()]);
    }
View Full Code Here

    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
        PluginRepositoryList[] lists = PortletManager.getCurrentServer(request).getPluginRepositoryLists();
        List list = new ArrayList();
        for (int i = 0; i < lists.length; i++) {
            PluginRepositoryList repo = lists[i];
            list.addAll(Arrays.asList(repo.getRepositories()));
        }
        ConfigurationData[] configs = PortletManager.getConfigurations(request, null, false);
        request.setAttribute("configurations", configs);
        request.setAttribute("repositories", list);
        String repository = request.getParameter("repository");
View Full Code Here

    private URL getFirstPluginRepository(Kernel kernel) throws ServletException {
        Set installers = kernel.listGBeans(new AbstractNameQuery(PluginRepositoryList.class.getName()));
        if(installers.size() == 0) {
            throw new ServletException("Unable to install sample application; no plugin repository list found");
        }
        PluginRepositoryList repos = ((PluginRepositoryList) kernel.getProxyManager().createProxy((AbstractName) installers.iterator().next(),
                PluginRepositoryList.class));

        URL[] urls = repos.getRepositories();
        if(urls.length == 0) {
            repos.refresh();
            urls = repos.getRepositories();
            if(urls.length == 0) {
                throw new ServletException("Unable to install sample applicatoin; unable to download repository list");
            }
        }
        return urls[0];
View Full Code Here

    public URL[] getRepositories() {
        List list = new ArrayList();
        Set set = kernel.listGBeans(new AbstractNameQuery(PluginRepositoryList.class.getName()));
        for (Iterator it = set.iterator(); it.hasNext();) {
            AbstractName name = (AbstractName) it.next();
            PluginRepositoryList repo = (PluginRepositoryList) kernel.getProxyManager().createProxy(name, PluginRepositoryList.class);
            list.addAll(Arrays.asList(repo.getRepositories()));
            kernel.getProxyManager().destroyProxy(repo);
        }
        return (URL[]) list.toArray(new URL[list.size()]);
    }
View Full Code Here

    private URL getFirstPluginRepository(Kernel kernel) throws ServletException {
        Set installers = kernel.listGBeans(new AbstractNameQuery(PluginRepositoryList.class.getName()));
        if(installers.size() == 0) {
            throw new ServletException("Unable to install sample application; no plugin repository list found");
        }
        PluginRepositoryList repos = ((PluginRepositoryList) kernel.getProxyManager().createProxy((AbstractName) installers.iterator().next(),
                PluginRepositoryList.class));

        URL[] urls = repos.getRepositories();
        if(urls.length == 0) {
            repos.refresh();
            urls = repos.getRepositories();
            if(urls.length == 0) {
                throw new ServletException("Unable to install sample applicatoin; unable to download repository list");
            }
        }
        return urls[0];
View Full Code Here

        }
        DownloadResults downloadPoller = new DownloadResults();
        String targetServerPath = targetServerDirectory.getAbsolutePath();

        Kernel kernel = new BasicKernel("Assembly");
        PluginRepositoryList pluginRepoList = new PluginRepositoryDownloader(Collections.singletonMap(localRepo, (String[]) null), true);
        try {
            PluginInstallerGBean installer = new PluginInstallerGBean(targetRepositoryPath, targetServerPath, installedPluginsList, servers, pluginRepoList, kernel, getClass().getClassLoader());
            installer.install(pluginList, sourceRepo, true, null, null, downloadPoller);
            if (overrides != null) {
                for (Override override: this.overrides) {
View Full Code Here

    public URL[] getRepositories() {
        List<URL> list = new ArrayList<URL>();
        Set<AbstractName> set = kernel.listGBeans(new AbstractNameQuery(PluginRepositoryList.class.getName()));
        for (AbstractName name : set) {
            PluginRepositoryList repo = (PluginRepositoryList) kernel.getProxyManager().createProxy(name,
                    PluginRepositoryList.class);
            list.addAll(repo.getRepositories());
            kernel.getProxyManager().destroyProxy(repo);
        }
        return list.toArray(new URL[list.size()]);
    }
View Full Code Here

    public URL[] getRepositories() {
        List<URL> list = new ArrayList<URL>();
        Set<AbstractName> set = kernel.listGBeans(new AbstractNameQuery(PluginRepositoryList.class.getName()));
        for (AbstractName name : set) {
            PluginRepositoryList repo = (PluginRepositoryList) kernel.getProxyManager().createProxy(name,
                    PluginRepositoryList.class);
            list.addAll(repo.getRepositories());
            kernel.getProxyManager().destroyProxy(repo);
        }
        return list.toArray(new URL[list.size()]);
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.system.plugin.PluginRepositoryList

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.