org.exoplatform.forum.rss
Class RSS

java.lang.Object
  extended by org.exoplatform.forum.rss.RSS

public class RSS
extends Object

Created by The eXo Platform SARL Author : Ha Mai ha.mai@exoplatform.com Jan 12, 2009, 5:55:37 PM


Field Summary
protected static String CONTENT_PROPERTY
           
static String DEFAULT_FEED_LINK
           
static String PLAIN_TEXT
           
protected static String RSS_2_0
           
protected static String RSS_NODE_NAME
           
 
Constructor Summary
RSS(javax.jcr.Node node)
           
 
Method Summary
 com.sun.syndication.feed.synd.SyndFeed addEntry(com.sun.syndication.feed.synd.SyndEntry newEntry)
          Adds an entry to the feed
static com.sun.syndication.feed.synd.SyndEntry createNewEntry(String uri, String title, String link, List<String> listContent, com.sun.syndication.feed.synd.SyndContent description, Date pubDate, String author)
          Create new entry
static com.sun.syndication.feed.synd.SyndFeed createNewFeed(String title, Date pubDate)
          Create a new feed with some default content: link is the link to eXo web site and feed type is rss_2.0
 boolean feedExists()
           
 InputStream getContent()
           
 String getFileName()
           
 javax.jcr.Node getItemNode()
           
static String getRSSLink(String appType, String portalName, String objectId)
           
static String getUserRSSLink(String apptype, String userId)
           
 com.sun.syndication.feed.synd.SyndFeed read()
          Read a SyndFeed from the
 com.sun.syndication.feed.synd.SyndFeed removeEntry(String uri)
          Remove an item for the feed
 void saveFeed(com.sun.syndication.feed.synd.SyndFeed feed, String rssNodeType)
           
 void setContent(InputStream is)
           
 void setFileName(String fileName)
           
 void setItemNode(javax.jcr.Node itemNode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_PROPERTY

protected static final String CONTENT_PROPERTY

RSS_NODE_NAME

protected static final String RSS_NODE_NAME

RSS_2_0

protected static final String RSS_2_0

PLAIN_TEXT

public static final String PLAIN_TEXT

DEFAULT_FEED_LINK

public static final String DEFAULT_FEED_LINK
Constructor Detail

RSS

public RSS(javax.jcr.Node node)
Method Detail

getRSSLink

public static String getRSSLink(String appType,
                                String portalName,
                                String objectId)

getUserRSSLink

public static String getUserRSSLink(String apptype,
                                    String userId)

getFileName

public String getFileName()

setFileName

public void setFileName(String fileName)

getContent

public InputStream getContent()

setContent

public void setContent(InputStream is)

read

public com.sun.syndication.feed.synd.SyndFeed read()
Read a SyndFeed from the

Returns:
Throws:
Exception

removeEntry

public com.sun.syndication.feed.synd.SyndFeed removeEntry(String uri)
Remove an item for the feed

Parameters:
uri -
Returns:
Throws:
Exception

addEntry

public com.sun.syndication.feed.synd.SyndFeed addEntry(com.sun.syndication.feed.synd.SyndEntry newEntry)
Adds an entry to the feed

Parameters:
newEntry -
Returns:

saveFeed

public void saveFeed(com.sun.syndication.feed.synd.SyndFeed feed,
                     String rssNodeType)

feedExists

public boolean feedExists()

createNewFeed

public static com.sun.syndication.feed.synd.SyndFeed createNewFeed(String title,
                                                                   Date pubDate)
Create a new feed with some default content: link is the link to eXo web site and feed type is rss_2.0

Returns:

createNewEntry

public static com.sun.syndication.feed.synd.SyndEntry createNewEntry(String uri,
                                                                     String title,
                                                                     String link,
                                                                     List<String> listContent,
                                                                     com.sun.syndication.feed.synd.SyndContent description,
                                                                     Date pubDate,
                                                                     String author)
Create new entry

Parameters:
uri - uri of item
title - title of item
link - link to this item
listContent - the content of item
description - the description for this item
Returns:
SyndEntry

getItemNode

public javax.jcr.Node getItemNode()

setItemNode

public void setItemNode(javax.jcr.Node itemNode)


Copyright © 2013 eXo Platform SAS. All Rights Reserved.