Package org.apache.roller.weblogger.business

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


           
            // some caches are based on weblog last-modified, so update it
            weblog.setLastModified(new Date());
           
            UserManager umgr = WebloggerFactory.getWeblogger().getUserManager();
            umgr.saveWebsite(weblog);
            WebloggerFactory.getWeblogger().flush();
           
            // also notify cache manager
            CacheManager.invalidate(weblog);
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(newTemplate.getName())) {
                getActionWeblog().setDefaultPageId(newTemplate.getId());
                mgr.saveWebsite(getActionWeblog());
            }
           
            // flush results to db
            WebloggerFactory.getWeblogger().flush();
           
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);
            TestUtils.endSession(true);
            weblog = null;
            weblog = mgr.getWebsiteByHandle(testWeblog1.getHandle());
            assertNull(weblog);
           
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(TestUtils.getManagedUser(testUser), Boolean.TRUE, Boolean.TRUE, null, null, 1, 1);
            assertEquals(1, weblogs12.size());
           
            // make sure disabled weblogs are not returned
            weblog.setEnabled(Boolean.FALSE);
            mgr.saveWebsite(weblog);
            TestUtils.endSession(true);
            List weblogs2 = mgr.getWebsites(TestUtils.getManagedUser(testUser), Boolean.TRUE, Boolean.TRUE, null, null, 0, -1);
            assertEquals(1, weblogs2.size());
            weblog = (Weblog) weblogs2.get(0);
            assertNotNull(weblog);
View Full Code Here

            weblog = (Weblog) 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(TestUtils.getManagedUser(testUser), Boolean.TRUE, Boolean.TRUE, null, null, 0, -1);
            assertEquals(0, weblogs3.size());
           
        } catch(Throwable t) {
View Full Code Here

            if(!weblog.isShowAllLangs() && !weblog.isEnableMultiLang()) {
                weblog.setEnableMultiLang(true);
            }
           
            // save config
            umgr.saveWebsite(weblog);
           
            // ROL-1050: apply comment defaults to existing entries
            if(getBean().getApplyCommentDefaults()) {
                wmgr.applyCommentDefaultsToEntries(weblog);
            }
View Full Code Here

       
        UserManager umgr = WebloggerFactory.getWeblogger().getUserManager();
        testWeblog = TestUtils.getManagedWebsite(testWeblog);
        origWords = testWeblog.getBlacklist();
        testWeblog.setBlacklist("test");
        umgr.saveWebsite(testWeblog);
        TestUtils.endSession(true);
       
        testWeblog = TestUtils.getManagedWebsite(testWeblog);
        rmgr.applyRefererFilters(testWeblog);
        TestUtils.endSession(true);
View Full Code Here

            // always update this weblog's theme and customStylesheet, then save
            website.setEditorTheme(WeblogTheme.CUSTOM);
            if(theme.getStylesheet() != null) {
                website.setCustomStylesheetPath(theme.getStylesheet().getLink());
            }
            userMgr.saveWebsite(website);
           
           
            // now lets import all the theme resources
            FileManager fileMgr = roller.getFileManager();
           
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.