View Javadoc

1   /*
2    * Copyright 2004 Sun Microsystems, Inc.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   *
16   */
17  package com.sun.syndication.feed.synd;
18  
19  import com.sun.syndication.common.ToString;
20  
21  import java.util.Date;
22  import java.util.List;
23  
24  /***
25   * Bean interface for entries of SyndFeed feeds.
26   * <p>
27   * @author Alejandro Abdelnur
28   *
29   */
30  public interface SyndEntryI extends ToString,Cloneable {
31      /***
32       * Returns the entry title.
33       * <p>
34       * @return the entry title, <b>null</b> if none.
35       *
36       */
37      String getTitle();
38  
39      /***
40       * Sets the entry title.
41       * <p>
42       * @param title the entry title to set, <b>null</b> if none.
43       *
44       */
45      void setTitle(String title);
46  
47      /***
48       * Returns the entry link.
49       * <p>
50       * @return the entry link, <b>null</b> if none.
51       *
52       */
53      String getLink();
54  
55      /***
56       * Sets the entry link.
57       * <p>
58       * @param link the entry link to set, <b>null</b> if none.
59       *
60       */
61      void setLink(String link);
62  
63      /***
64       * Returns the entry description.
65       * <p>
66       * @return the entry description, <b>null</b> if none.
67       *
68       */
69      SyndContentI getDescription();
70  
71      /***
72       * Sets the entry description.
73       * <p>
74       * @param description the entry description to set, <b>null</b> if none.
75       *
76       */
77      void setDescription(SyndContentI description);
78  
79      /***
80       * Returns the entry contents.
81       * <p>
82       * @return a list of SyndContent elements with the entry contents,
83       *         an empty list if none.
84       *
85       */
86      List getContents();
87  
88      /***
89       * Sets the entry contents.
90       * <p>
91       * @param contents the list of SyndContent elements with the entry contents to set,
92       *        an empty list or <b>null</b> if none.
93       *
94       */
95      void setContents(List contents);
96  
97      /***
98       * Returns the entry published date.
99       * <p>
100      * This method is a convenience method, it maps to the Dublin Core module date.
101      * <p>
102      * @return the entry published date, <b>null</b> if none.
103      *
104      */
105     Date getPublishedDate();
106 
107     /***
108      * Sets the entry published date.
109      * <p>
110      * This method is a convenience method, it maps to the Dublin Core module date.
111      * <p>
112      * @param publishedDate the entry published date to set, <b>null</b> if none.
113      *
114      */
115     void setPublishedDate(Date publishedDate);
116 
117     /***
118      * Returns the entry author.
119      * <p>
120      * This method is a convenience method, it maps to the Dublin Core module creator.
121      * <p>
122      * @return the entry author, <b>null</b> if none.
123      *
124      */
125     String getAuthor();
126 
127     /***
128      * Sets the entry author.
129      * <p>
130      * This method is a convenience method, it maps to the Dublin Core module creator.
131      * <p>
132      * @param author the entry author to set, <b>null</b> if none.
133      *
134      */
135     void setAuthor(String author);
136 
137     /***
138      * Returns the entry categories.
139      * <p>
140      * This method is a convenience method, it maps to the Dublin Core module subjects.
141      * <p>
142      * @return a list of SyndCategory elements with the entry categories,
143      *         an empty list if none.
144      *
145      */
146     List getCategories();
147 
148     /***
149      * Sets the entry categories.
150      * <p>
151      * This method is a convenience method, it maps to the Dublin Core module subjects.
152      * <p>
153      * @param categories the list of SyndCategory elements with the entry categories to set,
154      *        an empty list or <b>null</b> if none.
155      *
156      */
157     void setCategories(List categories);
158 
159     /***
160      * Returns the entry modules.
161      * <p>
162      * @return a list of Module elements with the entry modules,
163      *         an empty list if none.
164      *
165      */
166     List getModules();
167 
168     /***
169      * Sets the entry modules.
170      * <p>
171      * @param modules the list of Module elements with the entry modules to set,
172      *        an empty list or <b>null</b> if none.
173      *
174      */
175     void setModules(List modules);
176 
177     /***
178      * Creates a deep clone of the object.
179      * <p>
180      * @return a clone of the object.
181      * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
182      *
183      */
184     public Object clone() throws CloneNotSupportedException;
185 
186 }