Package org.eclipse.wst.server.core.internal

Examples of org.eclipse.wst.server.core.internal.ServerWorkingCopy


    ServerCore.addServerLifecycleListener(listener);
    dispose();
  }

  private void initServer() {
    ServerWorkingCopy server = (ServerWorkingCopy) getTaskModel().getObject(TaskModel.TASK_SERVER);
    cloudServer = (CloudFoundryServer) server.loadAdapter(CloudFoundryServer.class, null);
    if (cloudServer == null) {
      CloudFoundryPlugin
          .logError("Cloud Foundry Server Framework Error: Failed to create a Cloud Foundry server working copy for: " //$NON-NLS-1$
              + server.getId() + ". Please check if the plugin has been installed correctly."); //$NON-NLS-1$
    }
  }
View Full Code Here


      System.out.println("Server runtime created: " + runtime.getName());

      System.out.println("Creating server instance...");

      final ServerWorkingCopy swc = (ServerWorkingCopy) serverType.createServer(null, null, runtime, monitor);
      swc.setName(serverName + " GENERATED");
      swc.setAttribute("server-type", serverType.getId());
      m = swc.getAttribute("generic_server_instance_properties", (Map) null);
      m.put("key", "generic_server_instance_properties");
      m.putAll(serverProperties);
      swc.setAttribute("generic_server_instance_properties", m);

      final String modules = pf.getProperty("modules");
      IModule[] add = new IModule[0];
      if (modules != null)
      {
        final String[] strmodules = modules.split(" ,;");
        add = new IModule[strmodules.length];
        for (int i = 0; i < strmodules.length; i++)
        {
          add[i] = ServerUtil.getModule(ResourcesPlugin.getWorkspace().getRoot().getProject(strmodules[i]));
        }
      }

      System.out.println("Modules to assign to server: " + Arrays.asList(add));
      swc.modifyModules(add, new IModule[0], monitor);
      server = swc.save(true, monitor);

      System.out.println("Server instance created: " + server.getName());
    }
    else
    {
View Full Code Here

    private Kernel kernel;
    private PluginInstaller pluginInstaller;

    // The ServerWorkingCopy is passed in, not the IServer itself
    public GeronimoServerPluginManager (IServer aServer) {
        ServerWorkingCopy copy = (ServerWorkingCopy)aServer;
        server = copy.getOriginal();
        try {
            if (server != null) {
                GeronimoServerBehaviourDelegate delegate = (GeronimoServerBehaviourDelegate) server
                    .getAdapter(GeronimoServerBehaviourDelegate.class);
                if (delegate != null) {
View Full Code Here

TOP

Related Classes of org.eclipse.wst.server.core.internal.ServerWorkingCopy

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.