Examples of WGARemoteServer


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

  }


  public void computeResponse() {
    if (_server == null) { // ADD
      _server = new WGARemoteServer(_srvName.getText(), _serverurl, _srvUser.getText(), _srvPW.getText());
    } else { // EDIT
      _server.setName(_srvName.getText());
      _server.setUrl(_serverurl);
      _server.setUser(_srvUser.getText());
      _server.setPassword(_srvPW.getText());
View Full Code Here

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

  }

  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

  }

  private void handleEdit() {
    if (_tableControl.getTable().getSelectionCount() > 0) {
      WGARemoteServer selectedServer = (WGARemoteServer) _tableControl.getTable().getSelection()[0].getData();
      AddWGARemoteServerDialog editDialog = new AddWGARemoteServerDialog(getShell(), _remoteServerModel, selectedServer);
      editDialog.open();

      if (editDialog.getReturnCode() == Dialog.OK) {
        _remoteServerModel.update(editDialog.getServer())
View Full Code Here

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

            try {
                WGAPluginResourceSyncInfo wgaSyncInfo = (WGAPluginResourceSyncInfo) info;
                if ((wgaSyncInfo.getKind() & SyncInfo.CONFLICTING) != SyncInfo.CONFLICTING) {
                    int change = SyncInfo.getChange(wgaSyncInfo.getKind());
                            if (change == SyncInfo.DELETION) {
                                WGARemoteServer remote = wgaSyncInfo.getServer();
                                remote.getServices().deactivatePlugin(remote.getSession(), ((WGAPluginResourceVariant)wgaSyncInfo.getRemote()).getPluginInfo());    
                                committedResources.add(wgaSyncInfo.getLocal());
                            } else if (change == SyncInfo.ADDITION) {
                                WGARemoteServer local = wgaSyncInfo.getRuntime().createRemoteServer();
                                local.connectToServer();
                                DataSource plugin = local.getServices().downloadPlugin(local.getSession(), wgaSyncInfo.getLocalPluginInfo());
                                WGARemoteServer remote = wgaSyncInfo.getServer();
                                remote.getServices().installPlugins(remote.getSession(), Collections.singletonList(plugin));
                                remote.getServices().activatePlugin(remote.getSession(), wgaSyncInfo.getLocalPluginInfo());
                                committedResources.add(wgaSyncInfo.getLocal());
                            }
                } 
            } catch (Exception e) {
                throw new InvocationTargetException(e);                   
View Full Code Here

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

  @Override
  public void computeResponse() {
   
    try {
      _location = new URL(_txtRemoteLocation.getText());
      _remoteServer = new WGARemoteServer(_runtime.getName(), _location, _txtUser.getText(), _txtPassword.getText());

    } catch (Exception e) {
      WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getShell(), "Gathering remote location information failed", "Creation of remote location information failed.", e);
    }
  }
View Full Code Here

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

    }     
     
   

   
    WGARemoteServer server = _remoteLocationPage.getRemoteServer();
    try {
      server.connectToServer();     

    } catch (Exception e) {
      WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getShell(), "Server connection failed.", "Unable to connect to WGA server '" + server.getUrl().toString() + "'.", e);
      return false;
    }
   
      // check local and remote runtime version
        de.innovationgate.wga.common.beans.csconfig.v1.Version localWGAVersion =  null;
        WGADeployment deployment = WGADesignerPlugin.getDefault().getWGADeploymentManager().getDeployment(_runtime.getWGADistributionName());
        if (deployment != null) {
            localWGAVersion = deployment.getWGAVersion();
        }
   
        Version remoteWGAVersion = null;
        try {            
            remoteWGAVersion = server.getServices().getWGAVersion(server.getSession());
        }
        catch (Exception e) {
            // this might happen if server version is < 5.3
        }
       
        if (localWGAVersion.isAtLeast(5, 3)) {
            if (remoteWGAVersion == null || !remoteWGAVersion.isAtLeast(5, 3)) {
                MessageDialog.openWarning(getShell(), "Synchronization warning", "The remote server version is too low (< 5.3) to support all synchronization features. Synchronization will only affect designs but not plugins.");  
            } else if (remoteWGAVersion != null && remoteWGAVersion.isAtLeast(5, 3) && !TomcatUtils.getInstance().isRunning(_runtime)) {
                boolean startRuntime = MessageDialog.openConfirm(getShell(), "Synchronization warning", "To provide all synchronization features local runtime need to be started. Start runtime now?.");
                if (startRuntime) {
                    StartWGARuntime.call(_runtime, true);
                }
            }
        }

        try {
      WGARemoteServerSynchronizationParticipant participant = new WGARemoteServerSynchronizationParticipant(server, _runtime);
      ISynchronizeManager manager = TeamUI.getSynchronizeManager();
      manager.addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
      ISynchronizeView view = manager.showSynchronizeViewInActivePage();
      view.display(participant);
      return true;
    } catch (Throwable e) {
      WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getShell(), "Unable to initialize synchronization", "Unable to initialize synchronization with WGA server '" + server.getUrl().toString() + "'.", e);
      return false;
    }
  }
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.