Package org.apache.geronimo.deployment.service.jsr88

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


    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


                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.setVersion("1.0");
                configId.setType("car");
               
                String artifactId = data.name;
                // simply replace / with _ if / exists within the artifactId
                // this is needed because we don't allow / within the artifactId
                artifactId = artifactId.replace('/', '_');

                // Let's check whether the artifact exists
                ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(PortletManager.getKernel());
                if (configurationManager.isInstalled(new Artifact(configId.getGroupId(), artifactId,
                        configId.getVersion(), configId.getType()))) {
                    artifactId = artifactId + "_" + new Random(System.currentTimeMillis()).nextInt(99);
                }

                configId.setArtifactId(artifactId);

                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

    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

                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("car");
                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

        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

                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

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.ARTIFACT: {
            Artifact artifact = (Artifact) theEObject;
            T result = caseArtifact(artifact);
            if (result == null)
                result = caseBaseElement(artifact);
            if (result == null)
                result = defaultCase(theEObject);
View Full Code Here

    return intoDiagram || intoLane || intoParticipant;
  }

  @Override
  public Object[] create(ICreateContext context) {
    Artifact artifact = null;
    try {
      ModelHandler handler = ModelHandler.getInstance(getDiagram());
      artifact = createArtifact(context);
      handler.addArtifact(FeatureSupport.getTargetParticipant(context, handler), artifact);
    } catch (IOException e) {
View Full Code Here

TOP

Related Classes of org.apache.geronimo.deployment.service.jsr88.Artifact

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.