Package org.eclipse.wst.server.core

Examples of org.eclipse.wst.server.core.IServerWorkingCopy.save()


        }
        else {
          // Delete them first
          IServerWorkingCopy wc = server.createWorkingCopy();
          wc.modifyModules(null, modules, monitor);
          wc.save(true, null);
          cloudServer.getBehaviour().refreshModules(monitor);

          new WaitWithProgressJob(5, 1000) {

            @Override
View Full Code Here


            CloudFoundryPlugin.getModuleCache().getData(wc.getOriginal())
                .tagForAutomaticRepublish(new RepublishModule(add[0], appModule.getDeploymentInfo()));

            // publish the module
            wc.modifyModules(add, null, monitor);
            wc.save(true, null);
            republished = true;
          }
          else {
            throw new CoreException(status);
          }
View Full Code Here

  public IStatus doDeleteModules(final Collection<IModule> deletedModules) {
    IServerWorkingCopy wc = getServer().createWorkingCopy();
    try {
      deleteServicesOnModuleRemove.set(Boolean.FALSE);
      wc.modifyModules(null, deletedModules.toArray(new IModule[deletedModules.size()]), null);
      wc.save(true, null);
    }
    catch (CoreException e) {
      // log error to avoid pop-up dialog
      CloudFoundryPlugin
          .getDefault()
View Full Code Here

            CloudFoundryPlugin.getErrorStatus("Sample project does not contain web modules: " + project)); //$NON-NLS-1$
      }

      if (!Arrays.asList(wc.getModules()).contains(modules[0])) {
        wc.modifyModules(modules, new IModule[0], monitor);
        server = wc.save(true, monitor);
      }
      server.publish(IServer.PUBLISH_INCREMENTAL, monitor);

      restartServer(server, monitor);
View Full Code Here

    IServerWorkingCopy wc = st.createServer(serverName, null, runtime, new SubProgressMonitor(monitor, 1));
    wc.setName(serverName);
    if (callback != null) {
      callback.configureServer(wc);
    }
    server = wc.save(true, new SubProgressMonitor(monitor, 1));
    return server;
  }

  private IRuntime findRuntime(IServerType st, IProgressMonitor monitor) throws CoreException {
    IRuntime[] runtimes = ServerCore.getRuntimes();
View Full Code Here

      Assert.isNotNull(server, "Invoke createServer() first");

      IModule[] modules = ServerUtil.getModules(project);
      IServerWorkingCopy wc = server.createWorkingCopy();
      wc.modifyModules(modules, new IModule[0], null);
      wc.save(true, null);
    }

    public IProject createProject(String projectName) throws CoreException, IOException {
      return StsTestUtil.createPredefinedProject(projectName, CloudFoundryTestFixture.PLUGIN_ID);
    }
View Full Code Here

      cloudFoundryServer.setUrl(getUrl());

      setDefaultCloudSpace(cloudFoundryServer, credentials.organization, credentials.space);

      serverWC.save(true, null);
      return server;
    }

    protected void setDefaultCloudSpace(CloudFoundryServer cloudServer, String orgName, String spaceName)
        throws CoreException {
View Full Code Here

                if (finalVersion != null) {
                    wc.setAttribute(String.format(ISlingLaunchpadServer.PROP_BUNDLE_VERSION_FORMAT,
                        EmbeddedArtifactLocator.SUPPORT_BUNDLE_SYMBOLIC_NAME), finalVersion.toString());
                }
        wc.setRuntime(runtime);
                server = wc.save(true, monitor);
                return server;
      } catch (CoreException e) {
                throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
                        "Failed creating the new server instance", e));
View Full Code Here

            }
        }, notNullValue(IModule.class));

        IServerWorkingCopy serverWorkingCopy = server.createWorkingCopy();
        serverWorkingCopy.modifyModules(new IModule[] { bundleModule }, new IModule[0], new NullProgressMonitor());
        serverWorkingCopy.save(false, new NullProgressMonitor());

    }

    public void setAttribute(String name, boolean value) throws CoreException {
View Full Code Here

    public void setAttribute(String name, boolean value) throws CoreException {

        IServerWorkingCopy serverWorkingCopy = server.createWorkingCopy();
        serverWorkingCopy.setAttribute(name, value);
        serverWorkingCopy.save(false, new NullProgressMonitor());
    }
}
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.