Examples of PluginList


Examples of dovetaildb.api.PluginList

    if (db != null) db.setDirtyListener(this);
    setDirty();
  }
 
  public void signalCodeChange() {
    plugins = new PluginList();
    globals.put("apiplugins", plugins);
    ScriptEnv newEnv;
    try {
      newEnv = StandardDbRepository.buildScriptEnv(code, globals);
    } finally {
View Full Code Here

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

        String repo = request.getParameter("repository");
        String user = request.getParameter("repo-user");
        String pass = request.getParameter("repo-pass");
        PluginMetadata config = null;
        try {
            PluginList list = (PluginList) request.getPortletSession(true).getAttribute(CONFIG_LIST_SESSION_KEY);
            if(list == null) {
                list = PortletManager.getCurrentServer(request).getPluginInstaller().listPlugins(new URL(repo), user, pass);
                request.getPortletSession(true).setAttribute(CONFIG_LIST_SESSION_KEY, list);
            }
            for (int i = 0; i < list.getPlugins().length; i++) {
                PluginMetadata metadata = list.getPlugins()[i];
                if(metadata.getModuleId().toString().equals(configId)) {
                    config = metadata;
                    break;
                }
            }
View Full Code Here

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

        String pass = request.getParameter("repo-pass");
        boolean proceed = Boolean.valueOf(request.getParameter("proceed")).booleanValue();
        if(proceed) {
            String configId = request.getParameter("configId");

            PluginList installList;
            try {
                PluginList list = (PluginList) request.getPortletSession(true).getAttribute(CONFIG_LIST_SESSION_KEY);
                if(list == null) {
                    list = PortletManager.getCurrentServer(request).getPluginInstaller().listPlugins(new URL(repo), user, pass);
                    request.getPortletSession(true).setAttribute(CONFIG_LIST_SESSION_KEY, list);
                }
                installList = PluginList.createInstallList(list, Artifact.create(configId));
View Full Code Here

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

    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
        return getMode()+BEFORE_ACTION;
    }

    private void loadFromRepository(RenderRequest request, String repository, String username, String password) throws IOException, PortletException {
        PluginList data;
        try {
            data = PortletManager.getCurrentServer(request).getPluginInstaller().listPlugins(new URL(repository), username, password);
        } catch (FailedLoginException e) {
            throw new PortletException("Invalid login for Maven repository '"+repository+"'", e);
        }
        Map results = new HashMap();
        for (int i = 0; i < data.getPlugins().length; i++) {
            PluginMetadata metadata = data.getPlugins()[i];
            List values = (List) results.get(metadata.getCategory());
            if(values == null) {
                values = new ArrayList();
                results.put(metadata.getCategory(), values);
            }
View Full Code Here

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

        moduleIdName = moduleIdName.replaceAll("SERVER", getServerType());
        URL repo = getFirstPluginRepository(kernel);
        PluginMetadata target = new PluginMetadata("Sample Application", null, "Samples", "A sample application",
                                                   null, null, null, false, true);
        target.setDependencies(new String[]{moduleIdName});
        DownloadResults results = installer.install(new PluginList(new URL[]{repo, new URL("http://www.ibiblio.org/maven2/")},
                                                    new PluginMetadata[]{target}), null, null);
        if(results.isFailed()) {
            throw new ServletException("Unable to install sample application", results.getFailure());
        }
        ConfigurationManager mgr = ConfigurationUtil.getConfigurationManager(kernel);
View Full Code Here

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

                if(args.length == 1) {
                    repo = args[0];
                } else {
                    repo = getRepository(out, new BufferedReader(new InputStreamReader(System.in)), mgr);
                }
                PluginList 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+"'");
                }
                Map categories = new HashMap();
                List available = new ArrayList();
                for (int i = 0; i < data.getPlugins().length; i++) {
                    PluginMetadata metadata = data.getPlugins()[i];
                    List list = (List) categories.get(metadata.getCategory());
                    if(list == null) {
                        list = new ArrayList();
                        categories.put(metadata.getCategory(), list);
                    }
View Full Code Here

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

    public PluginList listPlugins(URL mavenRepository, String username, String password) throws FailedLoginException, IOException {
        Set set = kernel.listGBeans(new AbstractNameQuery(PluginInstaller.class.getName()));
        for (Iterator it = set.iterator(); it.hasNext();) {
            AbstractName name = (AbstractName) it.next();
            PluginInstaller installer = (PluginInstaller) kernel.getProxyManager().createProxy(name, PluginInstaller.class);
            PluginList results = installer.listPlugins(mavenRepository, username, password);
            kernel.getProxyManager().destroyProxy(installer);
            return results;
        }
        return null;
    }
View Full Code Here

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

        moduleIdName = moduleIdName.replaceAll("SERVER", getServerType());
        URL repo = getFirstPluginRepository(kernel);
        PluginMetadata target = new PluginMetadata("Sample Application", null, "Samples", "A sample application",
                                                   null, null, null, false, true);
        target.setDependencies(new String[]{moduleIdName});
        DownloadResults results = installer.install(new PluginList(new URL[]{repo, new URL("http://www.ibiblio.org/maven2/")},
                                                    new PluginMetadata[]{target}), null, null);
        if(results.isFailed()) {
            throw new ServletException("Unable to install sample application", results.getFailure());
        }
        ConfigurationManager mgr = ConfigurationUtil.getConfigurationManager(kernel);
View Full Code Here

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

        String repo = request.getParameter("repository");
        String user = request.getParameter("repo-user");
        String pass = request.getParameter("repo-pass");
        PluginMetadata config = null;
        try {
            PluginList list = (PluginList) request.getPortletSession(true).getAttribute(CONFIG_LIST_SESSION_KEY);
            if(list == null) {
                list = PortletManager.getCurrentServer(request).getPluginInstaller().listPlugins(new URL(repo), user, pass);
                request.getPortletSession(true).setAttribute(CONFIG_LIST_SESSION_KEY, list);
            }
            for (int i = 0; i < list.getPlugins().length; i++) {
                PluginMetadata metadata = list.getPlugins()[i];
                if(metadata.getModuleId().toString().equals(configId)) {
                    config = metadata;
                    break;
                }
            }
View Full Code Here

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

                if(commandArgs.getArgs().length == 1) {
                    repo = commandArgs.getArgs()[0];
                } else {
                    repo = getRepository(out, new BufferedReader(new InputStreamReader(System.in)), mgr);
                }
                PluginList 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) {
                    out.println();
                    out.println("No plugins were returned from this site.");
                    return;
                }
                Map categories = new HashMap();
                List available = new ArrayList();
                for (int i = 0; i < data.getPlugins().length; i++) {
                    PluginMetadata metadata = data.getPlugins()[i];
                    List list = (List) categories.get(metadata.getCategory());
                    if(list == null) {
                        list = new ArrayList();
                        categories.put(metadata.getCategory(), list);
                    }
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.