Examples of PluginType


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

        artifact.setType(id.getType());
        return artifact;
    }

    public static PluginType copy(PluginType metadata, PluginArtifactType instance) {
        PluginType copy = new PluginType();
        copy.setAuthor(metadata.getAuthor());
        copy.setCategory(metadata.getCategory());
        copy.setDescription(metadata.getDescription());
        copy.setName(metadata.getName());
        copy.setUrl(metadata.getUrl());
        copy.getLicense().addAll(metadata.getLicense());
        if (instance != null) {
            copy.getPluginArtifact().add(instance);
        }
        return copy;
    }
View Full Code Here

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

        }
        return copy;
    }

    public static PluginType toKey(PluginType metadata) {
        PluginType copy = new PluginKey();
        copy.setAuthor(metadata.getAuthor());
        copy.setCategory(metadata.getCategory());
        copy.setName(metadata.getName());
        copy.setUrl(metadata.getUrl());
        copy.getLicense().addAll(metadata.getLicense());
        return copy;
    }
View Full Code Here

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

            Collection<PluginType> items = entry.getValue();
            consoleReader.printString(category);
            consoleReader.printNewline();
            for (PluginType metadata : items) {
                for (PluginArtifactType instance : metadata.getPluginArtifact()) {
                    PluginType copy = PluginInstallerGBean.copy(metadata, instance);
                    available.add(copy);
                    DeployUtils.printTo("  " + available.size() + ":  ", 10, consoleReader);
                    DeployUtils.println(metadata.getName() + " (" + instance.getModuleId().getVersion() + ")", 0, consoleReader);
                }
            }
        }
        if (available.size() == 0) {
            consoleReader.printNewline();
            consoleReader.printString("No plugins from this site are eligible for installation.");
            consoleReader.printNewline();
            return null;
        }
        consoleReader.printNewline();
        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);
        }
View Full Code Here

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

    }

    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);
View Full Code Here

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

        }
    }


    private PluginType toPluginType(Artifact artifact) {
        PluginType plugin = new PluginType();
        PluginArtifactType instance = new PluginArtifactType();
        ArtifactType artifactType = PluginInstallerGBean.toArtifactType(artifact);
        instance.setModuleId(artifactType);
        plugin.getPluginArtifact().add(instance);
        return plugin;
    }
View Full Code Here

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

    }

    protected PluginListType getPluginsFromIds(String[] configIds, PluginListType list) throws PortletException {
        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);
View Full Code Here

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

    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
        String configId = request.getParameter("configId");
        PluginInstaller pluginInstaller = ManagementHelper.getManagementHelper(request).getPluginInstaller();
        Artifact newArtifact = Artifact.create(configId)
        PluginType metadata = pluginInstaller.getPluginMetadata(newArtifact)
        PluginArtifactType instance = metadata.getPluginArtifact().get(0);
        request.setAttribute("configId", PluginInstallerGBean.toArtifact(instance.getModuleId()).toString());
        request.setAttribute("name", metadata.getName());
        request.setAttribute("repository", combine(instance.getSourceRepository()));
        request.setAttribute("category", metadata.getCategory());
        request.setAttribute("url", metadata.getUrl());
        request.setAttribute("author", metadata.getAuthor());
        request.setAttribute("description", metadata.getDescription());
        List<LicenseType> licenses = metadata.getLicense();
        if (licenses != null && licenses.size() > 0) {
            request.setAttribute("license", licenses.get(0).getValue());
            if (licenses.get(0).isOsiApproved()) {
                request.setAttribute("licenseOSI", "true");
            }
View Full Code Here

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

    }

    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
        String configId = request.getParameter("configId");
        PluginInstaller pluginInstaller = ManagementHelper.getManagementHelper(request).getPluginInstaller();
        PluginType metadata = pluginInstaller.getPluginMetadata(Artifact.create(configId));
        PluginArtifactType instance = metadata.getPluginArtifact().get(0);

        String name = request.getParameter("name");
        metadata.setName(name);
        metadata.setCategory(request.getParameter("category"));
        metadata.setUrl(request.getParameter("url"));
        metadata.setAuthor(request.getParameter("author"));
        metadata.setDescription(request.getParameter("description"));
        String licenseString = request.getParameter("license");
        String osi = request.getParameter("licenseOSI");
        List<LicenseType> licenses = metadata.getLicense();
        if (!licenses.isEmpty()) {
            licenses.remove(0);
        }
        if (licenseString != null && !licenseString.trim().equals("")) {
            LicenseType license = new LicenseType();
View Full Code Here

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

            Collection<PluginType> items = entry.getValue();
            consoleReader.printString(category);
            consoleReader.printNewline();
            for (PluginType metadata : items) {
                for (PluginArtifactType instance : metadata.getPluginArtifact()) {
                    PluginType copy = PluginInstallerGBean.copy(metadata, instance);
                    available.add(copy);
                    DeployUtils.printTo("  " + available.size() + ":  ", 10, consoleReader);
                    DeployUtils.println(metadata.getName() + " (" + instance.getModuleId().getVersion() + ")", 0, consoleReader);
                }
            }
        }
        if (available.size() == 0) {
            consoleReader.printNewline();
            consoleReader.printString("No plugins from this site are eligible for installation.");
            consoleReader.printNewline();
            return null;
        }
        consoleReader.printNewline();
        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);
View Full Code Here

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

    }

    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);
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.