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

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.CloudFoundryServer


     * @return standalone client based on the harness credentials, org and
     * space. This is not the client used by the server instance, but a new
     * 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


      return null;
    }

    AbstractApplicationDelegate delegate = ApplicationRegistry.getApplicationDelegate(getLocalModule());
    ApplicationDeploymentInfo info = null;
    CloudFoundryServer cloudServer = getCloudFoundryServer();

    if (delegate != null) {
      info = delegate.resolveApplicationDeploymentInfo(this, cloudServer);
    }
View Full Code Here

  protected void setDeployedApplicationName(String applicationName) {
    Assert.isNotNull(applicationName);
    if (!applicationName.equals(this.deployedAppName)) {
      this.deployedAppName = applicationName;
      if (localModule != null) {
        CloudFoundryServer cloudServer = getCloudFoundryServer();

        // Since the deployment name changed, update the local module ->
        // deployed module cache in the server
        cloudServer.updateApplicationModule(this);
      }
    }
  }
View Full Code Here

      IProgressMonitor monitor) throws SystemMessageException {
    Object[] array = parseNestedFiles(remoteParent);
    if (array != null) {
      ApplicationResource app = (ApplicationResource) array[0];
      String path = (String) array[1];
      CloudFoundryServer server = app.getServer();
      String appName = app.getCloudApplication().getName();
      int instance = app.getInstanceId();
      try {
        String content = server.getBehaviour().getFile(appName, instance, path.concat(remoteFile).substring(1),
            monitor);
        if (content != null) {
          if (!localFile.exists()) {
            localFile.getParentFile().mkdirs();
          }
View Full Code Here

    List<AccountResource> list = new ArrayList<AccountResource>();
    IServer[] allServers = ServerCore.getServers();
    for (int i = 0; i < allServers.length; i++) {
      IServer candidate = allServers[i];
      if (CloudFoundryRsePlugin.doesServerBelongToHost(candidate, host)) {
        CloudFoundryServer server = (CloudFoundryServer) candidate.loadAdapter(CloudFoundryServer.class,
            monitor);
        AccountResource resource = new AccountResource(server);
        list.add(resource);
      }
    }
View Full Code Here

    int index = path.lastIndexOf("@"); //$NON-NLS-1$
    if (index >= 0 && (index + 1) <= path.length()) {
      String accountName = path.substring(0, index);
      String accountUrl = path.substring(index + 1);
      for (AccountResource account : accounts) {
        CloudFoundryServer server = account.getServer();
        if (accountUrl.equals(server.getUrl()) && accountName.equals(server.getServer().getName())) {
          return account;
        }
      }
    }
    return null;
View Full Code Here

TOP

Related Classes of org.cloudfoundry.ide.eclipse.server.core.internal.CloudFoundryServer

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.