Package org.apache.roller.weblogger.business

Examples of org.apache.roller.weblogger.business.PropertiesManager


       
        testWeblog = TestUtils.getManagedWebsite(testWeblog);
        List refs = rmgr.getReferers(testWeblog);
        assertEquals(count, refs.size());
       
        PropertiesManager pmgr = WebloggerFactory.getWeblogger().getPropertiesManager();
        RuntimeConfigProperty 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);
       
        testWeblog = TestUtils.getManagedWebsite(testWeblog);
        refs = rmgr.getReferers(testWeblog);
        assertEquals(0, refs.size());
       
        spamprop = pmgr.getProperty("spam.blacklist");
        spamprop.setValue(origWords);
        pmgr.saveProperty(spamprop);
        TestUtils.endSession(true);
    }
View Full Code Here


     */
    @Override
    public void myPrepare() {
        try {
            // just grab our properties map and make it available to the action
            PropertiesManager mgr = WebloggerFactory.getWeblogger().getPropertiesManager();
            setProperties(mgr.getProperties());
        } catch (WebloggerException ex) {
            log.error("Error getting runtime properties map", ex);
            // TODO: i18n
            addError("Unexpected error accessing Roller properties");
        }
       
        try {
            WeblogManager mgr =  WebloggerFactory.getWeblogger().getWeblogManager();
            setWeblogs(mgr.getWeblogs(true, null, null, null, 0, -1));
        } catch (WebloggerException ex) {
            log.error("Error getting weblogs", ex);
            addError("frontpageConfig.weblogs.error");
        }

View Full Code Here

    public static String getProperty(String name) {
       
        String value = null;
       
        try {
            PropertiesManager pmgr = WebloggerFactory.getWeblogger().getPropertiesManager();
            RuntimeConfigProperty prop = pmgr.getProperty(name);
            if(prop != null) {
                value = prop.getValue();
            }
        } catch(Exception e) {
            log.warn("Trouble accessing property: "+name, e);
View Full Code Here

TOP

Related Classes of org.apache.roller.weblogger.business.PropertiesManager

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.