Package de.innovationgate.wgpublisher.plugins

Examples of de.innovationgate.wgpublisher.plugins.WGAPlugin


            db.removeDatabaseEventListener(this);
        }
       
        ContainerInfo info = _containerInfos.remove(db.getDbReference());
        if (info != null) {
            WGAPlugin plugin = null;
            PluginID pluginID = (PluginID) db.getAttribute(WGACore.DBATTRIB_PLUGIN_ID);
            if (pluginID != null) {
                plugin = _core.getPluginSet().getPluginByID(pluginID);
            }
           
View Full Code Here


    public List<String> getProvidedValues() {
       
        List<String> pluginDBs = new ArrayList<String>();
        Iterator<WGAPlugin> plugins = _core.getPluginSet().getPlugins().iterator();
        while (plugins.hasNext()) {
            WGAPlugin plugin = (WGAPlugin) plugins.next();
            if (plugin.isActive()) {
                switch (_usage) {
                   
                    case PluginsOptionType.USAGE_ANY:
                        pluginDBs.add(plugin.buildDatabaseKey());
                        break;
                       
                    case PluginsOptionType.USAGE_AUTHSOURCE:
                        if (plugin.getCsConfig().getPluginConfig().isUsageAsAuthSource()) {
                            pluginDBs.add(plugin.buildDatabaseKey());
                        }
                        break;
                   
                    case PluginsOptionType.USAGE_CONTENTSTORE:
                        if (plugin.getCsConfig().getPluginConfig().isUsageAsContentStore()) {
                            pluginDBs.add(plugin.buildDatabaseKey());
                        }
                        break;
                       
                    case PluginsOptionType.USAGE_DESIGNSOURCE:
                        if (plugin.getCsConfig().getPluginConfig().isUsageAsDesignProvider()) {
                            pluginDBs.add(plugin.buildDatabaseKey());
                        }
                        break;
                }
            }
        }
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() + ")");
            }
            else {
                return "Plugin " + db.getTitle() + "(Installation key not retrievable)";
            }
        }
View Full Code Here

    }

    else if (contextFunction.equals("db") || contextFunction.equals("plugin")) {
       
        if (contextFunction.equals("plugin")) {
            WGAPlugin plugin = context.getwgacore().getPluginSet().getPluginByUniqueName(contextExpression);
            if (plugin != null) {
                contextExpression = plugin.buildDatabaseKey();
            }
            else {
                context.setLastError("Unknown plugin unique name: " + contextExpression);
                return errorReturnContext;
            }
View Full Code Here

            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);
                }
            }
        } catch (Exception e) {
View Full Code Here

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

            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

            arg1 = ((Wrapper) arg1).unwrap();
        }
       
        if (arg1 instanceof String) {
            TMLContext con = fetchInitialContext(Context.getCurrentContext());
            WGAPlugin plugin = con.getwgacore().getPluginSet().getPluginByUniqueName((String) arg1);
            if (plugin == null || !plugin.isActive() || !plugin.isValid()) {
                return null;
            }
            WGDatabase db = con.db(plugin.buildDatabaseKey());
            if (db != null) {
                return new Plugin(db);
            }
            else {
                return null;
View Full Code Here

    }
   
    @CodeCompletion
    public PluginID pluginid(String pluginUniqueName) throws WGException {
       
        WGAPlugin plugin = getwgacore().getPluginSet().getPluginByUniqueName(pluginUniqueName);
        if (plugin != null) {
            return plugin.getCsConfig().getPluginConfig().getId();
        }
        else {
            return null;
        }
View Full Code Here

    }
   
    @CodeCompletion
    public String plugindbkey(String pluginUniqueName) {
       
        WGAPlugin plugin = getwgacore().getPluginSet().getPluginByUniqueName(pluginUniqueName);
        if (plugin != null) {
            return plugin.buildDatabaseKey();
        }
        else {
            return null;
        }
       
View Full Code Here

TOP

Related Classes of de.innovationgate.wgpublisher.plugins.WGAPlugin

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.