Package org.apache.roller.business

Examples of org.apache.roller.business.UserManager.saveWebsite()


                // some caches are based on weblog last-modified, so update it
                website.setLastModified(new Date());
               
                try {
                    UserManager umgr = RollerFactory.getRoller().getUserManager();
                    umgr.saveWebsite(website);
                    RollerFactory.getRoller().flush();
                } catch (RollerException ex) {
                    mLogger.error("Error saving website", ex);
                }
               
View Full Code Here


               
                // if this person happened to create a Weblog template from
                // scratch then make sure and set the defaultPageId
                if(WeblogTemplate.DEFAULT_PAGE.equals(data.getName())) {
                    website.setDefaultPageId(data.getId());
                    mgr.saveWebsite(website);
                }
               
                // flush results to db
                RollerFactory.getRoller().flush();
               
View Full Code Here

                        wd.setAllowComments(Boolean.FALSE);
                        messages.add(null, new ActionMessage(
                                "websiteSettings.commentsOffForInactiveWeblog"));
                    }
                   
                    umgr.saveWebsite(wd);
                   
                    // ROL-1050: apply comment defaults to existing entries
                    if (form.getApplyCommentDefaults() != null && form.getApplyCommentDefaults().booleanValue()) {
                        wmgr.applyCommentDefaultsToEntries(wd);
                    }
View Full Code Here

                        log.debug("expiring"+weblog.getHandle());
                       
                        // to expire weblog content we have to update the
                        // last modified time of the weblog and save it
                        weblog.setLastModified(now);
                        uMgr.saveWebsite(weblog);
                       
                    } catch (RollerException ex) {
                        log.warn("couldn't lookup entry "+websiteid);
                    }
                }
View Full Code Here

        assertNotNull(weblog);
        assertEquals(testWeblog, weblog);
       
        // modify weblog and save
        weblog.setName("testtesttest");
        mgr.saveWebsite(weblog);
        TestUtils.endSession(true);
       
        // make sure changes were saved
        weblog = null;
        weblog = mgr.getWebsite(id);
View Full Code Here

        assertNotNull(weblog);
        assertEquals(testWeblog1.getHandle(), weblog.getHandle());
       
        // make sure disable weblogs are not returned
        weblog.setEnabled(Boolean.FALSE);
        mgr.saveWebsite(weblog);
        weblog = null;
        weblog = mgr.getWebsiteByHandle(testWeblog1.getHandle());
        assertNull(weblog);
       
        // restore enabled state
View Full Code Here

        assertNull(weblog);
       
        // restore enabled state
        weblog = mgr.getWebsiteByHandle(testWeblog1.getHandle(), Boolean.FALSE);
        weblog.setEnabled(Boolean.TRUE);
        mgr.saveWebsite(weblog);
        TestUtils.endSession(true);
        weblog = null;
        weblog = mgr.getWebsiteByHandle(testWeblog1.getHandle());
        assertNotNull(weblog);
       
View Full Code Here

        List weblogs12 = mgr.getWebsites(testUser, Boolean.TRUE, Boolean.TRUE, null, null, 1, 1);
        assertEquals(1, weblogs11.size());    
       
        // make sure disabled weblogs are not returned
        weblog.setEnabled(Boolean.FALSE);
        mgr.saveWebsite(weblog);
        TestUtils.endSession(true);
        List weblogs2 = mgr.getWebsites(testUser, Boolean.TRUE, Boolean.TRUE, null, null, 0, -1);
        assertEquals(1, weblogs2.size());
        weblog = (WebsiteData) weblogs2.get(0);
        assertNotNull(weblog);
View Full Code Here

        weblog = (WebsiteData) weblogs2.get(0);
        assertNotNull(weblog);
       
        // make sure inactive weblogs are not returned
        weblog.setActive(Boolean.FALSE);
        mgr.saveWebsite(weblog);
        TestUtils.endSession(true);
        List weblogs3 = mgr.getWebsites(testUser, Boolean.TRUE, Boolean.TRUE, null, null, 0, -1);
        assertEquals(0, weblogs3.size());
       
        // remove test weblogs
View Full Code Here

       
        UserManager umgr = RollerFactory.getRoller().getUserManager();
        testWeblog = umgr.getWebsite(testWeblog.getId());
        origWords = testWeblog.getBlacklist();
        testWeblog.setBlacklist("test");
        umgr.saveWebsite(testWeblog);
        TestUtils.endSession(true);
       
        rmgr.applyRefererFilters(testWeblog);
        TestUtils.endSession(true);
       
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.