Package de.innovationgate.wga.common.beans.csconfig.v1

Examples of de.innovationgate.wga.common.beans.csconfig.v1.PublisherOption


    }
   

   
    public WGAPlugin getPluginByID(String idString) {
        return getPluginByID(new PluginID(idString));
    }
View Full Code Here


    }

    public String getValueTitle(String value, Locale locale) {
       
        WGDatabase db = _core.getContentdbs().get(value);
        PluginID pid = (PluginID) db.getAttribute(WGACore.DBATTRIB_PLUGIN_ID);
        if (pid != null) {
            WGAPlugin plugin = _core.getPluginSet().getPluginByID(pid);
            if (plugin != null) {
                return "Plugin " + db.getTitle() + " (" + (plugin.getInstallationKey() + ")");
            }
View Full Code Here

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

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

            if (config == null) {
                return false;
            }
           
            // Look if the plugin is already installed
            PluginID defaultPluginId = config.getCsConfig().getPluginConfig().getId();
            List<WGAPlugin> installedPlugins = currentPlugins.getPluginsByUniqueName(defaultPluginId.getUniqueName());
            for (WGAPlugin plugin : installedPlugins) {

                // Same plugin file = plugin already installed
                if (plugin.getPluginFile().equals(file)) {
                    return false;
                }
               
                // Don't overwrite (active) dev plugin dirs
                if (plugin.isDirectory() && plugin.isActive()) {
                    return false;
                }
               
                // Skip reasons that do not apply to dev plugins
                if (!file.isDirectory()) {
                   
                    // Don't overwrite (active) plugins that are of higher version
                    int versionComparison = plugin.getPluginID().getVersion().compareTo(defaultPluginId.getVersion());
                    if (versionComparison > 0 && plugin.isActive()) {
                        return false;
                    }
                   
                    // Don't overwrite (active) plugins of same version and same or higher build
                    if (versionComparison == 0 && plugin.isActive() && plugin.getPluginID().getVersion().getBuildVersion() >= defaultPluginId.getVersion().getBuildVersion()) {
                        return false;
                    }
                }
            }
           
View Full Code Here

            list.add(new AuthPlugin(_csConfig.getPluginConfig().getId().getUniqueName(), "Myself"));
        }

        Iterator<PluginID> dependencies = getPluginDependencies().iterator();
        while (dependencies.hasNext()) {
            PluginID id = dependencies.next();
            list.add(new AuthPlugin(id.getUniqueName(), id.getUniqueName()));
        }
        return list;
    }
View Full Code Here

        }

        if (hasPluginConfig()) {
            // Validate plugin id
            PluginConfig pc = _csConfig.getPluginConfig();
            PluginID id = pc.getId();

            errors.addAll(validatePluginUniqueName(getPluginUniqueName()));

            // Validate plugin dependencies
            Iterator<PluginID> dependencies = pc.getDependencies().iterator();
            while (dependencies.hasNext()) {
                PluginID did = (PluginID) dependencies.next();
                if (did.getUniqueName() == null || did.getUniqueName().trim().equals("")) {
                    errors.add(new ValidationError("Unique name of plugin dependency should not be empty.", new String[] { "pluginDependencies" }));
                }
                else if (did.getUniqueName().contains(" ")) {
                    errors.add(new ValidationError("Unique name of plugin dependency should not contain white spaces.", new String[] { "pluginDependencies" }));
                }
            }

            // Validate relation between minimum WGA version and WGA
View Full Code Here

    });
   
    _tablePublisherOptions.getTable().addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        if (_tablePublisherOptions.getTable().getSelectionCount() > 0) {
          PublisherOption option = (PublisherOption) _tablePublisherOptions.getTable().getSelection()[0].getData();
          if (_publisherOptionsModel.isBeanEditable(option)) {
            _tablePublisherOptions.getButton(EditableTableControl.BUTTON_REMOVE).setEnabled(true);
          } else {
            _tablePublisherOptions.getButton(EditableTableControl.BUTTON_REMOVE).setEnabled(false);
          }
View Full Code Here

     
    });
    dialog.open();
    String optionName = dialog.getValue();
    if (optionName != null && !optionName.trim().equals("")) {
      PublisherOption option = new PublisherOption();
      option.setName(optionName);
      option.setValue("<value>");
      _publisherOptionsModel.add(option);
    }
  }
View Full Code Here

    }
   
            List publisherOptions = _info.getCsConfig().getPublisherOptions();
            Iterator options = publisherOptions.iterator();
            while (options.hasNext()) {
                PublisherOption option = (PublisherOption) options.next();
                optionsTarget.put(option.getName(), option.getValue());
            }

        }
View Full Code Here

TOP

Related Classes of de.innovationgate.wga.common.beans.csconfig.v1.PublisherOption

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.