/* * (non-Javadoc) * * @see org.eclipse.cft.server.core.internal.application. * JavaWebApplicationDelegate#getDefaultApplicationDeploymentInfo(org. * eclipse.wst.server.core.IModule, org.eclipse.wst.server.core.IServer, * org.eclipse.core.runtime.IProgressMonitor) */ @Override public ApplicationDeploymentInfo getDefaultApplicationDeploymentInfo( IModule module, IServer server, IProgressMonitor monitor) throws CoreException { ApplicationDeploymentInfo info = super.getDefaultApplicationDeploymentInfo(module, server, monitor); info.setMemory(PivotalConstants.PIVOTAL_DEFAULT_MEMORY); // Set a default URL for the application. if ((info.getUris() == null || info.getUris().isEmpty()) && info.getDeploymentName() != null) { CloudFoundryServer cloudServer = getCloudServer(server); CloudApplicationURL url = ApplicationUrlLookupService.update(cloudServer, monitor) .getDefaultApplicationURL(info.getDeploymentName()); info.setUris(Arrays.asList(url.getUrl())); } return info; }
/* * (non-Javadoc) * * @see org.eclipse.cft.server.core.internal.application. * ApplicationDelegate * #getDefaultApplicationDeploymentInfo(org.eclipse.cf.server.core.internal. * client.CloudFoundryApplicationModule, * org.eclipse.cft.server.core.internal.CloudFoundryServer, * org.eclipse.core.runtime.IProgressMonitor) */ @Override public ApplicationDeploymentInfo getDefaultApplicationDeploymentInfo( CloudFoundryApplicationModule appModule, CloudFoundryServer cloudServer, IProgressMonitor monitor) throws CoreException { ApplicationDeploymentInfo info = super.getDefaultApplicationDeploymentInfo(appModule, cloudServer, monitor); info.setStaging(new Staging(null, PivotalConstants.PIVOTAL_WEB_SERVICES_JAVA_BUILDPACK)); info.setMemory(PivotalConstants.PIVOTAL_DEFAULT_MEMORY); // Set a default URL for the application. if ((info.getUris() == null || info.getUris().isEmpty()) && info.getDeploymentName() != null) { CloudApplicationURL url = ApplicationUrlLookupService.update(cloudServer, monitor) .getDefaultApplicationURL(info.getDeploymentName()); info.setUris(Arrays.asList(url.getUrl())); } return info; }