Package com.jalios.util
Class RssItem
java.lang.Object
com.jalios.util.RssItem
This class implements a RSS Channel's item parser/container.
- Author:
- Olivier Dedieu
-
Constructor Summary
ConstructorsConstructorDescriptionRssItem()Creates a new RssItem.RssItem(com.sun.syndication.feed.synd.SyndEntry entry) Create a new RssItem and fill this object with the data containing the SyndEntryRssItem(org.jdom.Element element) Create a new RssItem and fill this object with the data containing the DOM element -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Get the value of description.intThis method is deprecated.Deprecated.the type must be retrieved fromgetEnclosures()list insteadDeprecated.the URL must be retrieved fromgetEnclosures()list insteadgetGuid()getLink()Get the value of link.Deprecated.usegetPublicationDate()insteadDeprecated.usegetPublicationDate()instead and reformat the dategetTitle()Get the value of title.voidvoidsetCategories(List<String> categories) voidsetCategory(String category) Deprecated.usegetCategories()insteadvoidsetComments(String comments) voidSet the value of description.voidsetEnclosureLength(int enclosureLength) Deprecated.setEnclosures(List)must be used insteadvoidsetEnclosures(List<Enclosure> enclosures) voidsetEnclosureType(String enclosureType) Deprecated.setEnclosures(List)must be used insteadvoidsetEnclosureURL(String enclosureURL) Deprecated.setEnclosures(List)must be used insteadvoidvoidSet the value of link.voidsetPubDate(String v) Deprecated.usesetPublicationDate(Date)insteadvoidsetPublicationDate(Date publicationDate) voidvoidSet the value of title.
-
Constructor Details
-
RssItem
public RssItem()Creates a new RssItem. -
RssItem
public RssItem(com.sun.syndication.feed.synd.SyndEntry entry) Create a new RssItem and fill this object with the data containing the SyndEntry- Parameters:
entry- theSyndEntryto parse
-
RssItem
public RssItem(org.jdom.Element element) Create a new RssItem and fill this object with the data containing the DOM element- Parameters:
element- the DOM element to parse
-
-
Method Details
-
getTitle
Get the value of title.- Returns:
- Value of title.
-
setTitle
Set the value of title.- Parameters:
v- Value to assign to title.
-
getLink
Get the value of link.- Returns:
- Value of link.
-
setLink
Set the value of link.- Parameters:
v- Value to assign to link.
-
getDescription
Get the value of description.- Returns:
- Value of description.
-
setDescription
Set the value of description.- Parameters:
v- Value to assign to description.
-
getAuthor
- Returns:
- Returns the author.
-
setAuthor
- Parameters:
author- The author to set.
-
getCategory
Deprecated.usegetCategories()insteadThis method is deprecated. GetCategories must be used instead. The first element of getCategories list will be returned.- Returns:
- Returns the category.
-
setCategory
Deprecated.usegetCategories()insteadThis method is deprecated. this method add a category to categories list.- Parameters:
category- The category to set.
-
getCategories
- Returns:
- the categories
-
setCategories
- Parameters:
categories- the categories to set
-
getComments
- Returns:
- Returns the comments.
-
setComments
- Parameters:
comments- The comments to set.
-
getEnclosures
- Returns:
- the enclosures
-
setEnclosures
- Parameters:
enclosures- the enclosures to set
-
getEnclosureLength
public int getEnclosureLength()This method is deprecated. The first enclosure is used for this method.- Returns:
- Returns the enclosureLength.
-
setEnclosureLength
Deprecated.setEnclosures(List)must be used insteadThis method is deprecated. this method do nothing- Parameters:
enclosureLength- The enclosureLength to set.
-
getEnclosureType
Deprecated.the type must be retrieved fromgetEnclosures()list insteadThis method is deprecated. The first enclosure is used for this method.- Returns:
- Returns the enclosureType.
-
setEnclosureType
Deprecated.setEnclosures(List)must be used insteadThis method is deprecated. this method do nothing- Parameters:
enclosureType- The enclosureType to set.
-
getEnclosureURL
Deprecated.the URL must be retrieved fromgetEnclosures()list insteadThis method is deprecated. The first enclosure is used for this method.- Returns:
- Returns the enclosureURL.
-
setEnclosureURL
Deprecated.setEnclosures(List)must be used insteadThis method is deprecated. this method do nothing- Parameters:
enclosureURL- The enclosureURL to set.
-
getGuid
- Returns:
- Returns the guid.
-
setGuid
- Parameters:
guid- The guid to set.
-
getParsedPubDate
Deprecated.usegetPublicationDate()insteadRetrieve the pubDate as a Date object.- Returns:
- a Date or null if the pubDate could not be parsed.
- Since:
- jcms-6.1
-
getSource
- Returns:
- Returns the source.
-
setSource
- Parameters:
source- The source to set.
-
getPublicationDate
- Returns:
- the publicationDate
-
setPublicationDate
- Parameters:
publicationDate- the publicationDate to set
-
getPubDate
Deprecated.usegetPublicationDate()instead and reformat the dateGet the value of pubDate. This method is deprecated. getPublicationDate must be use instead This method returns date in ISO 8601 format- Returns:
- Value of pubDate.
-
setPubDate
Deprecated.usesetPublicationDate(Date)insteadSet the value of pubDate. This method is deprecated and setPublication(Date date) must be use instead- Parameters:
v- Value to assign to pubDate.
-
getCategories()instead