Examples of CloudService


Examples of org.apache.stratos.manager.services.mgt.beans.CloudService

                String label = cloudServiceConfig.getLabel();
                if (label == null) {
                    // we are only returning display-able services
                    continue;
                }
                CloudService cloudService = new CloudService();
                String name = cloudServiceConfig.getName();
                cloudService.setName(name);
                cloudService.setLabel(label);
                cloudService.setLink(cloudServiceConfig.getLink());
                cloudService.setIcon(cloudServiceConfig.getIcon());
                cloudService.setDescription(cloudServiceConfig.getDescription());
                cloudService.setProductPageURL(cloudServiceConfig.getProductPageURL());
                boolean active = Util.isCloudServiceActive(name, tenantId);
                cloudService.setActive(tenantId == 0 || active);

                cloudServices.add(cloudService);
            }
        }
        return cloudServices.toArray(new CloudService[cloudServices.size()]);
View Full Code Here

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

      public void selectionChanged(SelectionChangedEvent event) {
        Object[] services = servicesViewer.getCheckedElements();
        if (services != null) {
          selectedServicesToBind.clear();
          for (Object obj : services) {
            CloudService service = (CloudService) obj;
            selectedServicesToBind.add(service.getName());
          }
          setServicesToBindInDescriptor();
        }
      }
    });

    Action addServiceAction = new Action(Messages.COMMONTXT_ADD_SERVICE, CloudFoundryImages.NEW_SERVICE) {

      public void run() {
        // Do not create the service right away.
        boolean deferAdditionOfService = true;
        CloudFoundryServiceWizard wizard = new CloudFoundryServiceWizard(cloudServer, deferAdditionOfService);
        WizardDialog dialog = new WizardDialog(getShell(), wizard);
        dialog.setBlockOnOpen(true);
        if (dialog.open() == Window.OK) {
          // This cloud service does not yet exist. It will be created
          // outside of the wizard
          CloudService addedService = wizard.getService();
          if (addedService != null) {
            addService(addedService);
          }
        }
      }
View Full Code Here

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

          // above, any remaining Local cloud services can be assumed
          // to not exist and
          // will require being created. Only create services IF they
          // are to be bound to the app.
          for (String name : selectedServicesToBind) {
            CloudService service = allServices.get(name);
            if (service instanceof LocalCloudService) {
              servicesToAdd.add(name);
            }
          }
View Full Code Here

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

  }

  protected List<CloudService> getServicesToBindAsCloudServices() {
    List<CloudService> servicesToBind = new ArrayList<CloudService>();
    for (String serviceName : selectedServicesToBind) {
      CloudService service = allServices.get(serviceName);
      if (service != null) {
        servicesToBind.add(service);
      }
    }
    return servicesToBind;
View Full Code Here

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

  }

  protected void setServicesToCreateInDescriptor() {
    List<CloudService> toCreate = new ArrayList<CloudService>();
    for (String serviceName : servicesToAdd) {
      CloudService service = allServices.get(serviceName);
      if (service != null) {
        toCreate.add(service);
      }
    }
View Full Code Here

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

    return new ApplicationInstanceServiceColumn[] { Name, Vendor, Plan, Version };
  }

  public String getColumnText(Object element, int columnIndex) {
    if (element instanceof CloudService) {
      CloudService service = (CloudService) element;
      switch (columnIndex) {
      case 0:
        return service.getName();
      case 1:
        return service.getLabel();
      case 2:
        return service.getPlan();
      case 3:
        return service.getVersion();
      }
    }
    return null;
  }
View Full Code Here

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

      ServiceViewColumn serviceColumn = (ServiceViewColumn) sortColumn.getData();
      int result = 0;
      int sortDirection = tableViewer.getTable().getSortDirection();
      if (serviceColumn != null) {
        if (e1 instanceof CloudService && e2 instanceof CloudService) {
          CloudService service1 = (CloudService) e1;
          CloudService service2 = (CloudService) e2;

          switch (serviceColumn) {
          case Name:
            result = super.compare(tableViewer, e1, e2);
            break;
View Full Code Here

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

  }

  @Override
  public String getText(Object element) {
    if (element instanceof CloudService) {
      CloudService service = (CloudService) element;
      return service.getName();
    }
    return super.getText(element);
  }
View Full Code Here

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

  public String getColumnText(Object element, int columnIndex) {
    String result = null;
    TableColumn column = viewer.getTable().getColumn(columnIndex);
    if (column != null && element instanceof CloudService) {
      CloudService cloudService = (CloudService) element;
      ServiceViewColumn serviceColumn = (ServiceViewColumn) column.getData();

      if (serviceColumn != null) {
        switch (serviceColumn) {
        case Name:
          result = getText(element);
          break;
        case Version:
          result = cloudService.getVersion();
          break;
        case Vendor:
          result = cloudService.getLabel();
          break;
        case Plan:
          result = cloudService.getPlan();
          break;
        case Provider:
          result = cloudService.getProvider();
          break;
        }
      }
    }
    return result;
View Full Code Here

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

      InstanceStats stats1 = ((InstanceStatsAndInfo) e1).getStats();
      InstanceStats stats2 = ((InstanceStatsAndInfo) e2).getStats();
      return stats1.getId().compareTo(stats2.getId());
    }
    if (e1 instanceof CloudService && e2 instanceof CloudService) {
      CloudService service1 = (CloudService) e1;
      CloudService service2 = (CloudService) e2;
      return service1.getName().compareTo(service2.getName());
    }
    if (e1 instanceof IModule && e2 instanceof IModule) {
      IModule m1 = (IModule) e1;
      IModule m2 = (IModule) e2;
      return m1.getName().compareTo(m2.getName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.