Package com.openshift.client

Examples of com.openshift.client.IApplication


    }

    ApplicationResourceDTO applicationDTO =
        new CreateApplicationRequest().execute(name, cartridge, scale, gearProfile, initialGitUrl, timeout,
            null, cartridges);
    IApplication application = new ApplicationResource(applicationDTO, this);

    getOrLoadApplications().add(application);
    return application;
  }
View Full Code Here


    }

    ApplicationResourceDTO applicationDTO =
        new CreateApplicationRequest().execute(
            name, cartridge, scale, gearProfile, initialGitUrl, timeout, environmentVariables, cartridges);
    IApplication application = new ApplicationResource(applicationDTO, this);

    getOrLoadApplications().add(application);
    return application;
  }
View Full Code Here

    if (applications == null) {
      return null;
    }

    IApplication matchingApplication = null;
    for (IApplication application : applications) {
      if (application.getName().equalsIgnoreCase(name)) {
        matchingApplication = application;
        break;
      }
View Full Code Here

  private void addOrUpdateApplication(ApplicationResourceDTO applicationDTO, List<IApplication> applications) {
    ApplicationResource application = (ApplicationResource) getApplicationByName(applicationDTO.getName(),
        applications);
    if (application == null) {
      final IApplication newApplication = new ApplicationResource(applicationDTO, this);
      applications.add(newApplication);
    } else {
      application.update(applicationDTO);
    }
  }
View Full Code Here

    }
  }

  private List<IApplication> removeApplications(List<ApplicationResourceDTO> dtos, List<IApplication> applications) {
    for (ListIterator<IApplication> it = applications.listIterator(); it.hasNext();) {
      IApplication application = it.next();
      if (!hasApplicationDTOByName(application.getName(), dtos)) {
        it.remove();
      }
    }
    return applications;
  }
View Full Code Here

        String name = exchange.getIn().getHeader(OpenShiftConstants.APPLICATION, getEndpoint().getApplication(), String.class);
        if (name == null) {
            throw new CamelExchangeException("Application not specified", exchange);
        }

        IApplication app = domain.getApplicationByName(name);
        if (app == null) {
            throw new CamelExchangeException("Application with id " + name + " not found.", exchange);
        } else {
            app.start();
        }
    }
View Full Code Here

        String name = exchange.getIn().getHeader(OpenShiftConstants.APPLICATION, getEndpoint().getApplication(), String.class);
        if (name == null) {
            throw new CamelExchangeException("Application not specified", exchange);
        }

        IApplication app = domain.getApplicationByName(name);
        if (app == null) {
            throw new CamelExchangeException("Application with id " + name + " not found.", exchange);
        } else {
            app.stop();
        }
    }
View Full Code Here

        String name = exchange.getIn().getHeader(OpenShiftConstants.APPLICATION, getEndpoint().getApplication(), String.class);
        if (name == null) {
            throw new CamelExchangeException("Application not specified", exchange);
        }

        IApplication app = domain.getApplicationByName(name);
        if (app == null) {
            throw new CamelExchangeException("Application with id " + name + " not found.", exchange);
        } else {
            app.restart();
        }
    }
View Full Code Here

        String name = exchange.getIn().getHeader(OpenShiftConstants.APPLICATION, getEndpoint().getApplication(), String.class);
        if (name == null) {
            throw new CamelExchangeException("Application not specified", exchange);
        }

        IApplication app = domain.getApplicationByName(name);
        if (app == null) {
            throw new CamelExchangeException("Application with id " + name + " not found.", exchange);
        } else {
            String state = OpenShiftHelper.getStateForApplication(app);
            exchange.getIn().setBody(state);
View Full Code Here

      throw new OpenShiftException("Application with name \"{0}\" already exists.", name);
    }

    ApplicationResourceDTO applicationDTO =
        new CreateApplicationRequest().execute(name, cartridge, scale, gearProfile, initialGitUrl);
    IApplication application = new ApplicationResource(applicationDTO, cartridge, this);

    getOrLoadApplications().add(application);
    return application;
  }
View Full Code Here

TOP

Related Classes of com.openshift.client.IApplication

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.