Package org.apache.geronimo.jee.naming

Examples of org.apache.geronimo.jee.naming.Pattern


        Resourceadapter resourceadapter = connectorFactory.createResourceadapter();
        ResourceadapterInstance resourceadapterInstance = connectorFactory.createResourceadapterInstance();
        resourceadapterInstance.setResourceadapterName("resourceadapter-name");
        GbeanLocator gbeanLocator = namingFactory.createGbeanLocator();
        gbeanLocator.setGbeanLink("connector-resourceadapter-workmanager-gbeanlink");
        Pattern namingPattern = namingFactory.createPattern();
        namingPattern.setArtifactId("connector-resourceadapter-workmanager-pattern-artifactid");
        namingPattern.setGroupId("connector-resourceadapter-workmanager-pattern-groupid");
        namingPattern.setModule("connector-resourceadapter-workmanager-pattern-module");
        namingPattern.setName("connector-resourceadapter-workmanager-pattern-name");
        namingPattern.setVersion("connector-resourceadapter-workmanager-pattern-version");
        gbeanLocator.setPattern(namingPattern);
        resourceadapterInstance.setWorkmanager(gbeanLocator);
        configPropertySetting = connectorFactory.createConfigPropertySetting();
        configPropertySetting.setName("resourceadapter-instance-name");
        configPropertySetting.setValue("resourceadapter-instance-value");       
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])) {
                                    Pattern pattern = new Pattern();
                                    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])) {
                                    Pattern pattern = new Pattern();
                                    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();
                Pattern pattern = new Pattern();
                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<Pattern> patternList) {
        for (int i = 0; i < patternList.size(); i++) {
            Pattern 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

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

    /**
     * @return
     */
    private Pattern getPattern() {
        ResourceLocator locator = getResourceLocator();
        Pattern pattern = locator.getPattern();
        if (pattern == null) {
            pattern = namingFactory.createPattern();
            locator.setPattern(pattern);
        }
        return pattern;
View Full Code Here

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

        if (eObject == null) {
            eObject = getEFactory().create(MessageDestination.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
                        Pattern pattern = ((MessageDestination) 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

            unitRef.setPersistenceUnitName(textList.get(1).getText());
            unitRef.setPattern(null);
        }
        else {
            unitRef.setPersistenceUnitName(null);
            Pattern pattern = unitRef.getPattern();
            if (pattern == null) {
                pattern = objectFactory.createPattern();
            }
            pattern.setName(textList.get(2).getText());
            pattern.setGroupId(textList.get(3).getText());
            pattern.setArtifactId(textList.get(4).getText());
            pattern.setVersion(textList.get(5).getText());
            pattern.setModule(textList.get(6).getText());
            unitRef.setPattern(pattern);
        }

        return true;
    }
View Full Code Here

                }
                else if (String.class.isInstance(element)) {
                    return "Gbean type: name = \"" + (String)element + "\"";
                }
                else if (Pattern.class.isInstance(element)) {
                    Pattern pattern = (Pattern)element;
                    return "Pattern: name = \"" + pattern.getName() +
                            "\", group = \"" + pattern.getGroupId() +
                            "\", artifact = \"" + pattern.getArtifactId() +
                            "\", version = \"" + pattern.getVersion() +
                            "\", module = \"" + pattern.getModule() + "\"";
                }

                return null;
            }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.jee.naming.Pattern

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.