Examples of WGAPluginSet


Examples of de.innovationgate.wgpublisher.plugins.WGAPluginSet

    if (!isAdminSession(session)) {
      throw new WGAServiceException("You need an administrative login to access this service.");
    }
       
    try {
      WGAPluginSet pluginSet = _core.getPluginSet();
      List<WorkspaceOperation> operations = new ArrayList<WorkspaceOperation>();
      Iterator<DataSource> pluginIt = plugins.iterator();
     
      while (pluginIt.hasNext()) {
        InstallPluginOperation operation = pluginSet.loadPluginToWorkspace(pluginIt.next().getInputStream());
        operations.add(operation);
      }
      pluginSet.performOperations(operations);
      pluginSet.save();
     
      operations.clear();
      _core.updatePlugins();
    } catch (Exception e) {
      throw new WGAServiceException("Plugin installation failed.", e);
View Full Code Here

Examples of de.innovationgate.wgpublisher.plugins.WGAPluginSet

        if (!isAdminSession(session)) {
            throw new WGAServiceException("You need an administrative login to access this service.");
        }
               
        try {
            WGAPluginSet pluginSet = _core.getPluginSet();
            WGAPlugin plugin = pluginSet.getPluginByUniqueName(pluginInfo.getUniqueName());
            if (plugin != null) {
                File file = plugin.getPluginFile();
                if (file != null && file.isFile()) {
                    return new FileDataSource(file);
                }
View Full Code Here

Examples of de.innovationgate.wgpublisher.plugins.WGAPluginSet

        if (!isAdminSession(session)) {
            throw new WGAServiceException("You need an administrative login to access this service.");
        }
               
        try {
            WGAPluginSet pluginSet = _core.getPluginSet();
            // create plugin id from info
            PluginID id = new PluginID();
            id.setUniqueName(pluginInfo.getUniqueName());
            id.setVersion(toConfigVersionBean(pluginInfo.getVersion()));
            WGAPlugin plugin = pluginSet.getPluginByID(id);
            if (plugin != null) {
                if (!plugin.isActive()) {
                    List<WorkspaceOperation> ops = new ArrayList<WorkspaceOperation>();
                    ops.add(new ActivatePluginOperation(id, WGAPluginSet.UPDATESTRATEGY_UPDATE_KEEP_DATA));
                    pluginSet.performOperations(ops);
                }
            }
        } catch (Exception e) {
            throw new WGAServiceException("Activation of plugin '" + pluginInfo.getUniqueName() + "' failed.", e);
        }
View Full Code Here

Examples of de.innovationgate.wgpublisher.plugins.WGAPluginSet

        if (!isAdminSession(session)) {
            throw new WGAServiceException("You need an administrative login to access this service.");
        }
               
        try {
            WGAPluginSet pluginSet = _core.getPluginSet();
            // create plugin id from info
            PluginID id = new PluginID();
            id.setUniqueName(pluginInfo.getUniqueName());
            id.setVersion(toConfigVersionBean(pluginInfo.getVersion()));
            WGAPlugin plugin = pluginSet.getPluginByID(id);
            if (plugin != null) {
                if (plugin.isActive()) {
                    pluginSet.deactivatePlugin(plugin);
                }
            }
        } catch (Exception e) {
            throw new WGAServiceException("Deactivation of plugin '" + pluginInfo.getUniqueName() + "' failed.", e);
        }
View Full Code Here

Examples of de.innovationgate.wgpublisher.plugins.WGAPluginSet

                return;
            }
           
            // Load plugins definition file
            File pluginsDefFile = new File(pluginsDir, "plugins.xml");
            WGAPluginSet currentPlugins;
            boolean reinstallPluginsDir = false;
            if (pluginsDefFile.exists()) {
                currentPlugins = WGAPluginSet.load(pluginsDefFile);
            }
            else {
                currentPlugins = new WGAPluginSet();
                reinstallPluginsDir = true;
            }
            currentPlugins.init(this, pluginsDir);
            if (this.pluginSet != null) {
                currentPlugins.importRuntimeContexts(this.pluginSet);
            }
           
            // Replace plugins field with new plugin set - This must be done before connecting plugins so plugin init/connection scripts can
            // refer to already installed plugins
            this.pluginSet = currentPlugins;
           
            // Cope with default plugins. Install new, uninstall removed (must be in that order so installation can determine status of previous version)
            installDefaultPlugins(currentPlugins, reinstallPluginsDir);
            uninstallRemovedDefaultPlugins();
           
            // Validate and connect plugins
            currentPlugins.validatePlugins();
            newConnectedDBKeys = currentPlugins.connectPlugins(domainConfigs);
           
            // Save plugins def file
            this.pluginSet.save();
           
            // Update module registry if it is already available
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.