org.wso2.mashup.hostobjects.feed
Class FeedReader

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by org.wso2.mashup.hostobjects.feed.FeedReader
All Implemented Interfaces:
java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class FeedReader
extends org.mozilla.javascript.ScriptableObject

The FeedReader is a generic reader of Atom and RSS feeds.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
FeedReader()
           
 
Method Summary
 java.lang.String getClassName()
           
 void jsConstructor()
           
static Feed jsFunction_get(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] arguments, org.mozilla.javascript.Function funObj)
          Reads a RSS/Atom feed from a given url

eg: var reader = new FeedReader(); var feed = new Feed(); feed = reader.get("http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml");

 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeedReader

public FeedReader()
Method Detail

jsConstructor

public void jsConstructor()

getClassName

public java.lang.String getClassName()
Specified by:
getClassName in interface org.mozilla.javascript.Scriptable
Specified by:
getClassName in class org.mozilla.javascript.ScriptableObject

jsFunction_get

public static Feed jsFunction_get(org.mozilla.javascript.Context cx,
                                  org.mozilla.javascript.Scriptable thisObj,
                                  java.lang.Object[] arguments,
                                  org.mozilla.javascript.Function funObj)
                           throws java.io.IOException
Reads a RSS/Atom feed from a given url

 eg:
    var reader = new FeedReader();
    var feed = new Feed();
    feed = reader.get("http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml");
 

Parameters:
cx - Provides the current context
thisObj - Gives an instance of the js object from which this method was called
arguments - The expected argument is a String representing the URL of the feed
funObj -
Returns:
A Feed HostObject containing the retrieved feed
Throws:
java.io.IOException