Examples of CloudOrgsAndSpaces


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

   */
  private static CloudOrgsAndSpaces internalGetCloudSpaces(CloudFoundryOperations client) {
    List<CloudSpace> foundSpaces = client.getSpaces();
    if (foundSpaces != null && !foundSpaces.isEmpty()) {
      List<CloudSpace> actualSpaces = new ArrayList<CloudSpace>(foundSpaces);
      CloudOrgsAndSpaces orgsAndSpaces = new CloudOrgsAndSpaces(actualSpaces);
      return orgsAndSpaces;
    }

    return null;
  }
View Full Code Here

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

   * instance. If null, no space found that is not already associated with a
   * server instance.
   */
  public CloudSpace getSpaceWithNoServerInstance() {
    CloudSpacesDescriptor descriptor = getCurrentSpacesDescriptor();
    CloudOrgsAndSpaces orgsSpaces = descriptor != null ? descriptor.getOrgsAndSpaces() : null;

    if (orgsSpaces != null) {

      List<CloudFoundryServer> cloudServers = CloudServerUtil.getCloudServers();
      if (cloudServers == null || cloudServers.isEmpty()) {
        return orgsSpaces.getDefaultCloudSpace();
      }
      else {
        List<CloudSpace> spaces = orgsSpaces.getAllSpaces();
        if (spaces != null) {
          // Find a space that does not have a corresponding server
          // instance.
          for (CloudSpace space : spaces) {
            CloudFoundryServer existingServer = null;
View Full Code Here

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

    validateCredentialsLocally(actualURL, userName, password);

    String cachedDescriptorID = CloudSpacesDescriptor.getDescriptorID(userName, password, actualURL);
    spacesDescriptor = cachedDescriptors.get(cachedDescriptorID);
    if (spacesDescriptor == null) {
      CloudOrgsAndSpaces orgsAndSpaces = CloudUiUtil.getCloudSpaces(userName, password, actualURL, true,
          selfSigned, context);

      if (orgsAndSpaces != null) {
        spacesDescriptor = new CloudSpacesDescriptor(orgsAndSpaces, userName, password, actualURL);
        cachedDescriptors.put(cachedDescriptorID, spacesDescriptor);
View Full Code Here

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

      return server;
    }

    protected void setDefaultCloudSpace(CloudFoundryServer cloudServer, String orgName, String spaceName)
        throws CoreException {
      CloudOrgsAndSpaces spaces = CloudUiUtil.getCloudSpaces(cloudServer.getUsername(),
          cloudServer.getPassword(), cloudServer.getUrl(), false, cloudServer.getSelfSignedCertificate(),
          null);
      Assert.isTrue(spaces != null, "Failed to resolve orgs and spaces.");
      Assert.isTrue(spaces.getDefaultCloudSpace() != null,
          "No default space selected in cloud space lookup handler.");

      CloudSpace cloudSpace = spaces.getSpace(orgName, spaceName);
      if (cloudSpace == null) {
        throw CloudErrorUtil.toCoreException("Failed to resolve cloud space when running junits: " + orgName
            + " - " + spaceName);
      }
      cloudServer.setSpace(cloudSpace);
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.