HPSearch

cgl.hpsearch.shell.flow
Class DBResource

java.lang.Object
  extended byorg.mozilla.javascript.ScriptableObject
      extended bycgl.hpsearch.shell.flow.DBResource
All Implemented Interfaces:
Resource, Scriptable, Serializable

public class DBResource
extends ScriptableObject
implements Resource

DBResource is an interface to the DBReadHandler data handler. Allows us to discover a particular end-point for a specific service. Refer the NB-scripting: Host Objects for usage.

Author:
Harshawardhan S. Gadgil $Date: 2005/10/16 14:41:05 $
See Also:
DBReadHandler, Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
DONTENUM, EMPTY, parent, PERMANENT, prototype, READONLY
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
DBResource()
          The zero-argument constructor used by Rhino runtime to create instances
 
Method Summary
 String getClassName()
           
 RequestSpecification getRequestSpec()
          Creates a Filter for the current Resource node.
 String getResourceID()
           
static Scriptable jsConstructor(Context cx, Object[] args, Function ctorObj, boolean inNewExpr)
           
static void jsFunction_Connect(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
           
static Object jsFunction_runSQLQuery(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
           
 String jsGet_id()
           
 Object jsGet_notify()
           
 String jsGet_publish()
           
 String jsGet_SQLQuery()
           
 void jsSet_id(String i)
           
 void jsSet_notify(Object a)
           
 void jsSet_publish(String i)
           
 void jsSet_SQLQuery(String i)
           
 void usage()
           
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
callMethod, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, getAllIds, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, has, has, hasInstance, hasProperty, hasProperty, isSealed, put, put, putProperty, putProperty, sealObject, setAttributes, setAttributes, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBResource

public DBResource()
The zero-argument constructor used by Rhino runtime to create instances

Method Detail

jsConstructor

public static Scriptable jsConstructor(Context cx,
                                       Object[] args,
                                       Function ctorObj,
                                       boolean inNewExpr)

getClassName

public String getClassName()
Specified by:
getClassName in interface Scriptable

jsFunction_Connect

public static void jsFunction_Connect(Context _cx,
                                      Scriptable _thisObj,
                                      Object[] id,
                                      Function funObj)

jsFunction_runSQLQuery

public static Object jsFunction_runSQLQuery(Context _cx,
                                            Scriptable _thisObj,
                                            Object[] id,
                                            Function funObj)

getRequestSpec

public RequestSpecification getRequestSpec()
Creates a Filter for the current Resource node. The contents of this node are as follows:
  • A read {from source -> to dest} for each stream at this node
     
      
       
                 <DBconnector source="file:///rootPasswords.txt" 
                                 dest="topic:///CGL/WORKFLOW/STREAM/GUID-382"> 
                      <query>SELECT * FROM ...</query> 
                 </DBconnector>
        
       
      
     
  • The optional ERROR stream in case of an error...
     
      
       
           <notify stream="topic:///CGL/WORKFLOW/ERROR/" />
        
       
      
     
  • Optional details on whether to waitFor a particular stream or not...

    Specified by:
    getRequestSpec in interface Resource
    Returns:
    The Filter object

  • jsGet_id

    public String jsGet_id()

    jsSet_id

    public void jsSet_id(String i)

    jsGet_notify

    public Object jsGet_notify()

    jsSet_notify

    public void jsSet_notify(Object a)

    jsSet_publish

    public void jsSet_publish(String i)

    jsGet_publish

    public String jsGet_publish()

    jsGet_SQLQuery

    public String jsGet_SQLQuery()

    jsSet_SQLQuery

    public void jsSet_SQLQuery(String i)

    usage

    public void usage()
    Specified by:
    usage in interface Resource

    getResourceID

    public String getResourceID()
    Specified by:
    getResourceID in interface Resource

    HPSearch

    For comments and suggestions please send e-mail to Harshawardhan Gadgil
    Last updated: June 9 2006