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

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


            metadata.setPluginGroup(pluginGroup);

            if (project.getLicenses() != null) {
                for (Object licenseObj : project.getLicenses()) {
                    License license = (License) licenseObj;
                    LicenseType licenseType = new LicenseType();
                    licenseType.setValue(license.getName());
                    licenseType.setOsiApproved(osiApproved);
                    metadata.getLicense().add(licenseType);
                }
            }

            PluginArtifactType instance;
View Full Code Here


            metadata.setPluginGroup(pluginGroup);

            if (project.getLicenses() != null) {
                for (Object licenseObj : project.getLicenses()) {
                    License license = (License) licenseObj;
                    LicenseType licenseType = new LicenseType();
                    licenseType.setValue(license.getName());
                    licenseType.setOsiApproved(osiApproved);
                    metadata.getLicense().add(licenseType);
                }
            }

            PluginArtifactType instance;
View Full Code Here

                    LicenseWizard wizard = new LicenseWizard(null);
                    if (wizard != null) {
                        WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
                        dialog.open();
                        if (dialog.getReturnCode() == Dialog.OK) {
                            LicenseType newLicense = wizard.getLicense();
                            pluginType.getLicense().add(newLicense);
                            loadMetadata(pluginType);
                            activateButtons();
                        }
                    }
                }
            });
            editLicenseButton = createPushButton(licenseButtonComposite, CommonMessages.edit);
            editLicenseButton.addSelectionListener(new SelectionAdapter() {
                public void widgetSelected(SelectionEvent arg0) {
                    LicenseType oldLicense = (LicenseType)licenseTable.getItem(licenseTable.getSelectionIndex()).getData();
                    LicenseWizard wizard = new LicenseWizard(oldLicense);
                    if (wizard != null) {
                        WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
                        dialog.open();
                        if (dialog.getReturnCode() == Dialog.OK) {
                            LicenseType newLicense = wizard.getLicense();
                            int index = pluginType.getLicense().indexOf(oldLicense);
                            pluginType.getLicense().remove(index);
                            pluginType.getLicense().add(index, newLicense);
                            loadMetadata(pluginType);
                            activateButtons();
                        }
                    }
                }
            });
            removeLicenseButton = createPushButton(licenseButtonComposite, CommonMessages.remove);
            removeLicenseButton.addSelectionListener(new SelectionAdapter() {
                public void widgetSelected(SelectionEvent arg0) {
                    LicenseType license;
                    license = (LicenseType)licenseTable.getItem(licenseTable.getSelectionIndex()).getData();
                    pluginType.getLicense().remove(license);
                    loadMetadata(pluginType);
                    activateButtons();
                }
View Full Code Here

            PluginArtifactType instance = pluginType.getPluginArtifact().get(0);
            licenseTable.removeAll();
            List<LicenseType> licenses = pluginType.getLicense();
            for (int i = 0; i < licenses.size(); i++) {
                TableItem tabItem = new TableItem (licenseTable, SWT.NONE);
                LicenseType license = licenses.get(i);
                tabItem.setData(license);
                tabItem.setText(licenseToStringArray(license));
            }
            prereqTable.removeAll();
            List<PrerequisiteType> prereqs = instance.getPrerequisite();
View Full Code Here

        public PluginType getMetadata (PluginType metadata) {
            PluginArtifactType instance = metadata.getPluginArtifact().get(0);

            metadata.getLicense().clear();
            for (int i = 0; i < licenseTable.getItemCount(); i++) {
                LicenseType license = (LicenseType)licenseTable.getItem (i).getData();
                metadata.getLicense().add(license);
            }
            instance.getPrerequisite().clear();
            for (int i = 0; i < prereqTable.getItemCount(); i++) {
                PrerequisiteType prereq = (PrerequisiteType)prereqTable.getItem (i).getData();
View Full Code Here

            return CommonMessages.wizardPageDescription_License;
        }
    }
   
    public boolean performFinish() {
        license = new LicenseType();
        license.setValue(licenseName.getText());
        license.setOsiApproved(Boolean.parseBoolean(osiApproved.getText()));

        return true;
    }
View Full Code Here

        List<LicenseType> licenses = metadata.getLicense();
        if (!licenses.isEmpty()) {
            licenses.remove(0);
        }
        if (licenseString != null && !licenseString.trim().equals("")) {
            LicenseType license = new LicenseType();
            license.setValue(licenseString.trim());
            license.setOsiApproved(osi != null && !osi.equals(""));
            licenses.add(0, license);
        }

        String jvmsString = request.getParameter("jvmVersions");
        split(jvmsString, instance.getJvmVersion());
View Full Code Here

        List<LicenseType> licenses = metadata.getLicense();
        if (!licenses.isEmpty()) {
            licenses.remove(0);
        }
        if (licenseString != null && !licenseString.trim().equals("")) {
            LicenseType license = new LicenseType();
            license.setValue(licenseString.trim());
            license.setOsiApproved(osi != null && !osi.equals(""));
            licenses.add(0, license);
        }

        String jvmsString = request.getParameter("jvmVersions");
        split(jvmsString, instance.getJvmVersion());
View Full Code Here

            if ((license == null) != (that.license == null)) return false;
            if (license != null) {
                if (license.size() != that.license.size()) return false;
                int i = 0;
                for (LicenseType licenseType : license) {
                    LicenseType otherLicense = that.license.get(i++);
                    if (licenseType.isOsiApproved() != otherLicense.isOsiApproved()) return false;
                    if (licenseType.getValue() != null ? !licenseType.getValue().equals(otherLicense.getValue()) : otherLicense.getValue() != null) return false;
                }
            }

            return true;
        }
View Full Code Here

        List<LicenseType> licenses = metadata.getLicense();
        if (!licenses.isEmpty()) {
            licenses.remove(0);
        }
        if (licenseString != null && !licenseString.trim().equals("")) {
            LicenseType license = new LicenseType();
            license.setValue(licenseString.trim());
            license.setOsiApproved(osi != null && !osi.equals(""));
            licenses.add(0, license);
        }

        String jvmsString = request.getParameter("jvmVersions");
        split(jvmsString, instance.getJvmVersion());
View Full Code Here

TOP

Related Classes of org.apache.geronimo.system.plugin.model.LicenseType

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.