jgd.comapi
Class ComponentRegistrator

java.lang.Object
  extended by jgd.comapi.ComponentRegistrator

public class ComponentRegistrator
extends java.lang.Object

Class for (un)registering the GDS Java API as components for Google Desktop This class - as well as the Query class - uses the Jacob Java-COM -bridge See http://desktop.google.com/queryapi.html#registering See http://sourceforge.net/projects/jacob-project/ This class could be extended to support registration of other component-types (indexing, etc.), as well as the current support for registering query-components

Author:
Arne Solheim (Protector Forsikring ASA - www.protectorforsikring.no)

Field Summary
static java.lang.String DEFAULT_GUID
           
protected  java.lang.String jacobDLLPath
           
static java.lang.String LIB_PATH_KEY
           
protected static org.apache.commons.logging.Log log
           
protected  java.lang.String myGUID
           
 
Constructor Summary
ComponentRegistrator(java.lang.String jacobDLLPath)
          Constructor that uses the default GUID
ComponentRegistrator(java.lang.String jacobDLLPath, java.lang.String GUID)
           
 
Method Summary
protected static void addLibraryPath(java.lang.String newPath)
          Method for adding some (new) path to the current java.library.path
 java.lang.String getGUID()
           
 java.lang.String[] getQueryComponentDescriptionArray()
          See the Component Registration Code Template under http://desktop.google.com/indexapi.html#registering for an example of C++ code with description-array
 java.lang.String registerQueryComponent(java.lang.String GUID)
          See http://desktop.google.com/queryapi.html
 java.lang.String toString()
           
 void unregisterQueryComponent(java.lang.String GUID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

LIB_PATH_KEY

public static final java.lang.String LIB_PATH_KEY
See Also:
Constant Field Values

DEFAULT_GUID

public static final java.lang.String DEFAULT_GUID
See Also:
Constant Field Values

jacobDLLPath

protected java.lang.String jacobDLLPath

myGUID

protected java.lang.String myGUID
Constructor Detail

ComponentRegistrator

public ComponentRegistrator(java.lang.String jacobDLLPath)
Constructor that uses the default GUID

Parameters:
libPath - Path to where the jacob.dll -file is located
See Also:
jgd.comapi.ComponentRegistrator(String,String)

ComponentRegistrator

public ComponentRegistrator(java.lang.String jacobDLLPath,
                            java.lang.String GUID)
Parameters:
libPath - Path to where the jacob.dll -file is located
GUID - Unique GUID to be used for (un)registering components using this class
Method Detail

addLibraryPath

protected static void addLibraryPath(java.lang.String newPath)
Method for adding some (new) path to the current java.library.path


getGUID

public java.lang.String getGUID()
Returns:
the GUID associated with this ComponentRegistrator -instance

getQueryComponentDescriptionArray

public java.lang.String[] getQueryComponentDescriptionArray()
See the Component Registration Code Template under http://desktop.google.com/indexapi.html#registering for an example of C++ code with description-array

Returns:
the default description-array for the GDS Java API

registerQueryComponent

public java.lang.String registerQueryComponent(java.lang.String GUID)
See http://desktop.google.com/queryapi.html

Parameters:
GUID - the GUID of the query component to register with GD
Returns:
the corresponding cookie -value for the registered component which should be used in all succeding queries towards GD using a Query
See Also:
QueryCOM

unregisterQueryComponent

public void unregisterQueryComponent(java.lang.String GUID)
Parameters:
GUID - the GUID of the query -component to unregister from GD

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a String representation of this ComponentRegistrator -instance


Copyright © 2007