Package org.cloudfoundry.ide.eclipse.server.core.internal.client

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.client.LocalCloudService


      for (Entry<?, ?> entry : services.entrySet()) {
        Object serviceNameObj = entry.getKey();
        if (serviceNameObj instanceof String) {
          String serviceName = (String) serviceNameObj;
          if (!servicesToBind.containsKey(serviceName)) {
            LocalCloudService service = new LocalCloudService(serviceName);
            servicesToBind.put(serviceName, service);

            Object servicePropertiesObj = entry.getValue();
            if (servicePropertiesObj instanceof Map<?, ?>) {
              Map<?, ?> serviceProperties = (Map<?, ?>) servicePropertiesObj;
              String label = getStringValue(serviceProperties, LABEL_PROP);
              if (label != null) {
                service.setLabel(label);
              }
              String provider = getStringValue(serviceProperties, PROVIDER_PROP);
              if (provider != null) {
                service.setProvider(provider);
              }
              String version = getStringValue(serviceProperties, VERSION_PROP);
              if (version != null) {
                service.setVersion(version);
              }
              String plan = getStringValue(serviceProperties, PLAN_PROP);
              if (plan != null) {
                service.setPlan(plan);
              }
            }
          }
        }
      }
View Full Code Here


    service.setProvider(offering.getProvider());

  }

  protected LocalCloudService createService() {
    LocalCloudService service = new LocalCloudService(""); //$NON-NLS-1$
    return service;
  }
View Full Code Here

  @Override
  public boolean performFinish() {
    if (!deferServiceAddition && page.getService() != null) {
      try {
        final LocalCloudService localService = page.getService();
        getContainer().run(true, false, new IRunnableWithProgress() {
          public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
            try {
              cloudServer.getBehaviour().createService(new CloudService[] { localService }, monitor);
              // Get the actual Service
              List<CloudService> allServices = cloudServer.getBehaviour().getServices(monitor);
              if (allServices != null) {
                for (CloudService existingService : allServices) {
                  if (existingService.getName().equals(localService.getName())) {
                    createdService = existingService;
                    break;
                  }
                }
              }
View Full Code Here

      List<String> boundServiceNames = cloudApplication.getServices();
      if (boundServiceNames != null) {
        List<CloudService> services = new ArrayList<CloudService>();
        for (String name : boundServiceNames) {
          if (name != null) {
            services.add(new LocalCloudService(name));
          }
        }
        deploymentInfo.setServices(services);
      }
View Full Code Here

    return name1.equals(name2);
  }

  public LocalCloudService convertToLocalCloudService() {
    final LocalCloudService localService = new LocalCloudService(""); //$NON-NLS-1$
    localService.setName(getUserDefinedName());
    localService.setVersion(getOffering().getVersion());
    localService.setLabel(getOffering().getLabel());
    localService.setProvider(getOffering().getProvider());
    localService.setPlan(getPlan().getName());
    return localService;
  }
View Full Code Here

    if (serviceChanges) {
      // Save the changes even if an app is not deployed
      List<CloudService> boundServices = new ArrayList<CloudService>();
      for (String serName : updatedServices) {
        boundServices.add(new LocalCloudService(serName));
      }
      workingCopy.setServices(boundServices);
      workingCopy.save();

      if (appModule.getApplication() != null) {
View Full Code Here

TOP

Related Classes of org.cloudfoundry.ide.eclipse.server.core.internal.client.LocalCloudService

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.