Examples of StandardGuide


Examples of com.salas.bb.domain.StandardGuide

    {
        this.mergeGuides = guides;
        guideBox.removeAllItems();
        for (int i = 0; i < guides.length; i++)
        {
            final StandardGuide guide = guides[i];
            guideBox.addItem(guide.getTitle());
        }
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

        throws SQLException
    {
        if (list == null) throw new NullPointerException(MSG_UNSPECIFIED);
        if (list.getID() != -1) throw new IllegalStateException(MSG_ALREADY_IN_DB);

        StandardGuide guide = list.getParentGuide();
        if (guide == null) throw new IllegalStateException(MSG_NO_GUIDE_ASSIGNED);
        if (guide.getID() == -1) throw new IllegalStateException(MSG_GUIDE_TRANSIENT);

        PreparedStatement stmt = context.getPreparedStatement(
            "INSERT INTO READINGLISTS (GUIDEID, TITLE, URL, LASTPOLLTIME, LASTUPDATESERVERTIME," +
                "LASTSYNCTIME)" +
            " VALUES (?, ?, ?, ?, ?, ?)");

        try
        {
            stmt.setLong(1, guide.getID());
            stmt.setString(2, list.getTitle());
            stmt.setString(3, list.getURL().toString());
            stmt.setLong(4, list.getLastPollTime());
            stmt.setLong(5, list.getLastUpdateServerTime());
            stmt.setLong(6, list.getLastSyncTime());
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

     *
     * @param aList list to associate.
     */
    public ReadingListCheckBox(ReadingList aList)
    {
        StandardGuide guide = aList.getParentGuide();
        String label = aList.getTitle();
        if (guide != null) label += " (" + guide.getTitle() + ")";
        setText(label);

        list = aList;
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

            Strings.message("readinglist.updates.wording"));

        builder.append(wording, 5);
        builder.appendUnrelatedComponentsGapRow(2);

        StandardGuide guide = list.getParentGuide();
        if (guide != null)
        {
            builder.append(Strings.message("readinglist.updates.guide"), new JLabel(guide.getTitle()), 3);
        }
        builder.append(Strings.message("readinglist.updates.readinglist"), new JLabel(list.getTitle()), 3);
        builder.appendUnrelatedComponentsGapRow(2);

        if (addFeeds.size() > 0)
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

     * @throws MalformedURLException never.
     */
    public void testConvertRL()
        throws MalformedURLException
    {
        StandardGuide guide = new StandardGuide();
        ReadingList list = new ReadingList(new URL("file://test"));
        guide.add(list);
        DirectFeed feedDyn = new DirectFeed();
        feedDyn.setBaseTitle("dyn");
        feedDyn.setXmlURL(new URL("file://dyn"));
        list.add(feedDyn);

        DirectFeed feedStat = new DirectFeed();
        feedStat.setBaseTitle("stat");
        feedStat.setXmlURL(new URL("file://stat"));
        guide.add(feedStat);

        // Checking
        OPMLGuide opmlGuide = Converter.convertToOPML(guide);
        OPMLReadingList[] lists = opmlGuide.getReadingLists();
        assertEquals(1, lists.length);
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

    /**
     * Checks converting publication properties.
     */
    public void testConvertingPublishingProperties()
    {
        StandardGuide guide = new StandardGuide();
        guide.setPublishingEnabled(true);
        guide.setPublishingPublic(true);
        guide.setPublishingTags("a b c");
        guide.setPublishingTitle("abc");
        guide.setPublishingRating(2);

        // Checking
        OPMLGuide opmlGuide = Converter.convertToOPML(guide);
        assertEquals(guide.isPublishingEnabled(), opmlGuide.isPublishingEnabled());
        assertEquals(guide.isPublishingPublic(), opmlGuide.isPublishingPublic());
        assertEquals(guide.getPublishingTags(), opmlGuide.getPublishingTags());
        assertEquals(guide.getPublishingTitle(), opmlGuide.getPublishingTitle());
        assertEquals(guide.getPublishingRating(), opmlGuide.getPublishingRating());
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

        OPMLGuide opmlGuide = new OPMLGuide("Guide", "", false, null, null, false, 0, false, false, false);
        opmlGuide.add(opmlRL);

        // Checking
        StandardGuide guide = (StandardGuide)Helper.createGuide(null, opmlGuide, new Date());
        assertEquals(1, guide.getReadingLists().length);
        assertEquals(1, guide.getFeedsCount());

        ReadingList list = guide.getReadingLists()[0];
        assertEquals(1, list.getFeeds().length);
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

    public void testCreateGuideWithPublicationProperties()
    {
        OPMLGuide opmlGuide = new OPMLGuide("Guide", "", true, "title", "tags", true, 2, false, false, true);

        // Checking
        StandardGuide guide = (StandardGuide)Helper.createGuide(null, opmlGuide, new Date());
        assertEquals(opmlGuide.isPublishingEnabled(), guide.isPublishingEnabled());
        assertEquals(opmlGuide.isPublishingPublic(), guide.isPublishingPublic());
        assertEquals(opmlGuide.getPublishingTitle(), guide.getPublishingTitle());
        assertEquals(opmlGuide.getPublishingTags(), guide.getPublishingTags());
        assertEquals(opmlGuide.getPublishingRating(), guide.getPublishingRating());
        assertEquals(opmlGuide.isMobile(), guide.isMobile());
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

     *
     * @return guide.
     */
    private static IGuide guide(String title)
    {
        StandardGuide guide = new StandardGuide();
        guide.setTitle(title);
        return guide;
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

    public void testCreateGuideWithNotificationProperties()
    {
        OPMLGuide opmlGuide = new OPMLGuide("Guide", "", true, "title", "tags", true, 0, false, false, false);

        // Checking
        StandardGuide guide = (StandardGuide)Helper.createGuide(null, opmlGuide, new Date());
        assertEquals(opmlGuide.isNotificationsAllowed(), guide.isNotificationsAllowed());

        opmlGuide = new OPMLGuide("Guide", "", true, "title", "tags", true, 0, false, true, false);

        // Checking
        guide = (StandardGuide)Helper.createGuide(null, opmlGuide, new Date());
        assertEquals(opmlGuide.isNotificationsAllowed(), guide.isNotificationsAllowed());
    }
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.