Package org.apache.roller.model

Examples of org.apache.roller.model.PluginManager


     */
    public Map getInitializedPlugins() {
        if (initializedPlugins == null) {
            try {
                Roller roller = RollerFactory.getRoller();
                PluginManager ppmgr = roller.getPagePluginManager();
                initializedPlugins = ppmgr.getWeblogEntryPlugins(this);
            } catch (Exception e) {
                this.log.error("ERROR: initializing plugins");
            }
        }
        return initializedPlugins;
View Full Code Here


            try {
                if (entry.getPlugins() != null) {
                    RollerContext rctx =
                        RollerContext.getRollerContext();
                    try {
                        PluginManager ppmgr = roller.getPagePluginManager();
                        Map plugins = ppmgr.getWeblogEntryPlugins(
                            entry.getWebsite());
                        xformed = ppmgr.applyWeblogEntryPlugins(
                            plugins, entry, entry.getText());
                    } catch (Exception e) {
                        mLogger.error(e);
                    }
                }
View Full Code Here

                String xformed = sourceText;       
                if (entry.getPlugins() != null) {
                    RollerContext rctx =
                        RollerContext.getRollerContext();
                    try {
                        PluginManager ppmgr = roller.getPagePluginManager();
                        Map plugins = ppmgr.getWeblogEntryPlugins(
                                entry.getWebsite());

                        xformed = ppmgr.applyWeblogEntryPlugins(plugins, entry, sourceText);

                    } catch (Exception e) {
                        mLogger.error(e);
                    }
                }
View Full Code Here

            String xformed = entry.getSummary();
            try {       
                if (entry.getPlugins() != null) {
                    RollerContext rctx =
                        RollerContext.getRollerContext();
                    PluginManager ppmgr = roller.getPagePluginManager();
                    Map plugins = ppmgr.getWeblogEntryPlugins(
                        entry.getWebsite());
                    xformed = ppmgr.applyWeblogEntryPlugins(
                        plugins, entry, entry.getSummary());
                }              
                pageContext.getOut().println(xformed);
            } catch (Throwable e) {
                throw new JspException("ERROR applying plugin to entry", e);
View Full Code Here

     * Init entry from Roller entry
     */
    private void initFromRollerEntry(WeblogEntryData rollerEntry, Map pagePlugins)
    throws RollerException {
        Roller roller = RollerFactory.getRoller();
        PluginManager ppmgr = roller.getPagePluginManager();
       
        String content = "";
        if (!StringUtils.isEmpty(rollerEntry.getText())) {
            content = rollerEntry.getText();
        } else {
            content = rollerEntry.getSummary();
        }
        content = ppmgr.applyWeblogEntryPlugins(pagePlugins, rollerEntry, content);
       
        setAuthor(    rollerEntry.getCreator().getFullName());
        setTitle(     rollerEntry.getTitle());
        setPermalink( rollerEntry.getLink());
        setPubTime(   rollerEntry.getPubTime());
View Full Code Here

    public boolean getHasPagePlugins()
    {
        boolean ret = false;
        try {
            Roller roller = RollerFactory.getRoller();
            PluginManager ppmgr = roller.getPagePluginManager();
            ret = ppmgr.hasPagePlugins();
        } catch (RollerException e) {
            logger.error(e);
        }
        return ret;
    }
View Full Code Here

        List list = new ArrayList();
        try {
            if (getHasPagePlugins())
            {
                Roller roller = RollerFactory.getRoller();
                PluginManager ppmgr = roller.getPagePluginManager();
                Map plugins = ppmgr.getWeblogEntryPlugins(
                    getWebsite());
                Iterator it = plugins.values().iterator();
                while (it.hasNext()) list.add(it.next());
            }
        } catch (Exception e) {
View Full Code Here

            entry = wmgr.getWeblogEntry(entryid);
           
            RollerSession rses = RollerSession.getRollerSession(request);
            if (rses.isUserAuthorizedToAuthor(entry.getWebsite())) {
                // Run entry through registered PagePlugins
                PluginManager ppmgr = roller.getPagePluginManager();
                Map plugins = ppmgr.getWeblogEntryPlugins(
                        entry.getWebsite());
               
                String content = "";
                if (!StringUtils.isEmpty(entry.getText())) {
                    content = entry.getText();
                } else {
                    content = entry.getSummary();
                }
                content = ppmgr.applyWeblogEntryPlugins(plugins, entry, content);

                String title = entry.getTitle();
                String excerpt = StringUtils.left( Utilities.removeHTML(content),255 );
               
                String url = entry.getPermalink();
View Full Code Here

        mDate = date;
        mFolder = folder;
       
        // init plugins
        Roller roller = RollerFactory.getRoller();
        PluginManager ppmgr = roller.getPagePluginManager();
        mPagePlugins = ppmgr.getWeblogEntryPlugins(mWebsite);
    }
View Full Code Here

        }
        public boolean getHasPagePlugins() {
            boolean ret = false;
            try {
                Roller roller = RollerFactory.getRoller();
                PluginManager ppmgr = roller.getPagePluginManager();
                ret = ppmgr.hasPagePlugins();
            } catch (RollerException e) {
                mLogger.error(e);
            }
            return ret;
        }
View Full Code Here

TOP

Related Classes of org.apache.roller.model.PluginManager

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.