Package org.apache.geronimo.jee.deployment

Examples of org.apache.geronimo.jee.deployment.Environment


        }
        return null;
    }

    protected Environment getEnvironment(boolean create) {
        Environment type = null;
        Object plan = getPlan().getValue();
        if (WebApp.class.isInstance(plan)) {
            type = ((WebApp) plan).getEnvironment();
            if (type == null && create) {
                type = getDeploymentObjectFactory().createEnvironment();
View Full Code Here


        return type;
    }
   
    private Dependencies getDependencies(boolean create) {
        Environment env = getEnvironment(create);
        if(env != null) {
            Dependencies dep = env.getDependencies();
            if (dep == null && create) {
                dep = getDeploymentObjectFactory().createDependencies();
                env.setDependencies(dep);
            }
            return dep;
        }
        return null;
    }
View Full Code Here

        }
        return null;
    }

    private Artifact getModuleId(boolean create) {
        Environment type = getEnvironment(create);
        if (type != null) {
            Artifact moduleId = type.getModuleId();
            if (moduleId == null && create) {
                moduleId = getDeploymentObjectFactory().createArtifact();
                type.setModuleId(moduleId);
            }
            return moduleId;
        }
        return null;
    }
View Full Code Here

        if (eObject == null) {
            eObject = new String();
            JAXBElement plan = section.getPlan();

            Environment environment = null;
            environment = JAXBModelUtils.getEnvironment(plan, isServerEnvironment);
            if (environment == null) {
                environment = (Environment)getEFactory().create(Environment.class);
                JAXBModelUtils.setEnvironment (plan, environment, isServerEnvironment);
            }
View Full Code Here

    this.plan = (ApplicationClient) plan.getValue();
    createClient();
  }

    protected Environment getEnvironment(boolean create) {
        Environment type = null;
        Object plan = getPlan().getValue();
        if (ApplicationClient.class.isInstance(plan)) {
            type = ((ApplicationClient) plan).getServerEnvironment();
            if (type == null && create) {
                type = getDeploymentObjectFactory().createEnvironment();
View Full Code Here

            }
        });
    }

    protected Environment getEnvironment(boolean create) {
        Environment type = null;
        Object plan = getPlan().getValue();
        if (ApplicationClient.class.isInstance(plan)) {
            type = ((ApplicationClient) plan).getClientEnvironment();
            if (type == null && create) {
                type = getDeploymentObjectFactory().createEnvironment();
View Full Code Here

  Object planValue = plan.getValue();
  if (Application.class.isInstance(planValue)) {
      Application application = (Application) planValue;

      // set dependency
      Environment env = application.getEnvironment();
      if (env == null) {
    env = new Environment();
    application.setEnvironment(env);
      }
      setDependency(env);

      // add the gbean into plan
      JAXBElement<Gbean> gbeanElement = objectFactory.createGbean(gbean);
      application.getService().add(gbeanElement);
  } else if (WebApp.class.isInstance(planValue)) {
      WebApp webapp = (WebApp) planValue;

      // set dependency
      Environment env = webapp.getEnvironment();
      if (env == null) {
    env = new Environment();
    webapp.setEnvironment(env);
      }
      setDependency(env);

      // add the gbean into plan
      JAXBElement<Gbean> gbeanElement = objectFactory.createGbean(gbean);
      webapp.getServiceOrPersistence().add(gbeanElement);
  } else if (OpenejbJar.class.isInstance(planValue)) {
      OpenejbJar openejbJar = (OpenejbJar) planValue;

      // set dependency
      Environment env = openejbJar.getEnvironment();
      if (env == null) {
    env = new Environment();
    openejbJar.setEnvironment(env);
      }
      setDependency(env);

      // add the gbean into plan
View Full Code Here

TOP

Related Classes of org.apache.geronimo.jee.deployment.Environment

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.