Package org.cloudfoundry.client.lib.domain

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


          planButton.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent event) {
              Button button = (Button) event.widget;
              if (button.getSelection()) {
                CloudServicePlan plan = (CloudServicePlan) button.getData();
                setPlan(plan);

              }
            }
          });
        }

        planDetailsComposite = new Composite(planGroup, SWT.NONE);
        GridLayoutFactory.fillDefaults().extendedMargins(0, 0, 10, 0).numColumns(2)
            .applyTo(planDetailsComposite);

        // Set a default plan, if one exists
        if (defaultPlanControl != null) {
          defaultPlanControl.setSelection(true);
          CloudServicePlan plan = (CloudServicePlan) defaultPlanControl.getData();
          setPlan(plan);

        }
      }
      else if (servicePlans.size() == 1) {
        planGroup.setVisible(false);
        CloudServicePlan plan = servicePlans.get(0);
        setPlan(plan);
      }
      else {
        pageBook.setVisible(false);
      }
View Full Code Here


    assertNotNull(offering.getDescription());
    assertNotNull(offering.getLabel());
    assertNotNull(offering.getUniqueId());
    assertNotNull(offering.getExtra());

    CloudServicePlan plan = offering.getCloudServicePlans().get(0);
    assertNotNull(plan.getName());
    assertNotNull(plan.getUniqueId());
    assertNotNull(plan.getDescription());
    assertSame(offering, plan.getServiceOffering());
  }
View Full Code Here

        getEntityAttribute(resource, "documentation_url", String.class));
    List<Map<String, Object>> servicePlanList = getEmbeddedResourceList(getEntity(resource), "service_plans");
    if (servicePlanList != null) {
      for (Map<String, Object> servicePlanResource : servicePlanList) {
        Boolean publicPlan = getEntityAttribute(servicePlanResource, "public", Boolean.class);
        CloudServicePlan servicePlan =
            new CloudServicePlan(
                getMeta(servicePlanResource),
                getEntityAttribute(servicePlanResource, "name", String.class),
                getEntityAttribute(servicePlanResource, "description", String.class),
                getEntityAttribute(servicePlanResource, "free", Boolean.class),
                publicPlan == null ? true : publicPlan,
View Full Code Here

    Assert.notNull(service, "Service must not be null");
    Assert.notNull(service.getName(), "Service name must not be null");
    Assert.notNull(service.getLabel(), "Service label must not be null");
    Assert.notNull(service.getPlan(), "Service plan must not be null");

    CloudServicePlan cloudServicePlan = findPlanForService(service);

    HashMap<String, Object> serviceRequest = new HashMap<String, Object>();
    serviceRequest.put("space_guid", sessionSpace.getMeta().getGuid());
    serviceRequest.put("name", service.getName());
    serviceRequest.put("service_plan_guid", cloudServicePlan.getMeta().getGuid());
    getRestTemplate().postForObject(getUrl("/v2/service_instances"), serviceRequest, String.class);
  }
View Full Code Here

TOP

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

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.