Examples of PluginInstallerGBean


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

                }
            }
            if (found != null) {
                data.jars = new String[]{found.getRepositoryURI()};
                try {
                    PluginInstallerGBean installer = KernelRegistry.getSingleKernel().getGBean(PluginInstallerGBean.class);
                    //WriteableRepository repo = PortletManager.getCurrentServer(actionRequest).getWritableRepositories()[0];
                    final PortletSession session = actionRequest.getPortletSession();
                    ProgressInfo progressInfo = new ProgressInfo();
                    progressInfo.setMainMessage("Downloading " + found.getName());
                    session.setAttribute(ProgressInfo.PROGRESS_INFO_KEY, progressInfo, PortletSession.APPLICATION_SCOPE);
View Full Code Here

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

        String targetServerPath = targetServerDirectory.getAbsolutePath();

        Kernel kernel = new BasicKernel("Assembly", bundleContext);
        PluginRepositoryList pluginRepoList = new PluginRepositoryDownloader(Collections.singletonMap(localRepo, (String[]) null), true);
        try {
            PluginInstallerGBean installer = new PluginInstallerGBean(targetRepositoryPath, targetServerPath, installedPluginsList, servers, pluginRepoList, kernel, bundleContext);
            installer.install(pluginList, sourceRepo, true, null, null, downloadPoller);
            if (overrides != null) {
                for (Override override: this.overrides) {
                    AttributesType attributes = override.getOverrides(overridesDir);
                    installer.mergeOverrides(override.getServer(), attributes);
                }
            }
        } catch (Exception e) {
            throw new MojoExecutionException("Could not use plugin installer bean", e);
        } finally {
View Full Code Here

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

        request.setAttribute("configIds", configId);
       
    }

    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
        PluginInstallerGBean pluginInstaller = (PluginInstallerGBean) ManagementHelper.getManagementHelper(request).getPluginInstaller();
        String[] configId = request.getParameterValues("configId");
        String repo = request.getParameter("repository");
        String user = request.getParameter("repo-user");
        String pass = request.getParameter("repo-pass");
        int downloadKey = Integer.parseInt(request.getParameter("download-key"));
        DownloadResults results = pluginInstaller.checkOnInstall(downloadKey, true);

        List<InstallResults> dependencies = new ArrayList<InstallResults>();
        if (results != null) {
            if(results.isFailed()) {
                //TODO is this an appropriate way to explain failure?
View Full Code Here

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

        String targetServerPath = targetServerDirectory.getAbsolutePath();

        Kernel kernel = new BasicKernel("Assembly", bundleContext);
        PluginRepositoryList pluginRepoList = new PluginRepositoryDownloader(Collections.singletonMap(localRepo, (String[]) null), true);
        try {
            PluginInstallerGBean installer = new PluginInstallerGBean(targetRepositoryPath, targetServerPath, installedPluginsList, servers, pluginRepoList, kernel, bundleContext);
            installer.install(pluginList, sourceRepo, true, null, null, downloadPoller);
            if (overrides != null) {
                for (Override override: this.overrides) {
                    AttributesType attributes = override.getOverrides(overridesDir);
                    installer.mergeOverrides(override.getServer(), attributes);
                }
            }
        } catch (Exception e) {
            throw new MojoExecutionException("Could not use plugin installer bean", e);
        } finally {
View Full Code Here

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

        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) {
                    AttributesType attributes = override.getOverrides(overridesDir);
                    installer.mergeOverrides(override.getServer(), attributes);
                }
            }
        } catch (Exception e) {
            throw new MojoExecutionException("Could not use plugin installer bean", e);
        } finally {
View Full Code Here

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

        request.setAttribute("configIds", configId);
       
    }

    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
        PluginInstallerGBean pluginInstaller = (PluginInstallerGBean) ManagementHelper.getManagementHelper(request).getPluginInstaller();
        String[] configId = request.getParameterValues("configId");
        String repo = request.getParameter("repository");
        String user = request.getParameter("repo-user");
        String pass = request.getParameter("repo-pass");
        int downloadKey = Integer.parseInt(request.getParameter("download-key"));
        DownloadResults results = pluginInstaller.checkOnInstall(downloadKey, true);

        List<InstallResults> dependencies = new ArrayList<InstallResults>();
        if (results != null) {
            if(results.isFailed()) {
                //TODO is this an appropriate way to explain failure?
View Full Code Here

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

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

        Kernel kernel = new BasicKernel("Assembly");
        try {
            PluginInstallerGBean installer = new PluginInstallerGBean(targetRepositoryPath, targetServerPath, servers, kernel, getClass().getClassLoader());
            installer.install(pluginList, sourceRepo, true, null, null, downloadPoller);
            if (overrides != null) {
                for (Override override: this.overrides) {
                    AttributesType attributes = override.getOverrides(overridesDir);
                    installer.mergeOverrides(override.getServer(), attributes);
                }
            }
        } finally {
            kernel.shutdown();
        }
View Full Code Here

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

        ScriptSession scriptSession = wctx.getScriptSession();
        //DownloadResults results = getPluginInstaller().checkOnInstall(downloadKey);
        ScriptProxy scriptProxy = new ScriptProxy();
        scriptProxy.addScriptSession(scriptSession);
       
        PluginInstallerGBean pluginInstallerInternal = (PluginInstallerGBean) getPluginInstaller();
        DownloadResults results = pluginInstallerInternal.checkOnInstall(downloadKey, false);
       
        //In the event results.isFinished is passed in true during polling
        scriptProxy.addFunctionCall("setMainMessage", results.getCurrentMessage());
        scriptProxy.addFunctionCall("setProgressCurrentFile", results.getCurrentFile());
       
        while (!results.isFinished()) {
            // update the progress bar
            scriptProxy.addFunctionCall("setProgressCurrentFile", results.getCurrentFile());
            scriptProxy.addFunctionCall("setProgressPercent", results.getCurrentFilePercent());
            scriptProxy.addFunctionCall("setMainMessage", results.getCurrentMessage());
           
            // get an update on the download progress, sleep time reduce to poll faster for smaller files
            Thread.sleep(100);
            //results = getPluginInstaller().checkOnInstall(downloadKey);
            results = pluginInstallerInternal.checkOnInstall(downloadKey, false);
        }
       
        if(results.isFailed()) {
            scriptProxy.addFunctionCall("setErrorMessage", results.getFailure().toString());
            throw new Exception("Unable to install configuration", results.getFailure());
View Full Code Here

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

        request.setAttribute("configIds", configId);
       
    }

    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
        PluginInstallerGBean pluginInstaller = (PluginInstallerGBean) ManagementHelper.getManagementHelper(request).getPluginInstaller();
        String[] configId = request.getParameterValues("configId");
        String repo = request.getParameter("repository");
        String user = request.getParameter("repo-user");
        String pass = request.getParameter("repo-pass");
        int downloadKey = Integer.parseInt(request.getParameter("download-key"));
        DownloadResults results = pluginInstaller.checkOnInstall(downloadKey, true);

        List<InstallResults> dependencies = new ArrayList<InstallResults>();
        if (results != null) {
            if(results.isFailed()) {
                //TODO is this an appropriate way to explain failure?
View Full Code Here

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

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

        Kernel kernel = new BasicKernel("Assembly");
        try {
            PluginInstallerGBean installer = new PluginInstallerGBean(targetRepositoryPath, targetServerPath, servers, kernel, getClass().getClassLoader());
            installer.install(pluginList, sourceRepo, true, null, null, downloadPoller);
            if (overrides != null) {
                for (Override override: this.overrides) {
                    AttributesType attributes = override.getOverrides(overridesDir);
                    installer.mergeOverrides(override.getServer(), attributes);
                }
            }
        } finally {
            kernel.shutdown();
        }
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.