Package org.apache.roller.business

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


        // update multiple properties
        prop = (RollerPropertyData) props.get("site.name");
        prop.setValue("foofoo");
        prop = (RollerPropertyData) props.get("site.description");
        prop.setValue("blahblah");
        mgr.saveProperties(props);
        TestUtils.endSession(true);
       
        // make sure all properties were updated
        props = mgr.getProperties();
        assertNotNull(props);
View Full Code Here


        PropertiesManager pmgr = RollerFactory.getRoller().getPropertiesManager();
        Map config = pmgr.getProperties();
        ((RollerPropertyData)config.get("uploads.enabled")).setValue("true");
        ((RollerPropertyData)config.get("uploads.types.allowed")).setValue("opml");
        ((RollerPropertyData)config.get("uploads.dir.maxsize")).setValue("1.00");
        pmgr.saveProperties(config);
        TestUtils.endSession(true);
       
        /* NOTE: upload dir for unit tests is set in
               roller/testdata/roller-custom.properties */
        FileManager fmgr = RollerFactory.getRoller().getFileManager();
View Full Code Here

        PropertiesManager pmgr = RollerFactory.getRoller().getPropertiesManager();
        Map config = pmgr.getProperties();
        ((RollerPropertyData)config.get("uploads.enabled")).setValue("true");
        ((RollerPropertyData)config.get("uploads.types.allowed")).setValue("opml");
        ((RollerPropertyData)config.get("uploads.dir.maxsize")).setValue("1.00");
        pmgr.saveProperties(config);
        TestUtils.endSession(true);
       
        FileManager fmgr = RollerFactory.getRoller().getFileManager();
       
        // we should be starting with 0 directories
View Full Code Here

        PropertiesManager pmgr = RollerFactory.getRoller().getPropertiesManager();
        Map config = pmgr.getProperties();
        ((RollerPropertyData)config.get("uploads.enabled")).setValue("true");
        ((RollerPropertyData)config.get("uploads.types.allowed")).setValue("opml");
        ((RollerPropertyData)config.get("uploads.dir.maxsize")).setValue("1.00");
        pmgr.saveProperties(config);
        TestUtils.endSession(true);
       
        FileManager fmgr = RollerFactory.getRoller().getFileManager();
       
        // we should be starting with 0 files and 0 directories
View Full Code Here

        Map config = config = pmgr.getProperties();
        ((RollerPropertyData)config.get("uploads.dir.maxsize")).setValue("1.00");
        ((RollerPropertyData)config.get("uploads.types.forbid")).setValue("");
        ((RollerPropertyData)config.get("uploads.types.allowed")).setValue("");
        ((RollerPropertyData)config.get("uploads.enabled")).setValue("true");
        pmgr.saveProperties(config);
        TestUtils.endSession(true);
       
        Exception exception = null;
        InputStream is = null;
       
View Full Code Here

        assertNotNull(exception);
        exception = null;
       
        config = pmgr.getProperties();
        ((RollerPropertyData)config.get("uploads.dir.maxsize")).setValue("1.00");
        pmgr.saveProperties(config);
        TestUtils.endSession(true);
       
        try {
            // quota check should fail
            fmgr.saveFile(testWeblog, "test.gif", "text/plain", 2500000, is);
View Full Code Here

        exception = null;
       
       
        config = pmgr.getProperties();
        ((RollerPropertyData)config.get("uploads.types.forbid")).setValue("gif");
        pmgr.saveProperties(config);
        TestUtils.endSession(true);
       
        try {
            // forbidden types check should fail
            fmgr.saveFile(testWeblog, "test.gif", "text/plain", 10, is);
View Full Code Here

        exception = null;
       
       
        config = pmgr.getProperties();
        ((RollerPropertyData)config.get("uploads.enabled")).setValue("false");
        pmgr.saveProperties(config);
        TestUtils.endSession(true);
       
        try {
            // uploads disabled should fail
            fmgr.saveFile(testWeblog, "test.gif", "text/plain", 10, is);
View Full Code Here

                        updProp.setValue(incomingProp.trim());
                    }
                }
               
                // save it
                propsManager.saveProperties(props);
                RollerFactory.getRoller().flush();
               
                // this operation causes OutOfMemory exceptions on sites with
                // lots of referers so i am disabling it until it's
                // not as dangerous -- Allen G
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.