Examples of GbeanType


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

            module.setComment(comment.trim());
        }

        // GBeans
        for (GBeanOverride gbeanOverride : gbeans.values()) {
            GbeanType gbean = gbeanOverride.writeXml();
            module.getGbean().add(gbean);
        }
        return module;
    }
View Full Code Here

Examples of org.apache.geronimo.xml.ns.deployment_1.GbeanType

        addPage(new GBeanWizardPage("Page0"));
    }

    @Override
    public boolean performFinish() {
        GbeanType gbean;
        switch (element.getSelectionIndex()) {
        case GBEAN:
            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
                return false;
            }
            gbean = (GbeanType)eObject;
            if (gbean == null) {
                gbean = (GbeanType)getEFactory().create(GbeanType.class);
                JAXBElement plan = section.getPlan();
               
                // add the JAXBElement of a GBean, not the GBean
                ObjectFactory objectFactory = new ObjectFactory();
                JAXBModelUtils.getGbeans(plan).add(objectFactory.createGbean((GbeanType)gbean));
            }
            gbean.setName(textList.get(0).getText());
            gbean.setClazz(textList.get(1).getText());
            break;

        case ATTRIBUTE:
            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
                return false;
            }
            AttributeType attribute = (AttributeType)eObject;
            if (attribute == null) {
                attribute = (AttributeType)getEFactory().create(AttributeType.class);
                gbean = (GbeanType)section.getSelectedObject();
               
                // add the JAXBElement of an Attribute, not the Attribute
                ObjectFactory objectFactory = new ObjectFactory();
                gbean.getAttributeOrXmlAttributeOrReference().add(objectFactory.createGbeanTypeAttribute(attribute));
            }
            attribute.setName(textList.get(0).getText());
            attribute.setType(textList.get(1).getText());
            attribute.setValue(textList.get(2).getText());
            break;

        case DEPENDENCY:
            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
                return false;
            }
            PatternType dependency = (PatternType)eObject;
            if (dependency == null) {
                dependency = (PatternType)getEFactory().create(PatternType.class);
                gbean = (GbeanType)section.getSelectedObject();

                // add the JAXBElement of a Dependency, not the Dependency
                ObjectFactory objectFactory = new ObjectFactory();
                gbean.getAttributeOrXmlAttributeOrReference().add(objectFactory.createGbeanTypeDependency(dependency));
            }
            dependency.setGroupId(textList.get(0).getText());
            dependency.setArtifactId(textList.get(1).getText());
            dependency.setVersion(textList.get(2).getText());
            dependency.setModule(textList.get(3).getText());
            dependency.setType(textList.get(4).getText());
            dependency.setCustomFoo(textList.get(5).getText());
            break;

        case REFERENCE:
            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText()) ||
                    isEmpty(textList.get(2).getText())) {
                return false;
            }
            ReferenceType reference = (ReferenceType)eObject;
            if (reference == null) {
                reference = (ReferenceType)getEFactory().create(ReferenceType.class);
                gbean = (GbeanType)section.getSelectedObject();

                // add the JAXBElement of a Dependency, not the Dependency
                ObjectFactory objectFactory = new ObjectFactory();
                gbean.getAttributeOrXmlAttributeOrReference().add(objectFactory.createGbeanTypeReference(reference));
            }
            reference.setName(textList.get(0).getText());
            reference.setGroupId(textList.get(1).getText());
            reference.setArtifactId(textList.get(2).getText());
            reference.setVersion(textList.get(3).getText());
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.