Package org.cloudfoundry.client.lib.domain

Examples of org.cloudfoundry.client.lib.domain.CloudApplication


          printlnToConsole(appModule, Messages.CONSOLE_APP_PUSHED_MESSAGE);

        }

        // Verify the application exists in the server
        CloudApplication application = getDeployedCloudApplication(client,
            appModule.getDeployedApplicationName(), monitor);

        if (application == null) {
          throw CloudErrorUtil
              .toCoreException("No cloud application obtained from the Cloud Foundry server for :  " //$NON-NLS-1$
View Full Code Here


      int moduleState = getServer().getModulePublishState(new IModule[] { appModule.getLocalModule() });
      if (appModule.isDeployed() && moduleState == IServer.PUBLISH_STATE_NONE) {

        printlnToConsole(appModule, Messages.CONSOLE_APP_FOUND);

        CloudApplication cloudApp = null;

        printlnToConsole(appModule,
            NLS.bind(Messages.CONSOLE_APP_MAPPING_STARTED, appModule.getDeployedApplicationName()));
        try {
          cloudApp = getApplication(appModule.getDeployedApplicationName(), monitor);
View Full Code Here

          if (module.getLocalModule() != null) {
            // show local information?
          }

          CloudApplication application = module.getApplication();
          // if (application != null) {
          // decoration.addSuffix(NLS.bind("  [{0}, {1}, {2}]",
          // new Object[]{application.getName(),
          // getAppStateString(application.getState()),
          // application.getUris()}));
          // } else if (module.getName() != null) {
          // decoration.addSuffix(NLS.bind("  [{0}]",
          // module.getName()));
          // }
          if (application != null) {
            decoration.addSuffix(NLS.bind(Messages.CloudFoundryDecorator_SUFFIX_DEPLOYED_AS, application.getName()));
          }
          else {
            decoration.addSuffix(Messages.CloudFoundryDecorator_SUFFIX_NOT_DEPLOYED);
          }
View Full Code Here

  public synchronized void stop() {
    getActiveStreams().close();
  }

  static String getConsoleName(CloudFoundryApplicationModule app) {
    CloudApplication cloudApp = app.getApplication();
    String name = (cloudApp != null && cloudApp.getUris() != null && cloudApp.getUris().size() > 0) ? cloudApp
        .getUris().get(0) : app.getDeployedApplicationName();
    return name;
  }
View Full Code Here

    // Do a separate check to verify that there is in fact a
    // CloudApplication for the
    // given app (i.e. verify that is is indeed deployed, even though this
    // has been checked
    // above, this is another way to verify all is OK.
    CloudApplication actualCloudApp = getUpdatedApplication(expectedAppName);

    assertNotNull("Expected non-null CloudApplication when checking if application is deployed", actualCloudApp);
    assertEquals(actualCloudApp.getName(), expectedAppName);

    return appModule;
  }
View Full Code Here

    if (appModule == null) {
      return null;
    }
    Staging staging = appModule.getDeploymentInfo() != null  ? appModule.getDeploymentInfo().getStaging() : null;
    if (staging == null) {
      CloudApplication cloudApp = appModule.getApplication();
      if (cloudApp != null) {
        staging = cloudApp.getStaging();
      }
    }
    return staging;
  }
View Full Code Here

      List<String> servicesToDelete = new ArrayList<String>();

      // Fetch an updated application so that it has the lastest
      // service list
      CloudApplication application = null;
      if (updatedApplications != null) {
        for (CloudApplication app : updatedApplications) {
          if (app.getName().equals(appModule.getDeployedApplicationName())) {
            application = app;
            break;
          }
        }
      }

      // ONLY delete a remote application if an application is found.
      if (application != null) {
        List<String> actualServices = application.getServices();
        if (actualServices != null) {
          // This has to be used instead of addAll(..), as
          // there is a chance the list is non-empty but
          // contains null entries
          for (String serviceName : actualServices) {
            if (serviceName != null) {
              servicesToDelete.add(serviceName);
            }
          }
        }

        this.cloudFoundryServerBehaviour.deleteApplication(application.getName(), monitor);

      }

      CloudFoundryPlugin.getCallback().stopApplicationConsole(appModule, cloudServer);
View Full Code Here

    this.appModule = appModule;
  }

  protected boolean internalRunInWait(IProgressMonitor progress) throws CoreException {

    CloudApplication updatedCloudApp = cloudServer.getBehaviour().getApplication(
        appModule.getDeployedApplicationName(), progress);

    if (updatedCloudApp == null) {
      throw CloudErrorUtil
          .toCoreException("No cloud application found while attempting to check application state."); //$NON-NLS-1$
    }

    return isInState(updatedCloudApp.getState());

  }
View Full Code Here

  public List<String> findCaldecottTunnelsToClose(CloudFoundryOperations client, String appName,
      List<String> servicesToUpdate) {
    List<String> services = new ArrayList<String>();

    CloudApplication caldecottApp = client.getApplication(appName);
    if (caldecottApp != null) {
      List<String> existingServices = caldecottApp.getServices();
      if (existingServices != null) {
        Set<String> possibleDeletedServices = new HashSet<String>();
        // Must iterate rather than passing to constructor or using
        // addAll, as some
        // of the entries in existing services may be null
View Full Code Here

          client.updateApplicationEnv(appModule.getDeployedApplicationName(), varsMap);

          // Update the cloud application which contains the updated
          // environment variables.
          CloudApplication cloudApplication = getApplication(appModule.getDeployedApplicationName(),
              subProgress);
          appModule.setCloudApplication(cloudApplication);

        }
        finally {
View Full Code Here

TOP

Related Classes of org.cloudfoundry.client.lib.domain.CloudApplication

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.