Package de.innovationgate.wgaservices.types

Examples of de.innovationgate.wgaservices.types.Version


        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
View Full Code Here


               
                // check version
                taskStatus = _taskStatusMap.get(REMOTE_VERSION_TASK);               
                // connect to server
                try {
                    Version remoteWGAVersion = _server.getServices().getWGAVersion(_server.getSession());
                    if (remoteWGAVersion.isAtLeast(5, 3)) {
                        taskStatus.setSeverity(TaskStatus.OK);
                        taskStatus.setMessage("OK");
                    } else {
                        taskStatus.setSeverity(TaskStatus.ERROR);
                        taskStatus.setMessage("Version of remote server is too low ('" + remoteWGAVersion.getMajorVersion() + "." + remoteWGAVersion.getMinorVersion()+ "')");
                        taskStatus.setSeverityLabel("too low ('" + remoteWGAVersion.getMajorVersion() + "." + remoteWGAVersion.getMinorVersion()+ "')");
                        canFinish = false;
                    }
                }
                catch (Exception e) {
                   taskStatus.setSeverity(TaskStatus.ERROR);
View Full Code Here

        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);
                }
            }
View Full Code Here

            info.setDefaultPlugin(plugin.isDefaultPlugin());
            info.setPlatformPlugin(plugin.isPlatformPlugin());
            info.setValid(plugin.isValid());
            info.setDeveloperPlugin(plugin.isDirectory());
            de.innovationgate.wga.common.beans.csconfig.v1.Version minVersion = plugin.getCsConfig().getPluginConfig().getMinimumWGAVersion();
            Version minInfoVersion = new Version(minVersion.getMajorVersion(), minVersion.getMinorVersion(), minVersion.getMaintenanceVersion(), minVersion.getPatchVersion(), minVersion.getBuildVersion());
            info.setMinimumWGAVersion(minInfoVersion);
            result.add(info);
        }
       
        return result;
View Full Code Here

       
        if (!isAdminSession(session)) {
            throw new WGAServiceException("You need an administrative login to access this service.");
        }
       
        Version version = new Version(WGAVersion.WGAPUBLISHER_MAJOR_VERSION, WGAVersion.WGAPUBLISHER_MINOR_VERSION,
                WGAVersion.WGAPUBLISHER_MAINTENANCE_VERSION, WGAVersion.WGAPUBLISHER_PATCH_VERSION, WGAVersion.WGAPUBLISHER_BUILD_VERSION);
       
        return version;
    }
View Full Code Here

            throw new WGAServiceException("Deactivation of plugin '" + pluginInfo.getUniqueName() + "' failed.", e);
        }
    }
   
    private static Version toServiceVersionBean(de.innovationgate.wga.common.beans.csconfig.v1.Version version) {
        Version serviceVersion = new Version();
        serviceVersion.setMajorVersion(version.getMajorVersion());
        serviceVersion.setMinorVersion(version.getMinorVersion());
        serviceVersion.setMaintenanceVersion(version.getMaintenanceVersion());
        serviceVersion.setPatchVersion(version.getPatchVersion());
        serviceVersion.setBuildVersion(version.getBuildVersion());
        return serviceVersion;
    }
View Full Code Here

TOP

Related Classes of de.innovationgate.wgaservices.types.Version

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.