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

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


    List<String> urls = deploymentInfo.getUris();
    if (urls != null && !urls.isEmpty()) {
      // Persist only the first URL
      String url = urls.get(0);

      ApplicationUrlLookupService lookup = ApplicationUrlLookupService.getCurrentLookup(cloudServer);
      CloudApplicationURL cloudUrl = lookup.getCloudApplicationURL(url);
      String subdomain = cloudUrl.getSubdomain();
      String domain = cloudUrl.getDomain();

      if (subdomain != null) {
        application.put(SUB_DOMAIN_PROP, subdomain);
View Full Code Here


    return urlLookup;
  }

  protected void refreshApplicationUrlDomains() {

    final ApplicationUrlLookupService urlLookup = getApplicationUrlLookup();
    if (urlLookup == null) {
      update(true,
          CloudFoundryPlugin
              .getStatus(
                  Messages.AbstractURLWizardPage_ERROR_NO_URL_HANDLER,
                  IStatus.ERROR));
      return;
    }

    final String operationLabel = Messages.AbstractURLWizardPage_LABEL_FETCHING_DOMAIN;
    ICoreRunnable runnable = new ICoreRunnable() {
      public void run(IProgressMonitor coreRunnerMonitor) throws CoreException {
        SubMonitor subProgress = SubMonitor.convert(coreRunnerMonitor, operationLabel, 100);
        try {
          urlLookup.refreshDomains(subProgress);
          refreshedDomains = true;
          // Must launch this again in the UI thread AFTER
          // the refresh occurs.
          Display.getDefault().syncExec(new Runnable() {
View Full Code Here

  public void addPages() {
    String serverTypeId = cloudServer.getServer().getServerType().getId();

    ImageDescriptor imageDescriptor = CloudFoundryImages.getWizardBanner(serverTypeId);
    // Use the cached version if possible.
    ApplicationUrlLookupService urlLookup = ApplicationUrlLookupService.getCurrentLookup(cloudServer);
    urlPage = createPage(imageDescriptor, urlLookup);
    urlPage.setWizard(this);
    addPage(urlPage);
  }
View Full Code Here

   * version.
   */
  public ApplicationUrlLookupService getApplicationUrlLookup() {
    if (applicationUrlLookup == null) {
      try {
        applicationUrlLookup = new ApplicationUrlLookupService(getCloudFoundryServer());
      }
      catch (CoreException e) {
        CloudFoundryPlugin.logError(
            "Failed to create the Cloud Foundry Application URL lookup service due to {" + //$NON-NLS-1$
                e.getMessage(), e);
View Full Code Here

  public List<IWizardPage> getWizardPages(ApplicationWizardDescriptor applicationDescriptor,
      CloudFoundryServer cloudServer, CloudFoundryApplicationModule applicationModule) {
    List<IWizardPage> defaultPages = new ArrayList<IWizardPage>();
   
    ApplicationUrlLookupService urllookup = ApplicationUrlLookupService.getCurrentLookup(cloudServer);

    CloudFoundryDeploymentWizardPage deploymentPage = new CloudFoundryDeploymentWizardPage(cloudServer,
        applicationModule, applicationDescriptor, urllookup, this);

    CloudFoundryApplicationWizardPage applicationNamePage = new CloudFoundryApplicationWizardPage(cloudServer,
View Full Code Here

      ApplicationWizardDescriptor descriptor,
      CloudFoundryServer cloudServer,
      CloudFoundryApplicationModule applicationModule) {
    List<IWizardPage> defaultPages = new ArrayList<IWizardPage>();

    ApplicationUrlLookupService urllookup = ApplicationUrlLookupService
        .getCurrentLookup(cloudServer);

    StandaloneDeploymentWizardPage deploymentPage = new StandaloneDeploymentWizardPage(
        cloudServer, applicationModule, descriptor, urllookup, this);
View Full Code Here

      // the URL is built off the app name rather than the project name,
      // as the test case may have specified
      // a different app name than the default app name from the project
      // name.

      ApplicationUrlLookupService urlLookup = ApplicationUrlLookupService.update(server, monitor);

      CloudApplicationURL url = urlLookup.getDefaultApplicationURL(copy.getDeploymentName());
      if (url != null) {
        copy.setUris(Arrays.asList(url.getUrl()));
      }
    }
View Full Code Here

TOP

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

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.