Package org.apache.roller.model

Examples of org.apache.roller.model.Roller


         * @param num Number of entries to return (takes effect on next cache refresh)
         */
        public List getPopularWebsites(int num) throws RollerException {
            List list = null;
            mLogger.debug("Refreshing popular websites list");
            Roller roller = RollerFactory.getRoller();
            list = roller.getRefererManager().getDaysPopularWebsites(num);
            return list;
        }
View Full Code Here


         */
        public List getRecentWeblogEntries(int num) throws RollerException {
            List list = null;
            try {
                mLogger.debug("Refreshing recent entries list");
                Roller roller = RollerFactory.getRoller();
                list = roller.getWeblogManager().getWeblogEntries(
                        null,                   // userName
                        null,                   // startDate
                        new Date(),             // endDate
                        null,                   // catName
                        WeblogEntryData.PUBLISHED, // status
View Full Code Here

         * @param num Number of entries to return (takes effect on next cache refresh)
         */
        public List getWeblogEntriesPinnedToMain(int num) throws RollerException {
            List list = null;
            mLogger.debug("Refreshing pinned entries list");
            Roller roller = RollerFactory.getRoller();
            list = roller.getWeblogManager()
                .getWeblogEntriesPinnedToMain(new Integer(num));
            return list;
        }
View Full Code Here

        try { offset = Integer.parseInt(request.getParameter("offset"));
        } catch (Throwable ignored) {}            
        try { length = Integer.parseInt(request.getParameter("length"));
        } catch (Throwable ignored) {}
       
        Roller roller = RollerFactory.getRoller();
        try {
            UserManager umgr = roller.getUserManager();
            List users =
             umgr.getUsersStartingWith(startsWith, offset, length, enabledOnly);
            Iterator userIter = users.iterator();
            while (userIter.hasNext()) {
                UserData user = (UserData)userIter.next();
View Full Code Here

            //   /username/datestring
            //   /username/pagelink
            //   /username/pagelink/datestring
            //   /username/pagelink/anchor (specific entry)
            //   /username/pagelink/datestring/anchor (specific entry)
            Roller roller = RollerFactory.getRoller();
            UserManager userMgr = roller.getUserManager();
            mWebsite = userMgr.getWebsiteByHandle(pathInfo[0]);
            if (mWebsite != null)
            {
                if ( pathInfo.length == 1 )
                {
                    // we have the /username form of URL
                    mPage = mWebsite.getDefaultPage();
                }
                else if ( pathInfo.length == 2 )
                {
                    mDate = parseDate(pathInfo[1]);
                    if ( mDate == null ) // pre-jdk1.4 --> || mDate.getYear() <= 70 )
                    {
                        // we have the /username/pagelink form of URL
                        mPageLink = pathInfo[1];
                        mPage = mWebsite.getPageByLink(pathInfo[1]);
                    }
                    else
                    {
                        // we have the /username/datestring form of URL
                        mDateString = pathInfo[1];
                        mPage = mWebsite.getDefaultPage();
                        if (pathInfo[1].length() == 8) {
                            mIsDaySpecified = true;
                        } else {
                            mIsMonthSpecified = true;
                        }
                    }              
                }
                else if ( pathInfo.length == 3 )
                {
                    mPageLink = pathInfo[1];
                    mPage = mWebsite.getPageByLink(pathInfo[1]);
                   
                    mDate = parseDate(pathInfo[2]);
                    if ( mDate == null ) // pre-jdk1.4 --> || mDate.getYear() <= 70 )
                    {
                        // we have the /username/pagelink/anchor form of URL
                        try
                        {
                            WeblogManager weblogMgr = roller.getWeblogManager();
                            mWeblogEntry = weblogMgr.getWeblogEntryByAnchor(
                                mWebsite, pathInfo[2]);
                        }
                        catch (Exception e)
                        {
View Full Code Here

            throw new RollerException("ERROR creating Page Model",e);
        }
       
        // Add Velocity page helper to context
        PageHelper pageHelper = new PageHelper(request, response, ctx);
        Roller roller = RollerFactory.getRoller();
        ctx.put("pageHelper", pageHelper);
               
        // Load standard Roller objects and values into the context
        WebsiteData website =
            loadWeblogValues(ctx, rreq, rollerCtx );
View Full Code Here

            Context ctx,
            RollerRequest rreq,
            RollerContext rollerCtx )
            throws RollerException {
               
        Roller mRoller = RollerFactory.getRoller();
        Map props = mRoller.getPropertiesManager().getProperties();
       
        WebsiteData weblog = rreq.getWebsite();           
        if (weblog == null && rreq.getRequest().getParameter("entry") != null) {
            String handle = rreq.getRequest().getParameter("entry");
            weblog = RollerFactory.getRoller().getUserManager().getWebsiteByHandle(handle);
View Full Code Here

        if (ioffset + ilimit > hits.length()) ilimit = hits.length()-ioffset;
       
        boolean websiteSpecificSearch = checkForWebsite(rreq.getRequest());
        TreeMap searchResults = new TreeMap(new ReverseComparator());
        TreeSet categories = new TreeSet();
        Roller roller = RollerFactory.getRoller();
        UserManager userMgr = roller.getUserManager();
        WeblogManager weblogMgr =roller.getWeblogManager();
        WeblogEntryData entry;
        Document doc = null;
        String handle = null;
        for (int i = ioffset; i < ioffset+ilimit; i++) {
            entry = null; // reset for each iteration
View Full Code Here

            ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws IOException, ServletException {
        ActionForward forward = mapping.findForward("planetSubscriptions.page");
        try {
            if (RollerSession.getRollerSession(request).isGlobalAdminUser()) {
                Roller roller = RollerFactory.getRoller();
                PlanetManager planet = roller.getPlanetManager();
                PlanetSubscriptionFormEx form = (PlanetSubscriptionFormEx)actionForm;
                if (request.getParameter("feedUrl") != null) {
                    String feedUrl = request.getParameter("feedUrl");
                    PlanetSubscriptionData sub =
                            planet.getSubscription(feedUrl);
View Full Code Here

            ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws IOException, ServletException {
        ActionForward forward = mapping.findForward("planetSubscriptions.page");
        try {
            if (RollerSession.getRollerSession(request).isGlobalAdminUser()) {
                Roller roller = RollerFactory.getRoller();
                PlanetManager planet = roller.getPlanetManager();
                PlanetSubscriptionFormEx form = (PlanetSubscriptionFormEx)actionForm;
               
                form.doReset(mapping, request);
               
                String groupHandle = request.getParameter("groupHandle");
View Full Code Here

TOP

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

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.