org.wso2.mashup.hostobjects.scraper
Class ScraperHostObject

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

public class ScraperHostObject
extends org.mozilla.javascript.ScriptableObject

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
ScraperHostObject()
           
 
Method Summary
 java.lang.Object get(java.lang.String s, org.mozilla.javascript.Scriptable scriptable)
          

eg: var config = ; var scraper = new Scraper(config); var response = scraper.response;

 java.lang.String getClassName()
          This function does not get invoked explicitly.
 boolean has(java.lang.String s, org.mozilla.javascript.Scriptable scriptable)
          This function does not get invoked explicitly.
static org.mozilla.javascript.Scriptable jsConstructor(org.mozilla.javascript.Context cx, java.lang.Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr)
           
 
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, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, 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

ScraperHostObject

public ScraperHostObject()
Method Detail

jsConstructor

public static org.mozilla.javascript.Scriptable jsConstructor(org.mozilla.javascript.Context cx,
                                                              java.lang.Object[] args,
                                                              org.mozilla.javascript.Function ctorObj,
                                                              boolean inNewExpr)
                                                       throws java.io.IOException
Throws:
java.io.IOException

getClassName

public java.lang.String getClassName()
This function does not get invoked explicitly. It is called by rhino internally.

Specified by:
getClassName in interface org.mozilla.javascript.Scriptable
Specified by:
getClassName in class org.mozilla.javascript.ScriptableObject
Returns:
The name of this hostObject

get

public java.lang.Object get(java.lang.String s,
                            org.mozilla.javascript.Scriptable scriptable)

 eg:
    var config =  
                       
                           
                               
                           
                       
                   ;
    var scraper = new Scraper(config);
    var response = scraper.response;
 

Specified by:
get in interface org.mozilla.javascript.Scriptable
Overrides:
get in class org.mozilla.javascript.ScriptableObject
Parameters:
s - - The property requested for
scriptable - - The Scriptable object that the property was requested from
Returns:
String - The property if it exist

has

public boolean has(java.lang.String s,
                   org.mozilla.javascript.Scriptable scriptable)
This function does not get invoked explicitly. It is called by rhino internally when something like scraper. response is attempted. Rhino uses this function to check whether the property is available.

Specified by:
has in interface org.mozilla.javascript.Scriptable
Overrides:
has in class org.mozilla.javascript.ScriptableObject
Parameters:
s - - The property requested for
scriptable - - The Scriptable object that the property was requested from
Returns:
boolean - Indicating whether the proty exist or not