Examples of PagePlugin


Examples of org.apache.roller.model.PagePlugin

            for (int i=0; i<plugins.length; i++) {
                if (mLogger.isDebugEnabled()) mLogger.debug("try " + plugins[i]);
                try {
                    Class pluginClass = Class.forName(plugins[i]);
                    if (isPagePlugin(pluginClass)) {
                        PagePlugin plugin = (PagePlugin)pluginClass.newInstance();
                        mPagePlugins.put(plugin.getName(), pluginClass);
                    } else {
                        mLogger.warn(pluginClass + " is not a PagePlugin");
                    }
                } catch (ClassNotFoundException e) {
                    mLogger.error("ClassNotFoundException for " + plugins[i]);
View Full Code Here

Examples of org.apache.roller.model.PagePlugin

        Map ret = new LinkedHashMap();
        Iterator it = getPagePluginClasses().values().iterator();
        while (it.hasNext()) {
            try {
                Class pluginClass = (Class)it.next();
                PagePlugin plugin = (PagePlugin)pluginClass.newInstance();
                plugin.init(website, servletContext, contextPath, ctx);
                ret.put(plugin.getName(), plugin);
            } catch (Exception e) {
                mLogger.error("Unable to init() PagePlugin: ", e);
            }
        }
        return ret;
View Full Code Here

Examples of org.apache.roller.model.PagePlugin

        List entryPlugins = copy.getPluginsList();
        if (entryPlugins != null && !entryPlugins.isEmpty()) {   
            Iterator iter = entryPlugins.iterator();
            while (iter.hasNext()) {
                String key = (String)iter.next();
                PagePlugin pagePlugin = (PagePlugin)pagePlugins.get(key);
                if (pagePlugin != null) {
                    if (!(singleEntry && pagePlugin.getSkipOnSingleEntry())) {
                        ret = pagePlugin.render(entry, ret);
                    }
                } else {
                    mLogger.error("ERROR: plugin not found: " + key);
                }
            }
View Full Code Here

Examples of org.apache.roller.model.PagePlugin

     * at the beginning of the result.  If the result is .trim()'ed
     * then it passes.
     */
    public void testTextile()
    {
        PagePlugin textile = new TextilePlugin();
       
        String result = textile.render(textileStr);
        //System.out.println(expected);
        //System.out.println(result);
        assertEquals("this will fail until Textile4J is fixed.", expected, result);        
    }
View Full Code Here

Examples of org.apache.roller.model.PagePlugin

                while (iter.hasNext())
                {
                    String key = (String)iter.next();
                    if (entryPlugins.contains(key))
                    {
                        PagePlugin pagePlugin = (PagePlugin)mPagePlugins.get(key);
                        if (!(singleEntry && pagePlugin.getSkipOnSingleEntry())) {
                            try {
                                ret = pagePlugin.render(entry.getPojo(), ret);
                            } catch (Throwable t) {
                                mLogger.error("ERROR from plugin: " + pagePlugin.getName(), t);
                            }
                        }
                    }
                }
            }
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.