dekoh.portal.syndication
Class OPMLGenerator
java.lang.Object
dekoh.portal.syndication.OPMLGenerator
- All Implemented Interfaces:
- Observer
public class OPMLGenerator
- extends Object
- implements Observer
OPMLGenerator generates an OPML file that will describe
all the feeds emitted by a Dekoh installation of a user.
The opml file thus generated is supposed to help 'aggregator tools' to discover the syndication feeds (and
their formats) emitted by applications installed on Dekoh.
A sample ompl file generated by this file
<opml version="2.0">
<head>
<title>Subsrciptions from ${dekoh owner name}.opml</title>
<dateCreated>Sat, 18 Jun 2005 12:11:52 GMT</dateCreated>
<dateModified>Tue, 02 Aug 2005 21:42:48 GMT</dateModified>
<ownerName>${dekoh owner name}</ownerName>
<ownerEmail>${dekoh owner name}@dekoh.com</ownerEmail>
<expansionState></expansionState>
<vertScrollState>1</vertScrollState>
<windowTop>61</windowTop>
<windowLeft>304</windowLeft>
<windowBottom>562</windowBottom>
<windowRight>842</windowRight>
</head>
<body>
<outline text="DekohPhotos - Shared Photo Albums" description="Recent [insert number here] Photo albums ${dekoh
owner name} has shared to you" htmlUrl="http://${dekohOwnerName}.dekoh.com/${photosContextRoot}" language="${lang
from locale}" title="" type="rss" version="RSS2" xmlUrl="http://${dekoh owner name}.dekoh.com/dekohportal/feed/rss?n=${applicationContextRoot}-channel
name"/>
<outline text="DekohPhotos - Comments on Shared Photo Albums" description="Recent [insert number here] Comments
made on Photo albums shared by ${dekoh owner name}" htmlUrl="http://localhost/${photosContextRoot}" language="${lang
from locale}" title="" type="rss" version="RSS" xmlUrl="http://localhost/dekohportal/feed/rss?n=${applicationContextRoot}-channel
name"/>
<outline text="DekohBooks - Book Titles shared" description="" htmlUrl="" language="" title="" type="rss"
version="RSS" xmlUrl=""/>
</body>
</opml>
- Since:
- Mar 23, 2007
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OUTLINE_ELEMENT_NAME
public static final String OUTLINE_ELEMENT_NAME
- See Also:
- Constant Field Values
HEAD_ELEMENT_NAME
public static final String HEAD_ELEMENT_NAME
- See Also:
- Constant Field Values
XML_URL
public static final String XML_URL
- See Also:
- Constant Field Values
HTML_URL
public static final String HTML_URL
- See Also:
- Constant Field Values
VERSION
public static final String VERSION
- See Also:
- Constant Field Values
OPMLGenerator
public OPMLGenerator(File opmlCacheDir)
update
public void update(Observable o,
Object arg)
- Whenerver any Channel is registered to SyndicationService it notifies this Observer and call this update method
- Specified by:
update in interface Observer
- Parameters:
o - Observablearg - arguments- See Also:
SyndicationService.registerChannelProvider(ChannelProvider)
generateOPMLFile
public File generateOPMLFile(HttpServletRequest request,
EnumSet supportedFeedTypes,
long newerThan,
String language,
String requestor)
throws XMLValidationException,
IOException,
SAXException,
CouldnotGenerateFeedException,
FeedException
- Throws:
XMLValidationException
IOException
SAXException
CouldnotGenerateFeedException
FeedException
getOPMLFileName
public String getOPMLFileName(HttpServletRequest request)
getOutLineElements
public static List getOutLineElements(File opmlFile)
throws XMLValidationException,
IOException,
SAXException
- Throws:
XMLValidationException
IOException
SAXException
getOpmlUrl
public static String getOpmlUrl(String dekohId)
getLastModified
public long getLastModified()
© 2009 Pramati Technologies - Dekoh - Portal for Developers