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

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.spaces.CloudFoundrySpace


        CloudFoundryServer cfServer = getCloudFoundryServer(server);
        if (cfServer != null && cfServer.getUsername() != null) {
          // decoration.addSuffix(NLS.bind("  [{0}, {1}]",
          // cfServer.getUsername(), cfServer.getUrl()));
          if (cfServer.hasCloudSpace()) {
            CloudFoundrySpace clSpace = cfServer.getCloudFoundrySpace();
            if (clSpace != null) {
              decoration
                  .addSuffix(NLS.bind(" - {0} - {1}", clSpace.getOrgName(), clSpace.getSpaceName())); //$NON-NLS-1$

            }
          }
          List<CloudServerURL> cloudUrls = CloudUiUtil.getAllUrls(cfServer.getBehaviour().getServer()
              .getServerType().getId());
View Full Code Here


      if (!cloudServer.hasCloudSpace()) {
        throw CloudErrorUtil.toCoreException(NLS.bind(Messages.ERROR_FAILED_CLIENT_CREATION_NO_SPACE,
            cloudServer.getServerId()));
      }

      CloudFoundrySpace cloudFoundrySpace = cloudServer.getCloudFoundrySpace();

      if (credentials != null) {
        client = createClient(url, credentials, cloudFoundrySpace, cloudServer.getSelfSignedCertificate());
      }
      else {
View Full Code Here

          && cf.getUrl().equals(originalServer.getUrl())) {

        boolean connect = false;

        if (cf.hasCloudSpace() && originalServer.hasCloudSpace()) {
          CloudFoundrySpace originalSpace = originalServer.getCloudFoundrySpace();
          CloudFoundrySpace space = cf.getCloudFoundrySpace();
          connect = space.getOrgName().equals(originalSpace.getOrgName())
              && space.getSpaceName().equals(originalSpace.getSpaceName());
        }

        if (connect) {
          CloudFoundryServerBehaviour behaviour = cf.getBehaviour();
          if (behaviour != null) {
View Full Code Here

        if (!valid) {
          break;
        }
      }
      if (valid) {
        cloudSpace = new CloudFoundrySpace(orgName, spaceName);
      }

    }
    return cloudSpace;
  }
View Full Code Here

  public void setSpace(CloudSpace space) {

    secureStoreDirty = true;

    if (space != null) {
      this.cloudSpace = new CloudFoundrySpace(space);
      internalSetOrg(cloudSpace.getOrgName());
      internalSetSpace(cloudSpace.getSpaceName());
    }
    else {
      // Otherwise clear the org and space
View Full Code Here

    }

  }

  protected boolean hasSpaceChanged(CloudSpace selectedCloudSpace) {
    CloudFoundrySpace existingSpace = getCloudServer().getCloudFoundrySpace();
    return !matchesExisting(selectedCloudSpace, existingSpace);
  }
View Full Code Here

  public static String getConsoleDisplayName(CloudFoundryServer server, CloudFoundryApplicationModule appModule) {
    StringWriter writer = new StringWriter();
    writer.append(server.getServer().getName());
    writer.append('-');

    CloudFoundrySpace space = server.getCloudFoundrySpace();

    if (space != null) {
      writer.append('-');
      writer.append(space.getOrgName());
      writer.append('-');
      writer.append('-');
      writer.append(space.getSpaceName());
      writer.append('-');
      writer.append('-');
    }

    writer.append(appModule.getDeployedApplicationName());
View Full Code Here

     * client for testing purposes only.
     */
    public CloudFoundryOperations createStandaloneClient() throws CoreException {
      CloudFoundryServer cloudFoundryServer = (CloudFoundryServer) server.loadAdapter(CloudFoundryServer.class,
          null);
      CloudFoundrySpace space = cloudFoundryServer.getCloudFoundrySpace();
      if (space == null) {
        throw CloudErrorUtil.toCoreException("No org and space was set in test harness for: "
            + cloudFoundryServer.getServerId());
      }
      try {
        return CloudFoundryPlugin.getCloudFoundryClientFactory().getCloudFoundryOperations(
            new CloudCredentials(cloudFoundryServer.getUsername(), cloudFoundryServer.getPassword()),
            new URL(cloudFoundryServer.getUrl()), space.getOrgName(), space.getSpaceName(),
            cloudFoundryServer.getSelfSignedCertificate());
      }
      catch (MalformedURLException e) {
        throw CloudErrorUtil.toCoreException(e);
      }
View Full Code Here

      int instanceIndex) {
    StringWriter writer = new StringWriter();
    writer.append(server.getServer().getName());
    writer.append('-');

    CloudFoundrySpace space = server.getCloudFoundrySpace();

    if (space != null) {
      writer.append('-');
      writer.append(space.getOrgName());
      writer.append('-');
      writer.append('-');
      writer.append(space.getSpaceName());
      writer.append('-');
      writer.append('-');
    }

    writer.append(appModule.getDeployedApplicationName());
View Full Code Here

TOP

Related Classes of org.cloudfoundry.ide.eclipse.server.core.internal.spaces.CloudFoundrySpace

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.