01: /**
02: * $Id: FeedBean.java,v 1.2 2006/04/17 20:08:41 jtb Exp $
03: * Copyright 2003 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.portal.rssportlet;
14:
15: import com.sun.syndication.feed.synd.SyndFeed;
16: import java.util.List;
17:
18: /**
19: * This class is a bean to hold feed-related data for RSS portlet.
20: *
21: * This bean is prepared (populated) by an <code>FeedHandler</class>
22: * object, when it is set into the handler.
23: *
24: */
25: public class FeedBean {
26: private List feedEntries = null;
27: private String feedDescription = null;
28: private SyndFeed feed = null;
29:
30: /**
31: * Get the size of the feed entries.
32: *
33: * As opposed to calling <code>getFeedEntries().size()</code>, this is provided
34: * for bean access within the display logic, as the Java
35: * <code>Collection.size()</code> method is not bean-conforming.
36: *
37: * This method simply returns <code>getFeedEntries().size()</code>.
38: */
39: public int getFeedEntriesSize() {
40: return getFeedEntries().size();
41: }
42:
43: /**
44: *
45: * Get the feed entries.
46: * @return a List of ROME SyndFeed objects.
47: */
48: public List getFeedEntries() {
49: return feedEntries;
50: }
51:
52: /**
53: * Set the feed entries.
54: * @param feedEntries a List of ROME SyndFeed objects.
55: */
56: public void setFeedEntries(List feedEntries) {
57: this .feedEntries = feedEntries;
58: }
59:
60: /**
61: * Get the feed description.
62: */
63: public String getFeedDescription() {
64: return feedDescription;
65: }
66:
67: /**
68: * Set the feed description
69: */
70: public void setFeedDescription(String feedDescription) {
71: this .feedDescription = feedDescription;
72: }
73:
74: /**
75: * Get the ROME SyndFeed object.
76: */
77: public SyndFeed getFeed() {
78: return feed;
79: }
80:
81: /**
82: * Set the ROME SyndFeed object.
83: */
84: public void setFeed(SyndFeed feed) {
85: this.feed = feed;
86: }
87: }
|