Package org.apache.geronimo.xml.ns.naming_1

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


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


     * @param plan
     */
    public WebContainerSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
        super(parent, toolkit, style, plan);
        this.plan = (WebAppType) plan.getValue();
        namingFactory = new ObjectFactory();
        createClient();
    }
View Full Code Here

     * @param plan
     */
    public OpenEjbJarCMPSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
        super(parent, toolkit, style, plan);
        this.plan = (OpenejbJarType) plan.getValue();
        namingFactory = new ObjectFactory();
        createClient();
    }
View Full Code Here

                        if (value instanceof String[]) {
                            List<String> interfaces = Arrays
                                    .asList((String[]) value);
                            for (int j = 0; j < acceptedValues.length; j++) {
                                if (interfaces.contains(acceptedValues[j])) {
                                  PatternType pattern = new PatternType();
                                    Artifact artifact = abstractName
                                            .getArtifact();
                                    pattern.setArtifactId(artifact
                                            .getArtifactId());
                                    pattern.setGroupId(artifact.getGroupId());
                                    pattern.setVersion(artifact.getVersion()
                                            .toString());
                                    pattern.setName((String) abstractName
                                            .getName().get("name"));
                                    if (!result.contains(pattern)) {
                                        result.add(pattern);
                                    }
                                    break;
                                }
                            }
                        }
                        if (value instanceof String) {
                            String interfaces = (String) value;
                            for (int j = 0; j < acceptedValues.length; j++) {
                                if (interfaces.contains(acceptedValues[j])) {
                                  PatternType pattern = new PatternType();
                                    Artifact artifact = abstractName
                                            .getArtifact();
                                    pattern.setArtifactId(artifact
                                            .getArtifactId());
                                    pattern.setGroupId(artifact.getGroupId());
                                    pattern.setVersion(artifact.getVersion()
                                            .toString());
                                    pattern.setName((String) abstractName
                                            .getName().get("name"));
                                    if (!result.contains(pattern)) {
                                        result.add(pattern);
                                    }
                                    break;
View Full Code Here

                Collections.EMPTY_SET);
        for (int i = 0; i < kernels.size(); i++) {
            Set beans = kernels.get(i).listGBeans(query);
            for (Iterator it = beans.iterator(); it.hasNext();) {
                AbstractName abstractName = (AbstractName) it.next();
                PatternType pattern = new PatternType();
                Artifact artifact = abstractName.getArtifact();
                pattern.setArtifactId(artifact.getArtifactId());
                pattern.setGroupId(artifact.getGroupId());
                pattern.setVersion(artifact.getVersion().toString());
                pattern.setName((String) abstractName.getName().get("name"));
                if (!result.contains(pattern)) {
                    result.add(pattern);
                }
            }
        }
View Full Code Here

        return result;
    }

    protected void printNamingPatternList(List<PatternType> patternList) {
        for (int i = 0; i < patternList.size(); i++) {
          PatternType pattern = patternList.get(i);
            System.out.println("ArtifactID:" + pattern.getArtifactId()
                    + " GroupID:" + pattern.getGroupId() + " Module:"
                    + pattern.getModule() + " Version:" + pattern.getVersion()
                    + " Name:" + pattern.getName());
        }
    }
View Full Code Here

        }
        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());
            pattern.setModule(textList.get(4).getText());
        }
        return true;
    }
View Full Code Here

        }
    }
   
    public boolean performFinish() {
        AbstractTableWizardPage page = (AbstractTableWizardPage) getPages()[0];
        PatternType msgPattern;
        MessageDestinationType messageDest;

        if (eObject == null) {
            eObject = getEFactory().create(MessageDestinationType.class);
            JAXBElement plan = section.getPlan();
View Full Code Here

                data.widthHint = 100;
                text.setLayoutData(data);
                if (eObject != null) {
                    if (i > 2) {
                        // get the pattern value
                        PatternType pattern = ((MessageDestinationType) eObject).getPattern();
                        String value = null;
            try {
              value = (String) JAXBUtils.getValue(pattern,getTableColumnEAttributes()[i]);
            } catch (Exception e) {
              MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
View Full Code Here

    /**
     * @return
     */
    private PatternType getPattern() {
        GbeanLocatorType locator = getGBeanLocator();
        PatternType pattern = locator.getPattern();
        if (pattern == null) {
            pattern = namingFactory.createPatternType();
            locator.setPattern(pattern);
        }
        return pattern;
View Full Code Here

TOP

Related Classes of org.apache.geronimo.xml.ns.naming_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.