Examples of EnvironmentData


Examples of org.apache.geronimo.deployment.service.jsr88.EnvironmentData

    public EnvironmentData getEnvironment() {
        return environment;
    }

    public void setEnvironment(EnvironmentData environment) {
        EnvironmentData old = this.environment;
        this.environment = environment;
        if ((old == null && environment == null) || (old != null && old == environment)) {
            return;
        }
        if (old != null) {
View Full Code Here

Examples of org.apache.geronimo.deployment.service.jsr88.EnvironmentData

        WebAppDConfigRoot configRoot = (WebAppDConfigRoot) deploymentConfiguration.getDConfigBeanRoot(ddBeanRoot);
        WebAppDConfigBean webApp = (WebAppDConfigBean) configRoot.getDConfigBean(ddBean);

        webApp.setContextRoot(data.getContextRoot());

        EnvironmentData environment = new EnvironmentData();
        webApp.setEnvironment(environment);
        org.apache.geronimo.deployment.service.jsr88.Artifact configId = new org.apache.geronimo.deployment.service.jsr88.Artifact();
        environment.setConfigId(configId);
        configId.setGroupId(data.getGroupId());
        configId.setArtifactId(data.getArtifactId());
        configId.setVersion(data.getVersion());
        configId.setType(data.getType());
        int numDependencies = data.getDependencies().size();
        if (numDependencies > 0) {
            org.apache.geronimo.deployment.service.jsr88.Artifact[] dependencies = new org.apache.geronimo.deployment.service.jsr88.Artifact[numDependencies];
            for (int i = 0; i < numDependencies; i++) {
                dependencies[i] = new org.apache.geronimo.deployment.service.jsr88.Artifact();
            }
            environment.setDependencies(dependencies);
            for (int i = 0; i < numDependencies; i++) {
                Artifact artifact = Artifact.create(((String) data.getDependencies().get(i)).trim());
                org.apache.geronimo.deployment.service.jsr88.Artifact dep = dependencies[i];
                dep.setArtifactId(artifact.getArtifactId());
                if (artifact.getGroupId() != null) {
                    dep.setGroupId(artifact.getGroupId());
                }
                if (artifact.getType() != null) {
                    dep.setType(artifact.getType());
                }
                if (artifact.getVersion() != null) {
                    dep.setVersion(artifact.getVersion().toString());
                }
            }
        }
        String hiddenClassesString = data.getHiddenClasses();
        if (hiddenClassesString != null && hiddenClassesString.length() > 0) {
            String[] hiddenClasses = getNonEmptyStrings(hiddenClassesString.split(";"));
            if (hiddenClasses.length > 0) {
                environment.setHiddenClasses(hiddenClasses);
            }
        }
        String nonOverridableClassesString = data.getNonOverridableClasses();
        if (nonOverridableClassesString != null && nonOverridableClassesString.length() > 0) {
            String[] nonOverridableClasses = getNonEmptyStrings(nonOverridableClassesString.split(";"));
            if (nonOverridableClasses.length > 0) {
                environment.setNonOverridableClasses(nonOverridableClasses);
            }
        }
        if (data.isInverseClassLoading()) {
            environment.setInverseClassLoading(true);
        }

        int numEjbRefs = data.getEjbRefs().size();
        if (numEjbRefs > 0) {
            EjbRef[] ejbRefs = new EjbRef[numEjbRefs];
View Full Code Here

Examples of org.apache.geronimo.deployment.service.jsr88.EnvironmentData

        assertEquals("connector", dcbRoot.getXpaths()[0]);
        // Try the /connector element
        ConnectorDCB connector = (ConnectorDCB) dcbRoot.getDConfigBean(root.getChildBean(dcbRoot.getXpaths()[0])[0]);
        assertNotNull(connector);
        assertNull(connector.getEnvironment());
        EnvironmentData environment = new EnvironmentData();
        connector.setEnvironment(environment);
        Artifact configId = new Artifact();
        environment.setConfigId(configId);
        assertNull(configId.getArtifactId());
        assertNull(configId.getGroupId());
        assertNull(configId.getType());
        assertNull(configId.getVersion());
        configId.setGroupId("test");
        configId.setArtifactId("product");
        configId.setType("rar");
        configId.setVersion("1.0");
        Artifact parent = new Artifact();
        Artifact dependency = new Artifact();
        environment.setDependencies(new Artifact[]{parent, dependency});
        assertNull(parent.getArtifactId());
        assertNull(parent.getGroupId());
        assertNull(parent.getType());
        assertNull(parent.getVersion());
        assertNull(dependency.getArtifactId());
View Full Code Here

Examples of org.apache.geronimo.deployment.service.jsr88.EnvironmentData

                DeploymentConfiguration config = mgr.createConfiguration(deployable);
                final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
                Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
                ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);

                EnvironmentData environment = new EnvironmentData();
                connector.setEnvironment(environment);
                org.apache.geronimo.deployment.service.jsr88.Artifact configId = new org.apache.geronimo.deployment.service.jsr88.Artifact();
                environment.setConfigId(configId);
                configId.setGroupId("console.jms");
                configId.setArtifactId(data.instanceName);
                configId.setVersion("1.0");
                configId.setType("rar");
                if(data.dependency != null && !data.dependency.trim().equals("")) {
                    Artifact artifact = Artifact.create(data.dependency.trim());
                    org.apache.geronimo.deployment.service.jsr88.Artifact dep = new org.apache.geronimo.deployment.service.jsr88.Artifact();
                    environment.setDependencies(new org.apache.geronimo.deployment.service.jsr88.Artifact[]{dep});
                    dep.setArtifactId(artifact.getArtifactId());
                    if(artifact.getGroupId() != null) {
                        dep.setGroupId(artifact.getGroupId());
                    }
                    if(artifact.getType() != null) {
View Full Code Here

Examples of org.apache.geronimo.deployment.service.jsr88.EnvironmentData

                final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
                Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
                ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(
                        ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);

                EnvironmentData environment = new EnvironmentData();
                connector.setEnvironment(environment);
                org.apache.geronimo.deployment.service.jsr88.Artifact configId = new org.apache.geronimo.deployment.service.jsr88.Artifact();
                environment.setConfigId(configId);
                configId.setGroupId("console.dbpool");
                String artifactId = data.name;
                if (artifactId.indexOf('/') != -1) {
                    // slash in artifact-id results in invalid configuration-id and leads to deployment errors
                    artifactId = artifactId.replaceAll("/", "%2F");
                }
                configId.setArtifactId(artifactId);
                configId.setVersion("1.0");
                configId.setType("rar");

                String[] jars = data.getJars();
                int length = jars[jars.length - 1].length() == 0 ? jars.length - 1 : jars.length;
                org.apache.geronimo.deployment.service.jsr88.Artifact[] dependencies = new org.apache.geronimo.deployment.service.jsr88.Artifact[length];
                for (int i = 0; i < dependencies.length; i++) {
                    dependencies[i] = new org.apache.geronimo.deployment.service.jsr88.Artifact();
                }
                environment.setDependencies(dependencies);
                for (int i = 0; i < dependencies.length; i++) {
                    Artifact tmp = Artifact.create(jars[i]);
                    dependencies[i].setGroupId(tmp.getGroupId());
                    dependencies[i].setArtifactId(tmp.getArtifactId());
                    dependencies[i].setVersion(tmp.getVersion().toString());
View Full Code Here

Examples of org.apache.geronimo.deployment.service.jsr88.EnvironmentData

                DeploymentConfiguration config = mgr.createConfiguration(deployable);
                final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
                Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
                ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);
               
                EnvironmentData environment = new EnvironmentData();
                connector.setEnvironment(environment);
                org.apache.geronimo.deployment.service.jsr88.Artifact configId = new org.apache.geronimo.deployment.service.jsr88.Artifact();
                environment.setConfigId(configId);
                configId.setGroupId("console.dbpool");
                String artifactId = data.name;
                if(artifactId.indexOf('/') != -1) {
                    // slash in artifact-id results in invalid configuration-id and leads to deployment errors
                    artifactId = artifactId.replaceAll("/", "%2F");
                }
                configId.setArtifactId(artifactId);
                configId.setVersion("1.0");
                configId.setType("rar");

                String[] jars = data.getJars();
                int length = jars[jars.length - 1].length() ==0? jars.length -1: jars.length;
                org.apache.geronimo.deployment.service.jsr88.Artifact[] dependencies = new org.apache.geronimo.deployment.service.jsr88.Artifact[length];
                for (int i=0; i<dependencies.length; i++) {
                  dependencies[i] = new org.apache.geronimo.deployment.service.jsr88.Artifact();
                }
                environment.setDependencies(dependencies);
                for (int i=0; i<dependencies.length; i++) {
                        Artifact tmp = Artifact.create(jars[i]);
                        dependencies[i].setGroupId(tmp.getGroupId());
                        dependencies[i].setArtifactId(tmp.getArtifactId());
                        dependencies[i].setVersion(tmp.getVersion().toString());
View Full Code Here

Examples of org.apache.geronimo.deployment.service.jsr88.EnvironmentData

                final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
                Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
                ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(
                        ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);

                EnvironmentData environment = new EnvironmentData();
                connector.setEnvironment(environment);
                org.apache.geronimo.deployment.service.jsr88.Artifact configId = new org.apache.geronimo.deployment.service.jsr88.Artifact();
                environment.setConfigId(configId);
                configId.setGroupId("console.dbpool");
                String artifactId = data.name;
                if (artifactId.indexOf('/') != -1) {
                    // slash in artifact-id results in invalid configuration-id and leads to deployment errors
                    artifactId = artifactId.replaceAll("/", "%2F");
                }
                configId.setArtifactId(artifactId);
                configId.setVersion("1.0");
                configId.setType("rar");

                String[] jars = data.getJars();
                int length = jars[jars.length - 1].length() == 0 ? jars.length - 1 : jars.length;
                org.apache.geronimo.deployment.service.jsr88.Artifact[] dependencies = new org.apache.geronimo.deployment.service.jsr88.Artifact[length];
                for (int i = 0; i < dependencies.length; i++) {
                    dependencies[i] = new org.apache.geronimo.deployment.service.jsr88.Artifact();
                }
                environment.setDependencies(dependencies);
                for (int i = 0; i < dependencies.length; i++) {
                    Artifact tmp = Artifact.create(jars[i]);
                    dependencies[i].setGroupId(tmp.getGroupId());
                    dependencies[i].setArtifactId(tmp.getArtifactId());
                    dependencies[i].setVersion(tmp.getVersion().toString());
View Full Code Here

Examples of org.apache.geronimo.deployment.service.jsr88.EnvironmentData

                DeploymentConfiguration config = mgr.createConfiguration(deployable);
                final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
                Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
                ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);

                EnvironmentData environment = new EnvironmentData();
                connector.setEnvironment(environment);
                org.apache.geronimo.deployment.service.jsr88.Artifact configId = new org.apache.geronimo.deployment.service.jsr88.Artifact();
                environment.setConfigId(configId);
                configId.setGroupId("console.jms");
                configId.setArtifactId(data.instanceName);
                configId.setVersion("1.0");
                configId.setType("rar");
                if(data.dependency != null && !data.dependency.trim().equals("")) {
                    Artifact artifact = Artifact.create(data.dependency.trim());
                    org.apache.geronimo.deployment.service.jsr88.Artifact dep = new org.apache.geronimo.deployment.service.jsr88.Artifact();
                    environment.setDependencies(new org.apache.geronimo.deployment.service.jsr88.Artifact[]{dep});
                    dep.setArtifactId(artifact.getArtifactId());
                    if(artifact.getGroupId() != null) {
                        dep.setGroupId(artifact.getGroupId());
                    }
                    if(artifact.getGroupId() != null) {
View Full Code Here

Examples of org.apache.geronimo.deployment.service.jsr88.EnvironmentData

                DeploymentConfiguration config = mgr.createConfiguration(deployable);
                final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
                Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
                ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);
               
                EnvironmentData environment = new EnvironmentData();
                connector.setEnvironment(environment);
                org.apache.geronimo.deployment.service.jsr88.Artifact configId = new org.apache.geronimo.deployment.service.jsr88.Artifact();
                environment.setConfigId(configId);
                configId.setGroupId("console.dbpool");
                configId.setArtifactId(data.getName());
                configId.setVersion("1.0");
                configId.setType("rar");

                String[] jars = data.getJars();
                org.apache.geronimo.deployment.service.jsr88.Artifact[] dependencies = new org.apache.geronimo.deployment.service.jsr88.Artifact[jars.length];
                for (int i=0; i<dependencies.length; i++) {
                  dependencies[i] = new org.apache.geronimo.deployment.service.jsr88.Artifact();
                }
                environment.setDependencies(dependencies);
                for (int i=0; i<dependencies.length; i++) {
                        Artifact tmp = Artifact.create(jars[i]);
                        dependencies[i].setGroupId(tmp.getGroupId());
                        dependencies[i].setArtifactId(tmp.getArtifactId());
                        dependencies[i].setVersion(tmp.getVersion().toString());
View Full Code Here

Examples of org.apache.geronimo.deployment.service.jsr88.EnvironmentData

    public EnvironmentData getEnvironment() {
        return environment;
    }

    public void setEnvironment(EnvironmentData environment) {
        EnvironmentData old = this.environment;
        this.environment = environment;
        if((old == null && environment == null) || (old != null&& old == environment)) {
            return;
        }
        if(old != null) {
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.