Package org.apache.geronimo.xml.ns.deployment_1

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


        EnvironmentType type = getEnvironment(false);
        return type != null && type.getInverseClassloading() != null;
    }

    protected boolean isSuppressDefaultEnvironment() {
        EnvironmentType type = getEnvironment(false);
        return type != null && type.getSuppressDefaultEnvironment() != null;
    }
View Full Code Here


        return false;
    }

    protected void setInverseClassloading(boolean enable) {
        if (enable) {
            EnvironmentType type = getEnvironment(true);
            type.setInverseClassloading(getDeploymentObjectFactory().createEmptyType());
        } else {
            EnvironmentType type = getEnvironment(false);
            if (type != null) {
                type.setInverseClassloading(null);
            }
        }
    }
View Full Code Here

        }
    }

    protected void setSuppressDefaultEnvironment(boolean enable) {
        if (enable) {
            EnvironmentType type = getEnvironment(true);
            type.setSuppressDefaultEnvironment(getDeploymentObjectFactory().createEmptyType());
        } else {
            EnvironmentType type = getEnvironment(false);
            if (type != null) {
                type.setSuppressDefaultEnvironment(null);
            }
        }
    }
View Full Code Here

        }
        return null;
    }

    protected EnvironmentType getEnvironment(boolean create) {
        EnvironmentType type = null;
        Object plan = getPlan().getValue();
        if (WebAppType.class.isInstance(plan)) {
            type = ((WebAppType) plan).getEnvironment();
            if (type == null && create) {
                type = getDeploymentObjectFactory().createEnvironmentType();
View Full Code Here

        return type;
    }
   
    private DependenciesType getDependencies(boolean create) {
        EnvironmentType env = getEnvironment(create);
        if(env != null) {
            DependenciesType dep = env.getDependencies();
            if (dep == null && create) {
                dep = getDeploymentObjectFactory().createDependenciesType();
                env.setDependencies(dep);
            }
            return dep;
        }
        return null;
    }
View Full Code Here

        }
        return null;
    }

    private ArtifactType getModuleId(boolean create) {
        EnvironmentType type = getEnvironment(create);
        if (type != null) {
            ArtifactType moduleId = type.getModuleId();
            if (moduleId == null && create) {
                moduleId = getDeploymentObjectFactory().createArtifactType();
                type.setModuleId(moduleId);
            }
            return moduleId;
        }
        return null;
    }
View Full Code Here

        return getDependencies().getDependency();
    }

    private DependenciesType getDependencies() {
        if (environment == null) {
            environment = new EnvironmentType();
        }
        if (environment.getDependencies() == null) {
            environment.setDependencies(new DependenciesType());
        }
        return environment.getDependencies();
View Full Code Here

        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

        Object object = element.getValue();
        if (GbeanType.class.isInstance(object)) {
            objectContainer.remove(anItem);
        }
        else {
          GbeanType gbean = (GbeanType)((JAXBElement)tree.getSelection()[0].getParentItem().getData()).getValue();
            gbean.getAttributeOrXmlAttributeOrReference().remove(element);
        }
    }
View Full Code Here

                    return ((List)parentElement).toArray();
                }
                if (JAXBElement.class.isInstance(parentElement)) {
                    Object object = ((JAXBElement)parentElement).getValue();
                    if (GbeanType.class.isInstance(object)) {
                      GbeanType gbean = (GbeanType)object;
                        return gbean.getAttributeOrXmlAttributeOrReference().toArray();
                    }
                }
                return new String[] {};
            }
        };
View Full Code Here

TOP

Related Classes of org.apache.geronimo.xml.ns.deployment_1.ObjectFactory

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.