Package de.innovationgate.wgaservices.types

Examples of de.innovationgate.wgaservices.types.PluginInfo


  public SyncInfo getSyncInfo(IResource resource) throws TeamException {
      synchronized (_refreshLock) {           
        try {
            if (isPluginResource(resource)) {
                IResourceVariant variant = null;
                PluginInfo remotePluginInfo = _remotePluginInfos.get(resource);
                if (remotePluginInfo != null) {
                    variant = new WGAPluginResourceVariant(_server, remotePluginInfo);
                }
               
                PluginInfo localPluginInfo = _localPluginInfos.get(resource);
               
                SyncInfo info = new WGAPluginResourceSyncInfo(_runtime, _server, resource, localPluginInfo, variant, _remoteWGAVersion);
                info.init();
                return info;
            } else {
View Full Code Here


                   
                    List<PluginInfo> pluginsMissing = new ArrayList<PluginInfo>();
                    Map<PluginInfo, PluginInfo> pluginsDifferent = new HashMap<PluginInfo, PluginInfo>();
                    for (PluginInfo localInfo: localPluginInfos) {
                        if (localInfo.isActive() && localInfo.isValid() && !localInfo.isPlatformPlugin()) {
                            PluginInfo remoteInfo = retrieveActiveByUniqueName(remotePluginInfos, localInfo.getUniqueName());
                            if (remoteInfo == null) {
                                pluginsMissing.add(localInfo);
                            } else {
                                if (!remoteInfo.getVersion().equals(localInfo.getVersion())) {
                                    pluginsDifferent.put(localInfo, remoteInfo);
                                }
                            }
                        }
                    }
                   
                    taskStatus.setSeverityLabel(pluginsMissing.size() + " missing, " + pluginsDifferent.size() + " different");
                    if (!pluginsMissing.isEmpty() || !pluginsDifferent.isEmpty()) {
                        taskStatus.setSeverity(TaskStatus.WARNING);                       
                        StringBuffer status = new StringBuffer();
                        if (!pluginsMissing.isEmpty()) {                           
                            status.append("The following plugins are missing on the remote server:\n");                          
                            for (int i=0; i < pluginsMissing.size(); i++) {
                                PluginInfo info = pluginsMissing.get(i);
                                status.append("- " + info.getUniqueName() + " (" + info.getVersion() ")");
                                status.append("\n");
                            }
                           
                        }
                        if (!pluginsDifferent.isEmpty()) {
                            status.append("The following plugins have different versions on the remote server:\n");
                            Iterator<PluginInfo> localInfos = pluginsDifferent.keySet().iterator();
                            while (localInfos.hasNext()) {
                                PluginInfo info = localInfos.next();
                                PluginInfo remote = pluginsDifferent.get(info);
                                status.append("- " + info.getUniqueName() + " (" + info.getVersion() + " != " + remote.getVersion() + ")");
                                status.append("\n");
                            }
                        }
                        taskStatus.setMessage(status.toString());
                    } else {
View Full Code Here

            return IN_SYNC;
        } else if (getLocal().equals(WGARemoteServerSubscriber.retrieveVirtualPluginRoot(_runtime))) {
            return IN_SYNC;
        }  
        if (_localPluginInfo != null && getRemote() != null) {
            PluginInfo remotePluginInfo = ((WGAPluginResourceVariant)getRemote()).getPluginInfo();           
            if (_localPluginInfo.getVersion().equals(remotePluginInfo.getVersion())) {
                return IN_SYNC;
            } else {
                return DELETION | OUTGOING;
            }
        } else if (_localPluginInfo != null && getRemote() == null) {
View Full Code Here

        }
       
        List<PluginInfo> result = new ArrayList<PluginInfo>();
       
        for (WGAPlugin plugin : _core.getPluginSet().getPlugins()) {
            PluginInfo info = new PluginInfo();
            info.setUniqueName(plugin.getPluginID().getUniqueName());
            info.setVersion(toServiceVersionBean(plugin.getPluginID().getVersion()));
            info.setActive(plugin.isActive());
            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

TOP

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

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.