Examples of WGARemoteServer


Examples of de.innovationgate.eclipse.wgadesigner.models.WGARemoteServer

        }
       
        // perform steps for plugin sync if runtime is started
        if (TomcatUtils.getInstance().isRunning(_runtime)) {
            monitor.beginTask("connecting to local WGA server", IProgressMonitor.UNKNOWN);
            WGARemoteServer local = _runtime.createRemoteServer();
            local.connectToServer();
           
            Version localWGAVersion = null;
                    try {
                        monitor.beginTask("retrieving local WGA server version", IProgressMonitor.UNKNOWN);
                        localWGAVersion = local.getServices().getWGAVersion(local.getSession());
                    }
                    catch (Exception e) {
                        // this might happen if server version is < 5.3
                    }
                    try {
                        monitor.beginTask("retrieving remote WGA server version", IProgressMonitor.UNKNOWN);
                        _remoteWGAVersion = _server.getServices().getWGAVersion(_server.getSession());
                    }
                    catch (Exception e) {
                        // this might happen if server version is < 5.3
                    }
                   
                   
                    // check local and remote WGA version - plugin sync is available for WGA >= 5.3
                    if (localWGAVersion != null && localWGAVersion.isAtLeast(5, 3) && _remoteWGAVersion != null && _remoteWGAVersion.isAtLeast(5, 3)) {                               
                monitor.beginTask("retrieving local plugin infos", IProgressMonitor.UNKNOWN);
                               
                List<PluginInfo> infos = local.getServices().getPluginInformation(local.getSession());
                for (PluginInfo info : infos) {
                    // we will sync only active & valid plugins ... dev plugins & platform plugins are excluded
                    if (info.isActive() && info.isValid() && !info.isPlatformPlugin() && !info.isDeveloperPlugin()) {
                        IResource virtualPluginResource = buildVirtualPluginResource(_runtime, info);
                        _localPluginInfos.put(virtualPluginResource, info);
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WGARemoteServer

  public void init(List<WGARemoteServer> servers) { 
    _table.removeAll();
    Iterator<WGARemoteServer> it = servers.iterator();
    while (it.hasNext()) {
      WGARemoteServer currentServer = it.next();
      TableItem item = new TableItem(_table, SWT.NONE);       
      item.setText(new String[] { currentServer.getName(), currentServer.getUrl().toString(), "" });
      item.setData(currentServer);
    }

    for(TableColumn current : _table.getColumns()){
      current.pack();     
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WGARemoteServer

  @Override
  public List<IStatus> validate() {
    List<IStatus> messages = new ArrayList<IStatus>();
    TableItem[] items = _table.getItems();
    for (TableItem item : items) {
      WGARemoteServer server = (WGARemoteServer) item.getData();
      // try to connect to server
      try {
        server.connectToServer();
        item.setImage(2, WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_REMOTESERVER_REACHABLE));
      } catch (Exception e) {
        item.setImage(2, WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_REMOTESERVER_UNREACHABLE));
        messages.add(new Status(Status.ERROR, WGADesignerPlugin.PLUGIN_ID, "Unable to connect to server '" + server.getName() + "'.", e));
      }
    }
    return messages;
  }
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WGARemoteServer

    return _build;
  }

  private void handleRemove() {
    if (_tableControl.getTable().getSelectionCount() > 0) {
      WGARemoteServer remoteserver = (WGARemoteServer) _tableControl.getTable().getSelection()[0].getData();
      _remoteServerModel.remove(remoteserver);
    }
  }
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WGARemoteServer

      progressMonitor.run(true, true, new UploadRunable(_serverPage.getSelectedServers()));
     
      List<String> serverNames = new ArrayList<String>();
      Iterator<WGARemoteServer> remoteServers = _serverPage.getSelectedServers().iterator();
      while(remoteServers.hasNext()){
        WGARemoteServer current = remoteServers.next();
        serverNames.add(current.getName());         
      }
     
      String lastSelectedRemoteServers  = WGUtils.serializeCollection(serverNames, ",");       
      WGADesignerPlugin.getDefault().getPreferenceStore().putValue(PreferenceConstants.LAST_SELECTED_REMOTEESERVERS+"_"+_model.getPluginUniqueName(), lastSelectedRemoteServers)
     
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WGARemoteServer

        tmpFile = File.createTempFile("WGADesignPlugin", ".wgaplugin");
        tmpFile.deleteOnExit();
        monitor.beginTask("Exporting plugin '" + _model.getPluginUniqueName() + "'.", IProgressMonitor.UNKNOWN);
        Iterator<WGARemoteServer> it = _serverList.iterator();
        while (it.hasNext()) {
          WGARemoteServer current = it.next();
          monitor.setTaskName("Exporting plugin '" + _model.getPluginUniqueName() + "' to server '" + current.getName() + "'.");
          _model.exportPlugin(tmpFile, _serverPage.getBuild(), false, false);
          List<DataSource> dataSources = new ArrayList<DataSource>();
          dataSources.add(new FileDataSource(tmpFile));
          try {
            current.getServices().installPlugins(current.getSession(), dataSources);
            monitor.worked(1);
          } catch (WGAServiceException e) {           
            throw new InvocationTargetException(e, "Plugin export to server '" + current.getName() + " (" + current.getUrl() + ") failed.");
          }         
          if (monitor.isCanceled()) {
            break;
          }
        }
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WGARemoteServer

      return null;
    }
  }
 
  public WGARemoteServer createRemoteServer() throws Exception {
      return new WGARemoteServer("local", getRootURL(), "unused", "unused");
  }
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WGARemoteServer

                    _multiTaskStatusControl.update(taskStatus);
                }
               
                taskStatus = _taskStatusMap.get(PLUGINS_TASK);
                try {
                    WGARemoteServer local = wizard.getRuntime().createRemoteServer();
                    local.connectToServer();
                    List<PluginInfo> localPluginInfos = local.getServices().getPluginInformation(local.getSession());                   
                    List<PluginInfo> remotePluginInfos = wizard.getRemoteServer().getServices().getPluginInformation(wizard.getRemoteServer().getSession());
                   
                    List<PluginInfo> pluginsMissing = new ArrayList<PluginInfo>();
                    Map<PluginInfo, PluginInfo> pluginsDifferent = new HashMap<PluginInfo, PluginInfo>();
                    for (PluginInfo localInfo: localPluginInfos) {
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WGARemoteServer

                        monitor.worked(1);

                        if (isCopyContent()) {
                            // create local database dump
                            monitor.setTaskName("creating content store dump");
                            WGARemoteServer server = new WGARemoteServer("local", _runtime.getRootURL(), "unused", "unused");
                            server.connectToServer(5*1000, 0);

                            DataSource csDump = server.getServices().createContentStoreDump(server.getSession(), _webApplication, isIncludeACL(), true);
                            monitor.worked(1);

                            // import dump on remote db
                            monitor.setTaskName("importing content store dump in remote database");
                            _remoteServer.getServices().importContentStoreDump(_remoteServer.getSession(), csDump, _webApplication, isIncludeACL(), true);
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WGARemoteServer

    if (!WorkbenchUtils.isValidResourceName(serverName)) {
      messages.add("Server name contains invalid characters. Only alphanumeric ascii characters and '_', '-' are allowed.");
    }
   
    if (_server != null) {
      if (!_server.getName().equals(_srvName.getText()) && _servermodel.hasRemoteServer(new WGARemoteServer(_srvName.getText(), null, null, null))) {
        messages.add("Server name already in use");
      }
    } else {
      if (_servermodel.hasRemoteServer(new WGARemoteServer(_srvName.getText(), null, null, null))) {
        messages.add("Server name already in use");
      }     
    }

    if (isEmpty(_srvURL.getText())) {
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.