Package javax.enterprise.deploy.model

Examples of javax.enterprise.deploy.model.DDBean


    public static XpathListener initialize(DDBean parentDDBean, final ConfigPropertiesHelper.ConfigPropertiesSource configPropertiesSource, String configPropertyXPath, String configPropertyNameXPath) {
        DDBean[] beans = parentDDBean.getChildBean(configPropertyXPath);
        ConfigPropertySettings[] configs = new ConfigPropertySettings[beans.length];
        Set xmlBeans = new HashSet(Arrays.asList(configPropertiesSource.getConfigPropertySettingArray()));
        for (int i = 0; i < beans.length; i++) {
            DDBean bean = beans[i];
            String[] names = bean.getText(configPropertyNameXPath);
            String name = names.length == 1 ? names[0] : "";
            GerConfigPropertySettingType target = null;
            for (Iterator it = xmlBeans.iterator(); it.hasNext();) {
                GerConfigPropertySettingType setting = (GerConfigPropertySettingType) it.next();
                if (setting.getName().equals(name)) {
View Full Code Here


    }

    void initialize(GerAdminobjectInstanceType xmlObject, AdminObjectDConfigBean parent) {
        setXmlObject(xmlObject);
        this.parent = parent;
        DDBean parentDDBean = parent.getDDBean();
        configListener = ConfigPropertiesHelper.initialize(parentDDBean, new ConfigPropertiesHelper.ConfigPropertiesSource() {
            public GerConfigPropertySettingType[] getConfigPropertySettingArray() {
                return getAdminobjectInstance().getConfigPropertySettingArray();
            }
View Full Code Here

    }

    void initialize(GerConnectiondefinitionInstanceType xmlObject, ConnectionDefinitionDConfigBean parent) {
        setXmlObject(xmlObject);
        this.parent = parent;
        DDBean parentDDBean = parent.getDDBean();
        configListener = ConfigPropertiesHelper.initialize(parentDDBean, new ConfigPropertiesHelper.ConfigPropertiesSource() {
            public GerConfigPropertySettingType[] getConfigPropertySettingArray() {
                return getConnectiondefinitionInstance().getConfigPropertySettingArray();
            }
View Full Code Here

        GerConnectionDefinitionType[] connectionDefinitions = outboundResourceadapter.getConnectionDefinitionArray();

        if (connectionDefinitions.length == 0) {
            //we are new
            for (int i = 0; i < connectionDefinitionDDBeans.length; i++) {
                DDBean connectionDefinitionDdBean = connectionDefinitionDDBeans[i];
                GerConnectionDefinitionType connectionDefinition = outboundResourceadapter.addNewConnectionDefinition();
                String connectionfactoryInterface = connectionDefinitionDdBean.getText("connectionfactory-interface")[0];
                ConnectionDefinitionDConfigBean connectionDefinitionDConfigBean = new ConnectionDefinitionDConfigBean(connectionDefinitionDdBean, connectionDefinition);
                connectionDefinitionsMap.put(connectionfactoryInterface, connectionDefinitionDConfigBean);
            }
        } else {
            //we are read in from xml.  Check correct length
            assert connectionDefinitionDDBeans.length == connectionDefinitions.length;
            for (int i = 0; i < connectionDefinitionDDBeans.length; i++) {
                DDBean connectionDefinitionDdBean = connectionDefinitionDDBeans[i];
                GerConnectionDefinitionType connectionDefinition = connectionDefinitions[i];
                String connectionfactoryInterface = connectionDefinitionDdBean.getText("connectionfactory-interface")[0];
                assert connectionfactoryInterface.equals(connectionDefinition.getConnectionfactoryInterface());
                ConnectionDefinitionDConfigBean connectionDefinitionDConfigBean = new ConnectionDefinitionDConfigBean(connectionDefinitionDdBean, connectionDefinition);
                connectionDefinitionsMap.put(connectionfactoryInterface, connectionDefinitionDConfigBean);
            }
        }
View Full Code Here

        GerConnectionDefinitionType connectionDefinition = getConnectorDocument().addNewConnector().addNewResourceadapter().addNewOutboundResourceadapter().addNewConnectionDefinition();
        replaceConnectionDefinitionDConfigBean(connectionDefinition);
    }

    private void replaceConnectionDefinitionDConfigBean(GerConnectionDefinitionType connectionDefinition) {
        DDBean ddBean = getDDBean();
        DDBean childDDBean = ddBean.getChildBean(getXpaths()[0])[0];
        connectionDefinitionDConfigBean = new ConnectionDefinitionDConfigBean(childDDBean, connectionDefinition);
    }
View Full Code Here

        GerWebAppType webApp = getWebAppDocument().addNewWebApp();
        replaceWebAppDConfigBean(webApp);
    }

    private void replaceWebAppDConfigBean(GerWebAppType webApp) {
        DDBean ddBean = getDDBean();
        webAppBean = new WebAppDConfigBean(ddBean.getChildBean(XPATHS[0])[0], webApp);
    }
View Full Code Here

        assertNull(root.getText("foo"));
        assertTrue(Arrays.equals(new String[] {"Test DD for app-client1"}, root.getText("application-client/description")));
        assertTrue(Arrays.equals(new String[] {"http://localhost"}, root.getText("application-client/env-entry/env-entry-value")));
        assertTrue(Arrays.equals(new String[] {"url/test1", "url/test2"}, root.getText("application-client/env-entry/env-entry-name")));

        DDBean description = root.getChildBean("application-client/description")[0];
        assertEquals("Test DD for app-client1", description.getText());
        assertEquals("application-client/description", description.getXpath());
        assertEquals(description, description.getChildBean("/application-client/description")[0]);
    }
View Full Code Here

        GerWebAppType webApp = getWebAppDocument().addNewWebApp();
        replaceWebAppDConfigBean(webApp);
    }

    private void replaceWebAppDConfigBean(GerWebAppType webApp) {
        DDBean ddBean = getDDBean();
        webAppBean = new WebAppDConfigBean(ddBean.getChildBean(XPATHS[0])[0], webApp);
    }
View Full Code Here

            }
            DDBean[] definitions = ddBeanRoot.getChildBean("connector/resourceadapter/outbound-resourceadapter/connection-definition");
            List configs = new ArrayList();
            if(definitions != null) {
                for (int i = 0; i < definitions.length; i++) {
                    DDBean definition = definitions[i];
                    String iface = definition.getText("connectionfactory-interface")[0];
                    if(iface.equals("javax.sql.DataSource")) {
                        DDBean[] beans = definition.getChildBean("config-property");
                        for (int j = 0; j < beans.length; j++) {
                            DDBean bean = beans[j];
                            String name = bean.getText("config-property-name")[0].trim();
                            String type = bean.getText("config-property-type")[0].trim();
                            test = bean.getText("config-property-value");
                            String value = test == null || test.length == 0 ? null : test[0].trim();
                            test = bean.getText("description");
                            String desc = test == null || test.length == 0 ? null : test[0].trim();
                            configs.add(new ConfigParam(name, type, desc, value));
                        }
                    }
                }
View Full Code Here

        GerWebAppType webApp = getWebAppDocument().addNewWebApp();
        replaceWebAppDConfigBean(webApp);
    }

    private void replaceWebAppDConfigBean(GerWebAppType webApp) {
        DDBean ddBean = getDDBean();
        webAppBean = new WebAppDConfigBean(ddBean.getChildBean(XPATHS[0])[0], webApp);
    }
View Full Code Here

TOP

Related Classes of javax.enterprise.deploy.model.DDBean

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.