Package org.apache.roller.business

Examples of org.apache.roller.business.WeblogManager.saveWeblogEntry()


        mgr.saveWeblogEntry(entry);
        TestUtils.endSession(true);

        entry = mgr.getWeblogEntry(id);
        entry.addTag("testTag2");
        mgr.saveWeblogEntry(entry);
        TestUtils.endSession(true);

        entry = mgr.getWeblogEntry(id);
        assertEquals(3, entry.getTags().size());
View Full Code Here


        // setup some test entries to use
        WeblogEntryData entry = TestUtils.setupWeblogEntry("entry1", testWeblog
                .getDefaultCategory(), testWeblog, testUser);
        entry.addTag("testTag");
        String id = entry.getId();
        mgr.saveWeblogEntry(entry);
        TestUtils.endSession(true);

        entry = mgr.getWeblogEntry(id);
        entry.addTag("testTag");
        mgr.saveWeblogEntry(entry);
View Full Code Here

        mgr.saveWeblogEntry(entry);
        TestUtils.endSession(true);

        entry = mgr.getWeblogEntry(id);
        entry.addTag("testTag");
        mgr.saveWeblogEntry(entry);
        TestUtils.endSession(true);

        entry = mgr.getWeblogEntry(id);
        assertEquals(1, entry.getTags().size());
View Full Code Here

        WeblogEntryData entry = TestUtils.setupWeblogEntry("entry1", testWeblog
                .getDefaultCategory(), testWeblog, testUser);
        entry.addTag("testTag");
        entry.addTag("testTag2");
        String id = entry.getId();
        mgr.saveWeblogEntry(entry);
        TestUtils.endSession(true);

        entry = mgr.getWeblogEntry(id);
        assertEquals(2, entry.getTags().size());
        TestUtils.endSession(true);
View Full Code Here

        TestUtils.endSession(true);

        entry = mgr.getWeblogEntry(id);
        entry.removeTag("testtag");
        entry.removeTag("testtag2");
        mgr.saveWeblogEntry(entry);
        TestUtils.endSession(true);

        entry = mgr.getWeblogEntry(id);
        assertEquals(0, entry.getTags().size());
        TestUtils.endSession(true);
View Full Code Here

        WeblogEntryData entry = TestUtils.setupWeblogEntry("tagsExistEntry1", testWeblog
                .getDefaultCategory(), testWeblog, testUser);
        String id1 = entry.getId();
        entry.addTag("blahTag");
        entry.addTag("fooTag");
        mgr.saveWeblogEntry(entry);

        WeblogEntryData entry2 = TestUtils.setupWeblogEntry("tagsExistEntry2", weblog
                .getDefaultCategory(), weblog, testUser);
        String id2 = entry2.getId();
        entry2.addTag("aaaTag");
View Full Code Here

        WeblogEntryData entry2 = TestUtils.setupWeblogEntry("tagsExistEntry2", weblog
                .getDefaultCategory(), weblog, testUser);
        String id2 = entry2.getId();
        entry2.addTag("aaaTag");
        entry2.addTag("bbbTag");
        mgr.saveWeblogEntry(entry2);
        TestUtils.endSession(true);
       
        // we'll need these
        List tags1 = new ArrayList();
        tags1.add("nonExistTag");
View Full Code Here

        // setup some test entries to use
        WeblogEntryData entry = TestUtils.setupWeblogEntry("entry1", testWeblog
                .getDefaultCategory(), testWeblog, testUser);
        entry.addTag("testTag");
        String id = entry.getId();
        mgr.saveWeblogEntry(entry);
        TestUtils.endSession(true);

        List results = mgr.getWeblogEntries(testWeblog, null, null, null, null,
                Arrays.asList(new String[] { "testtag" }), null, null, null, 0,
                -1);
View Full Code Here

        // setup some test entries to use
        WeblogEntryData entry = TestUtils.setupWeblogEntry("entry1", testWeblog
                .getDefaultCategory(), testWeblog, testUser);
        entry.addTag("testTag");
        String id = entry.getId();
        mgr.saveWeblogEntry(entry);
        TestUtils.endSession(true);

        List results = mgr.getWeblogEntries(testWeblog, null, null, null, null,
                Arrays.asList(new String[] { "testtag" }), null, null, null, 0,
                -1);
View Full Code Here

            if (canEdit(website)) {
                // Save it and commit it
                WeblogManager mgr = mRoller.getWeblogManager();
                WeblogEntryData rollerEntry = createRollerEntry(website, entry);
                rollerEntry.setCreator(this.user);
                mgr.saveWeblogEntry(rollerEntry);
                mRoller.flush();

                // Throttle one entry per second
                // (MySQL timestamp has 1 sec resolution, damnit)
                try { Thread.sleep(1000); } catch (Exception ignored) {}
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.