Package org.apache.roller.business

Examples of org.apache.roller.business.PropertiesManager.saveProperty()


        prop = mgr.getProperty("site.name");
        assertNotNull(prop);
       
        // update a property
        prop.setValue("testtest");
        mgr.saveProperty(prop);
        TestUtils.endSession(true);
       
        // make sure property was updated
        prop = null;
        prop = mgr.getProperty("site.name");
View Full Code Here


       
        PropertiesManager pmgr = RollerFactory.getRoller().getPropertiesManager();
        RollerPropertyData spamprop = pmgr.getProperty("spam.blacklist");
        String origWords = spamprop.getValue();
        spamprop.setValue(spamprop.getValue() + ", test");
        pmgr.saveProperty(spamprop);
        TestUtils.endSession(true);
       
        rmgr.applyRefererFilters();
        TestUtils.endSession(true);
       
View Full Code Here

        refs = rmgr.getReferers(testWeblog);
        assertEquals(0, refs.size());
       
        spamprop = pmgr.getProperty("spam.blacklist");
        spamprop.setValue(origWords);
        pmgr.saveProperty(spamprop);
        TestUtils.endSession(true);
    }
   
   
    public void testApplyRefererFiltersWebsite() throws Exception {
View Full Code Here

            // add "spamtest" to refererSpamWords
            PropertiesManager pmgr = RollerFactory.getRoller().getPropertiesManager();
            RollerPropertyData spamprop = pmgr.getProperty("spam.blacklist");
            this.origSpamWords = spamprop.getValue();
            spamprop.setValue(spamprop.getValue() + ", spamtest");
            pmgr.saveProperty(spamprop);
           
            // add a number of referers to play with
            RefererManager rmgr = RollerFactory.getRoller().getRefererManager();
            Calendar lCalendar = Calendar.getInstance();
            lCalendar.setTime(new Date());
View Full Code Here

        try {
            // reset refererSpamWords to original value
            PropertiesManager pmgr = RollerFactory.getRoller().getPropertiesManager();
            RollerPropertyData spamprop = pmgr.getProperty("spam.blacklist");
            spamprop.setValue(this.origSpamWords);
            pmgr.saveProperty(spamprop);
           
            TestUtils.teardownWeblog(testWeblog.getId());
            TestUtils.teardownWeblog(testWeblog2.getId());
            TestUtils.teardownUser(testUser.getId());
           
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.