Package com.sun.syndication.aqueduct.prevayler

Examples of com.sun.syndication.aqueduct.prevayler.SyndFeedSystem


     *          or null if the key or feed is null;
     *
     */
    public Object executeAndQuery(Object prevalentSystem, Date executionTime)
    {
        SyndFeedSystem system = (SyndFeedSystem) prevalentSystem;
        system.updateFeed(uuid, syndFeed);
        return uuid;
    }
View Full Code Here


     * @return  the uuid if the key is new and the feed is inserted,
     *          or null if the uuid already exists as a key.
     */
    public Object executeAndQuery(Object prevalentSystem, Date executionTime)
    {
        SyndFeedSystem system = (SyndFeedSystem) prevalentSystem;
        return system.insertFeed(uuid, syndFeed);
    }
View Full Code Here

     * @param executionTime     The transation time.
     * @return An Integer indicating the number of newly-inserted SyndFeeds.
     */
    public Object executeAndQuery(Object prevalentSystem, Date executionTime)
    {
        SyndFeedSystem system = (SyndFeedSystem) prevalentSystem;
        return new Integer(system.insertFeeds(syndFeeds));
    }
View Full Code Here

     *         also indicate that the map previously associated <tt>null</tt>
     *         with the specified uuid.
     */
    public Object executeAndQuery(Object prevalentSystem, Date executionTime)
    {
        SyndFeedSystem system = (SyndFeedSystem) prevalentSystem;
        return system.removeFeed(uuid);
    }
View Full Code Here

     * @param prevalentSystem   The SyndFeedSystem
     * @param executionTime     The transation time
     */
    public void executeOn(Object prevalentSystem, Date executionTime)
    {
        SyndFeedSystem system = (SyndFeedSystem) prevalentSystem;
        system.reset();
    }
View Full Code Here

     * @param executionTime     The date when the Query is executed
     * @return a Collection of matching SyndFeeds, if any.
     */
    public Object query(Object prevalentSystem, Date executionTime)
    {
        SyndFeedSystem system = (SyndFeedSystem) prevalentSystem;
        return new Integer(system.size());
    }
View Full Code Here

     * @param executionTime     The date when the Query is executed
     * @return a Collection of matching SyndFeeds, if any.
     */
    public Object query(Object prevalentSystem, Date executionTime)
    {
        SyndFeedSystem system = (SyndFeedSystem) prevalentSystem;
        return queryContents(system.getFeeds());
    }
View Full Code Here

     * Test the transaction on a non-prevalent system.
     */
    public void testExecuteOn()
    {
        // Setup variables
        SyndFeedSystem system = new SyndFeedSystem();
        system.insertFeed("one", new SyndFeedImpl());
        system.insertFeed("two", new SyndFeedImpl());
        system.insertFeed("three", new SyndFeedImpl());
        deleteSyndFeeds = new DeleteSyndFeeds();

        // Positive test
        deleteSyndFeeds.executeOn(system, new Date());
        assertTrue("All feeds must be deleted", system.isEmpty());
    }
View Full Code Here

     * Test the query on a non-prevalent system.
     */
    public void testQuery()
    {
        // Setup variables
        SyndFeedSystem system = new SyndFeedSystem();
        String uuid = "uuid-test-0000-0001";
        String uuid2 = "uuid-test-0000-0002";
        SyndFeed syndFeed = new SyndFeedImpl();
        system.insertFeed(uuid, syndFeed);
        querySyndFeed = new QuerySyndFeed(uuid);

        // Positive test
        SyndFeed result = (SyndFeed) querySyndFeed.query(system, new Date());
        assertSame("SyndFeed must be found by query.", syndFeed, result);
View Full Code Here

        String uuid = "uuid-test-0000-0001";
        testMap.put(uuid, testFeed1);
        insertSyndFeeds = new InsertSyndFeeds(testMap);

        // Positive test with non-prevalent system
        SyndFeedSystem system = new SyndFeedSystem();
        Integer result = (Integer) insertSyndFeeds.executeAndQuery(system, new Date());
        assertEquals("All feeds must be inserted", testMap.size(), result.intValue());
    }
View Full Code Here

TOP

Related Classes of com.sun.syndication.aqueduct.prevayler.SyndFeedSystem

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.