Examples of GbeanRefType


Examples of org.apache.geronimo.xml.ns.naming_1.GbeanRefType

        }
    }

    @Override
    public boolean performFinish() {
        GbeanRefType gbeanRef;
        if (element.getText().equals(elementTypes[GBEAN_REF])) {
            if (isEmpty(textList.get(0).getText())) {
                return false;
            }
            gbeanRef = (GbeanRefType)eObject;
            if (gbeanRef == null) {
                gbeanRef = (GbeanRefType)getEFactory().create(GbeanRefType.class);
                JAXBElement plan = section.getPlan();

                // if we have a WebApp, add the JAXBElement of the GBeanRef, not the GBeanRef
                if (WebAppType.class.isInstance(plan.getValue())) {
                    ObjectFactory objectFactory = new ObjectFactory();
                    JAXBModelUtils.getGbeanRefs(plan).add(objectFactory.createGbeanRef(gbeanRef));
                    section.getObjectContainer().add(objectFactory.createGbeanRef(gbeanRef));
                }
                else {
                    JAXBModelUtils.getGbeanRefs(plan).add(gbeanRef);
                    section.getObjectContainer().add(gbeanRef);
                }
            }
            gbeanRef.setRefName(textList.get(0).getText());
        }
        else if (element.getText().equals(elementTypes[GBEAN_TYPE])) {
            if (isEmpty(textList.get(0).getText())) {
                return false;
            }
            String type = (String)eObject;
            gbeanRef = (GbeanRefType)section.getSelectedObject();
            if (type == null) {
                gbeanRef.getRefType().add(textList.get(0).getText());
            }
            else {
                gbeanRef.getRefType().set(gbeanRef.getRefType().indexOf(type), textList.get(0).getText());
            }
        }
        else if (element.getText().equals(elementTypes[PATTERN])) {
            if (isEmpty(textList.get(0).getText())) {
                return false;
            }
            PatternType pattern = (PatternType)eObject;
            if (pattern == null) {
                pattern = (PatternType)getEFactory().create(PatternType.class);
                gbeanRef = (GbeanRefType)section.getSelectedObject();
                gbeanRef.getPattern().add(pattern);
            }
            pattern.setName(textList.get(0).getText());
            pattern.setGroupId(textList.get(1).getText());
            pattern.setArtifactId(textList.get(2).getText());
            pattern.setVersion(textList.get(3).getText());
View Full Code Here

Examples of org.apache.geronimo.xml.ns.naming_1.GbeanRefType

        }

        protected void initControl () {
            if (eObject == null) {
                element.select(GBEAN_REF);
                GbeanRefType gbeanRef = (GbeanRefType)section.getSelectedObject();
                if (gbeanRef == null) {
                    element.setEnabled(false);
                }
            }
            else {
View Full Code Here

Examples of org.apache.geronimo.xml.ns.naming_1.GbeanRefType

                }
                if (JAXBElement.class.isInstance(parentElement)) {
                    parentElement = ((JAXBElement)parentElement).getValue();
                }
                if (GbeanRefType.class.isInstance(parentElement)) {
                  GbeanRefType gbeanRef = (GbeanRefType)parentElement;
                    Object[] typeList = gbeanRef.getRefType().toArray();
                    Object[] patternList = gbeanRef.getPattern().toArray();
                    Object[] fullList = new Object[typeList.length + patternList.length];
                    System.arraycopy(typeList, 0, fullList, 0, typeList.length);
                    System.arraycopy(patternList, 0, fullList, typeList.length, patternList.length);
                    return fullList;
                }
View Full Code Here

Examples of org.apache.geronimo.xml.ns.naming_1.GbeanRefType

            public String getText(Object element) {
                if (JAXBElement.class.isInstance(element)) {
                    element = ((JAXBElement)element).getValue();
                }
                if (GbeanRefType.class.isInstance(element)) {
                  GbeanRefType gbeanRef = (GbeanRefType)element;
                    return "Gbean Ref: name = \"" + gbeanRef.getRefName() + "\"";
                }
                else if (String.class.isInstance(element)) {
                    return "Gbean type: name = \"" + (String)element + "\"";
                }
                else if (PatternType.class.isInstance(element)) {
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.