001: /*
002: * Copyright 2004 Sun Microsystems, Inc.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: *
016: */
017: package com.sun.syndication.feed.synd;
018:
019: import com.sun.syndication.feed.CopyFrom;
020: import com.sun.syndication.feed.module.Extendable;
021: import com.sun.syndication.feed.module.Module;
022:
023: import java.util.Date;
024: import java.util.List;
025:
026: /**
027: * Bean interface for entries of SyndFeedImpl feeds.
028: * <p>
029: * @author Alejandro Abdelnur
030: *
031: */
032: public interface SyndEntry extends Cloneable, CopyFrom, Extendable {
033:
034: /**
035: * Returns the entry URI.
036: * <p>
037: * How the entry URI maps to a concrete feed type (RSS or Atom) depends on
038: * the concrete feed type. This is explained in detail in Rome documentation,
039: * <a href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI mapping</a>.
040: * <p>
041: * The returned URI is a normalized URI as specified in RFC 2396bis.
042: * <p>
043: * @return the entry URI, <b>null</b> if none.
044: *
045: */
046: String getUri();
047:
048: /**
049: * Sets the entry URI.
050: * <p>
051: * How the entry URI maps to a concrete feed type (RSS or Atom) depends on
052: * the concrete feed type. This is explained in detail in Rome documentation,
053: * <a href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI mapping</a>.
054: * <p>
055: * @param uri the entry URI to set, <b>null</b> if none.
056: *
057: */
058: void setUri(String uri);
059:
060: /**
061: * Returns the entry title.
062: * <p>
063: * @return the entry title, <b>null</b> if none.
064: *
065: */
066: String getTitle();
067:
068: /**
069: * Sets the entry title.
070: * <p>
071: * @param title the entry title to set, <b>null</b> if none.
072: *
073: */
074: void setTitle(String title);
075:
076: /**
077: * Returns the entry title as a text construct.
078: * <p>
079: * @return the entry title, <b>null</b> if none.
080: *
081: */
082: SyndContent getTitleEx();
083:
084: /**
085: * Sets the entry title as a text construct.
086: * <p>
087: * @param title the entry title to set, <b>null</b> if none.
088: *
089: */
090: void setTitleEx(SyndContent title);
091:
092: /**
093: * Returns the entry link.
094: * <p>
095: * @return the entry link, <b>null</b> if none.
096: *
097: */
098: String getLink();
099:
100: /**
101: * Sets the entry link.
102: * <p>
103: * @param link the entry link to set, <b>null</b> if none.
104: *
105: */
106: void setLink(String link);
107:
108: /**
109: * Returns the entry links
110: * <p>
111: * @return the entry links, <b>null</b> if none.
112: *
113: */
114: List getLinks();
115:
116: /**
117: * Sets the entry links.
118: * <p>
119: * @param links the entry links to set, <b>null</b> if none.
120: *
121: */
122: void setLinks(List links);
123:
124: /**
125: * Returns the entry description.
126: * <p>
127: * @return the entry description, <b>null</b> if none.
128: *
129: */
130: SyndContent getDescription();
131:
132: /**
133: * Sets the entry description.
134: * <p>
135: * @param description the entry description to set, <b>null</b> if none.
136: *
137: */
138: void setDescription(SyndContent description);
139:
140: /**
141: * Returns the entry contents.
142: * <p>
143: * @return a list of SyndContentImpl elements with the entry contents,
144: * an empty list if none.
145: *
146: */
147: List getContents();
148:
149: /**
150: * Sets the entry contents.
151: * <p>
152: * @param contents the list of SyndContentImpl elements with the entry contents to set,
153: * an empty list or <b>null</b> if none.
154: *
155: */
156: void setContents(List contents);
157:
158: /**
159: * Returns the entry enclosures.
160: * <p>
161: * @return a list of SyndEnclosure elements with the entry enclosures,
162: * an empty list if none.
163: *
164: */
165: public List getEnclosures();
166:
167: /**
168: * Sets the entry enclosures.
169: * <p>
170: * @param enclosures the list of SyndEnclosure elements with the entry enclosures to set,
171: * an empty list or <b>null</b> if none.
172: *
173: */
174: public void setEnclosures(List enclosures);
175:
176: /**
177: * Returns the entry published date.
178: * <p>
179: * This method is a convenience method, it maps to the Dublin Core module date.
180: * <p>
181: * @return the entry published date, <b>null</b> if none.
182: *
183: */
184: Date getPublishedDate();
185:
186: /**
187: * Sets the entry published date.
188: * <p>
189: * This method is a convenience method, it maps to the Dublin Core module date.
190: * <p>
191: * @param publishedDate the entry published date to set, <b>null</b> if none.
192: *
193: */
194: void setPublishedDate(Date publishedDate);
195:
196: /**
197: * Returns the entry updated date.
198: * <p>
199: * @return the entry updated date, <b>null</b> if none.
200: *
201: */
202: Date getUpdatedDate();
203:
204: /**
205: * Sets the entry updated date.
206: * <p>
207: * @param publishedDate the entry updated date to set, <b>null</b> if none.
208: *
209: */
210: void setUpdatedDate(Date updatedDate);
211:
212: /**
213: * Returns the entry authors.
214: * <p>
215: * For Atom feeds, this returns the authors as a list of SyndPerson objects,
216: * for RSS feeds this method is a convenience method, it maps to the
217: * Dublin Core module creator.
218: * <p>
219: * @return the feed author, <b>null</b> if none.
220: *
221: */
222: List getAuthors();
223:
224: /**
225: * Sets the entry author.
226: * <p>
227: * For Atom feeds, this sets the authors as a list of SyndPerson
228: * objects, for RSS feeds this method is a convenience method, it maps
229: * to the Dublin Core module creator.
230: * <p>
231: * @param author the feed author to set, <b>null</b> if none.
232: *
233: */
234: void setAuthors(List authors);
235:
236: /**
237: * Returns the name of the first entry author in the collection of authors.
238: * <p>
239: * For Atom feeds, this returns the authors as a list of SyndPerson objects,
240: * for RSS feeds this method is a convenience method, it maps to the
241: * Dublin Core module creator.
242: * <p>
243: * @return the feed author, <b>null</b> if none.
244: *
245: */
246: String getAuthor();
247:
248: /**
249: * Sets the entry author.
250: * <p>
251: * For Atom feeds, this sets the feed author's name, for RSS feeds
252: * this method is a convenience method, it maps to the Dublin Core
253: * module creator.
254: * <p>
255: * @param author the feed author to set, <b>null</b> if none.
256: */
257: void setAuthor(String author);
258:
259: /**
260: * Returns the feed author.
261: * <p>
262: * For Atom feeds, this returns the contributors as a list of
263: * SyndPerson objects
264: * <p>
265: * @return the feed author, <b>null</b> if none.
266: *
267: */
268: List getContributors();
269:
270: /**
271: * Sets the feed author.
272: * <p>
273: * Returns contributors as a list of SyndPerson objects.
274: * <p>
275: * @param author the feed author to set, <b>null</b> if none.
276: *
277: */
278: void setContributors(List contributors);
279:
280: /**
281: * Returns the entry categories.
282: * <p>
283: * This method is a convenience method, it maps to the Dublin Core module subjects.
284: * <p>
285: * @return a list of SyndCategoryImpl elements with the entry categories,
286: * an empty list if none.
287: *
288: */
289: List getCategories();
290:
291: /**
292: * Sets the entry categories.
293: * <p>
294: * This method is a convenience method, it maps to the Dublin Core module subjects.
295: * <p>
296: * @param categories the list of SyndCategoryImpl elements with the entry categories to set,
297: * an empty list or <b>null</b> if none.
298: *
299: */
300: void setCategories(List categories);
301:
302: /**
303: * Returns the module identified by a given URI.
304: * <p>
305: * @param uri the URI of the ModuleImpl.
306: * @return The module with the given URI, <b>null</b> if none.
307: */
308: public Module getModule(String uri);
309:
310: /**
311: * Returns the entry modules.
312: * <p>
313: * @return a list of ModuleImpl elements with the entry modules,
314: * an empty list if none.
315: *
316: */
317: List getModules();
318:
319: /**
320: * Sets the entry modules.
321: * <p>
322: * @param modules the list of ModuleImpl elements with the entry modules to set,
323: * an empty list or <b>null</b> if none.
324: *
325: */
326: void setModules(List modules);
327:
328: /**
329: * Returns foreign markup found at channel level.
330: * <p>
331: * @return Opaque object to discourage use
332: *
333: */
334: public Object getForeignMarkup();
335:
336: /**
337: * Sets foreign markup found at channel level.
338: * <p>
339: * @param foreignMarkup Opaque object to discourage use
340: *
341: */
342: public void setForeignMarkup(Object foreignMarkup);
343:
344: /**
345: * Creates a deep clone of the object.
346: * <p>
347: * @return a clone of the object.
348: * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
349: *
350: */
351: public Object clone() throws CloneNotSupportedException;
352:
353: }
|