Package org.apache.roller.model

Examples of org.apache.roller.model.PagePluginManager


                        log.debug(msg);
                    }
                }
               
                // Populate subscription object with new entries
                PagePluginManager ppmgr = RollerFactory.getRoller().getPagePluginManager();
                Map pagePlugins = ppmgr.createAndInitPagePlugins(
                        website,
                        null,
                        RollerRuntimeConfig.getProperty("site.absoluteurl"),
                        new VelocityContext());
                Iterator entryIter = entries.iterator();
View Full Code Here


                mWebsite = mRollerReq.getWebsite();
            }
        }
        if (mVelocityContext == null) mVelocityContext = new VelocityContext();
        Roller roller = RollerFactory.getRoller();
        PagePluginManager ppmgr = roller.getPagePluginManager();
        mPagePlugins = ppmgr.createAndInitPagePlugins(
                mWebsite,
                RollerContext.getRollerContext().getServletContext(),
                RollerContext.getRollerContext().getAbsoluteContextUrl(request),
                mVelocityContext);
    }
View Full Code Here

            entry = wmgr.getWeblogEntry(entryid);
           
            RollerSession rses = RollerSession.getRollerSession(request);
            if (rses.isUserAuthorizedToAuthor(entry.getWebsite())) {
                // Run entry through registered PagePlugins
                PagePluginManager ppmgr = roller.getPagePluginManager();
                Map plugins = ppmgr.createAndInitPagePlugins(
                        entry.getWebsite(),
                        RollerContext.getRollerContext().getServletContext(),
                        RollerContext.getRollerContext().getAbsoluteContextUrl(request),
                        new VelocityContext());
               
                String content = "";
                if (!StringUtils.isEmpty(entry.getText())) {
                    content = entry.getText();
                } else {
                    content = entry.getSummary();
                }
                content = ppmgr.applyPagePlugins(entry, plugins, content, true);

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

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

                String xformed = sourceText;       
                if (entry.getPlugins() != null) {
                    RollerContext rctx =
                        RollerContext.getRollerContext();
                    try {
                        PagePluginManager ppmgr = roller.getPagePluginManager();
                        Map plugins = ppmgr.createAndInitPagePlugins(
                                entry.getWebsite(), rctx.getServletContext(),
                                rctx.getAbsoluteContextUrl((HttpServletRequest)pageContext.getRequest()),
                                new VelocityContext());

                        xformed = ppmgr.applyPagePlugins(entry, plugins, sourceText, true);

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

            String xformed = entry.getSummary();
            try {       
                if (entry.getPlugins() != null) {
                    RollerContext rctx =
                        RollerContext.getRollerContext();
                    PagePluginManager ppmgr = roller.getPagePluginManager();
                    Map plugins = ppmgr.createAndInitPagePlugins(
                        entry.getWebsite(),
                        rctx.getServletContext(),
                        rctx.getAbsoluteContextUrl((HttpServletRequest)pageContext.getRequest()),
                        new VelocityContext());
                    xformed = ppmgr.applyPagePlugins(
                        entry, plugins, entry.getSummary(), true);
                }              
                pageContext.getOut().println(xformed);
            } catch (Throwable e) {
                throw new JspException("ERROR applying plugin to entry", e);
View Full Code Here

            try {
                if (entry.getPlugins() != null) {
                    RollerContext rctx =
                        RollerContext.getRollerContext();
                    try {
                        PagePluginManager ppmgr = roller.getPagePluginManager();
                        Map plugins = ppmgr.createAndInitPagePlugins(
                            entry.getWebsite(), rctx.getServletContext(),
                            rctx.getAbsoluteContextUrl((HttpServletRequest)pageContext.getRequest()),
                            new VelocityContext());
                        xformed = ppmgr.applyPagePlugins(
                            entry, plugins, entry.getText(), singleEntry);
                    } catch (Exception e) {
                        mLogger.error(e);
                    }
                }
View Full Code Here

    public boolean getHasPagePlugins()
    {
        boolean ret = false;
        try {
            Roller roller = RollerFactory.getRoller();
            PagePluginManager 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();
                PagePluginManager ppmgr = roller.getPagePluginManager();
                Map plugins = ppmgr.createAndInitPagePlugins(
                    getWebsite(),
                    RollerContext.getRollerContext().getServletContext(),
                    RollerContext.getRollerContext().getAbsoluteContextUrl(request),
                    new VelocityContext());
                Iterator it = plugins.values().iterator();
View Full Code Here

        }
        public boolean getHasPagePlugins() {
            boolean ret = false;
            try {
                Roller roller = RollerFactory.getRoller();
                PagePluginManager 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.PagePluginManager

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.