Package org.apache.geronimo.xml.ns.deployment_1

Examples of org.apache.geronimo.xml.ns.deployment_1.EnvironmentType


    String version = cfg != null && hasValue(cfg.getVersion()) ? cfg.getVersion()
        : "1.0";
    String type = cfg != null && hasValue(cfg.getType()) ? cfg.getType()
        : "car";

    ArtifactType artifact = createArtifact(groupId, artifactId, version, type);
    org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
  
    EnvironmentType env = serviceFactory.createEnvironmentType();
    env.setModuleId(artifact);
View Full Code Here


 
  public static ArtifactType createArtifact(String groupId, String artifactId, String version, String type) {
      Trace.tracePoint("Entry", "V11DeploymentPlanCreationOperation.createArtifact", groupId, artifactId, version, type);

      org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
    ArtifactType artifact = serviceFactory.createArtifactType();

    if (groupId != null)
      artifact.setGroupId(groupId);
    if (artifactId != null)
      artifact.setArtifactId(artifactId);
    if (version != null)
      artifact.setVersion(version);
    artifact.setType(type);
   
      Trace.tracePoint("Exit ", "V11DeploymentPlanCreationOperation.createArtifact", artifact);
    return artifact;
  }
View Full Code Here

        for (int ii=0; ii<inputModules.size(); ii++) {
            IModule[] module = (IModule[]) inputModules.get(ii);
            int moduleDeltaKind = ((Integer)inputDeltaKind.get(ii)).intValue();
            EnvironmentType environment = getEnvironment(module[0]);
            if (environment != null) {
                ArtifactType moduleArtifact = environment.getModuleId();
                if (artifact.equals(moduleArtifact)) {
                    Trace.tracePoint("Exit ", "DependencyHelper.getModule", module);
                    return module;
                }
            }
View Full Code Here

        for (int ii=0; ii<inputModules.size(); ii++) {
            IModule[] module = (IModule[]) inputModules.get(ii);
            int moduleDeltaKind = ((Integer)inputDeltaKind.get(ii)).intValue();
            EnvironmentType environment = getEnvironment(module[0]);
            if (environment != null) {
                ArtifactType moduleArtifact = environment.getModuleId();
                if (artifact.equals(moduleArtifact)) {
                    Trace.tracePoint("Exit ", "DependencyHelper.getDeltaKind", moduleDeltaKind);
                    return moduleDeltaKind;
                }
            }
View Full Code Here

        if (parents == null) {
            Trace.tracePoint("Exit ", "DependencyHelper.processJaxbParents", null);
            return;
        }
        for (Iterator ii = parents.iterator(); ii.hasNext();) {
            ArtifactType artifact = (ArtifactType)ii.next();
            if (dm.getParents(artifact).size() > 0 && !artifact.equals(terminatingArtifact) &&
                !dm.getParents(artifact).contains(artifact) && !dm.getChildren(artifact).contains(artifact)) {
                // Keep processing parents (as long as no circular dependencies)
                processJaxbParents(dm.getParents(artifact), terminatingArtifact);
                // Move self
                JAXBElement jaxbElement = getJaxbElement(artifact);
View Full Code Here

        Trace.tracePoint("Enter", "DependencyHelper.getJaxbElement", artifact);

        for (JAXBElement jaxbElement : inputJAXBElements) {
            EnvironmentType environment = getEnvironment(jaxbElement);
            if (environment != null) {
                ArtifactType jaxbArtifact = environment.getModuleId();
                if (artifact.equals(jaxbArtifact)) {
                    Trace.tracePoint("Exit ", "DependencyHelper.getJaxbElement", jaxbElement);
                    return jaxbElement;
                }
            }
View Full Code Here

        if (parents == null) {
            return;
        }

        for (Iterator iterator = parents.iterator(); iterator.hasNext();) {
          ArtifactType parent = (ArtifactType) iterator.next();
            Set children = (Set) parentToChildMap.get(parent);
            if (children != null) {
                children.remove(child);
            }
        }
View Full Code Here

            if (moduleDeltaKind != ServerBehaviourDelegate.REMOVED) {
              //GERONIMODEVTOOLS-361
              for (IModule singleModule:module){
                EnvironmentType environment = getEnvironment(singleModule);
                  if (environment != null) {
                      ArtifactType child = environment.getModuleId();
                      DependenciesType dependencies = environment.getDependencies();
                      if (dependencies != null) {
                          List<DependencyType> depList = dependencies.getDependency();
                          for ( DependencyType dep : depList) {
                              ArtifactType parent = deploymentFactory.createArtifactType();
                              parent.setGroupId( dep.getGroupId() );
                              parent.setArtifactId( dep.getArtifactId() );
                              parent.setVersion( dep.getVersion() );
                              parent.setType( dep.getType() );
                             
                              StringBuilder configId = new StringBuilder();
                              if (dep.getGroupId()!=null)
                                configId.append(dep.getGroupId());
                              configId.append("/");
                              if (dep.getArtifactId()!=null)
                                configId.append(dep.getArtifactId());
                              configId.append("/");
                              if (dep.getVersion()!=null)
                                configId.append(dep.getVersion());
                              configId.append("/");
                              if (dep.getType()!=null)
                                configId.append(dep.getType());
                             
                              if (!DeploymentUtils.isInstalledModule(server,configId.toString()))
                                   dm.addDependency( child, parent );
                          }
                      }
                  }
              }
            }
        }

        //
        // Iterate through all the modules again and reorder as necessary
        //
        for (int ii=0; ii<modules.size(); ii++) {
            IModule[] module = (IModule[]) modules.get(ii);
            int moduleDeltaKind = ((Integer)deltaKind.get(ii)).intValue();
            if (module!=null && !reorderedModules.contains(module)) {
                // Not already moved
                if (moduleDeltaKind == ServerBehaviourDelegate.REMOVED) {
                    // Move module if going to be removed
                    reorderedModules.add(module);
                    reorderedKinds.add(moduleDeltaKind);
                }
                else {
                    EnvironmentType environment = getEnvironment(module[0]);
                    if (environment != null) {
                        ArtifactType artifact = environment.getModuleId();
                        if (artifact == null) {
                            // Move if null (nothing can be done)
                            if (!reorderedModules.contains(module)) {
                                reorderedModules.add(module);
                                reorderedKinds.add(moduleDeltaKind);
View Full Code Here

        // Iterate through all the JAXBElements and register the dependencies
        //
        for (JAXBElement jaxbElement : jaxbElements) {
            EnvironmentType environment = getEnvironment(jaxbElement);
            if (environment != null) {
                ArtifactType child = environment.getModuleId();
                if (child != null) {
                    DependenciesType dependencies = environment.getDependencies();
                    if (dependencies != null) {
                        List<DependencyType> depList = dependencies.getDependency();
                        if (depList != null) {
                            for ( DependencyType dep : depList) {
                                ArtifactType parent = deploymentFactory.createArtifactType();
                                parent.setGroupId( dep.getGroupId() );
                                parent.setArtifactId( dep.getArtifactId() );
                                parent.setVersion( dep.getVersion() );
                                parent.setType( dep.getType() );
                                dm.addDependency( child, parent );
                            }
                        }
                    }
                }
            }
        }

        //
        // Iterate through all the JAXBElements again and reorder as necessary
        //
        for (JAXBElement jaxbElement : jaxbElements) {
            if (!reorderedJAXBElements.contains(jaxbElement)) {
                // Not already moved
                EnvironmentType environment = getEnvironment(jaxbElement);
                if (environment != null) {
                    ArtifactType artifact = environment.getModuleId();
                    if (artifact == null) {
                        // Move if null (nothing can be done)
                        if (!reorderedJAXBElements.contains(jaxbElement)) {
                            reorderedJAXBElements.add(jaxbElement);
                        }
View Full Code Here

        if (parents == null) {
            Trace.tracePoint("Exit ", "DependencyHelper.processParents", null);
            return;
        }
        for (Iterator ii = parents.iterator(); ii.hasNext();) {
          ArtifactType artifact = (ArtifactType)ii.next();
            if (dm.getParents(artifact).size() > 0 && !artifact.equals(terminatingArtifact) &&
                !dm.getParents(artifact).contains(artifact) && !dm.getChildren(artifact).contains(artifact)) {
                // Keep processing parents (as long as no circular dependencies)
                processParents(dm.getParents(artifact), terminatingArtifact);
                // Move self
                IModule[] module = getModule(artifact);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.xml.ns.deployment_1.EnvironmentType

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.