org.webharvest.runtime.processors.plugins
Class DatabasePlugin

java.lang.Object
  extended by org.webharvest.runtime.processors.BaseProcessor
      extended by org.webharvest.runtime.processors.WebHarvestPlugin
          extended by org.webharvest.runtime.processors.plugins.DatabasePlugin

public class DatabasePlugin
extends WebHarvestPlugin

Support for database operations.


Constructor Summary
DatabasePlugin()
           
 
Method Summary
 Variable executePlugin(Scraper scraper, ScraperContext context)
          Mathod that actually executes processor.
 java.lang.String[] getAttributeValueSuggestions(java.lang.String attributeName)
           
 java.lang.Class[] getDependantProcessors()
          Defines dependant subprocessors that are used inside this plugin and that will automatically be registered with this plugin.
 java.lang.String getName()
          Defines name of the processor.
 java.lang.String[] getRequiredAttributes()
          This method should return all mandatory attribute names for the plugin processor.
 java.lang.String[] getValidAttributes()
          This method should return all possible attribute names for the plugin processor.
 
Methods inherited from class org.webharvest.runtime.processors.WebHarvestPlugin
execute, getAttributeDesc, getRequiredSubprocessors, getTagDesc, getValidSubprocessors, hasBody, setDef
 
Methods inherited from class org.webharvest.runtime.processors.BaseProcessor
getElementDef, run
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabasePlugin

public DatabasePlugin()
Method Detail

getName

public java.lang.String getName()
Description copied from class: WebHarvestPlugin
Defines name of the processor. Should be valid identifier. Processor's tag will use this name. For example, if this name is "myprocessor" in config file it will be used as <myprocessor...>...</myprocessor>

Specified by:
getName in class WebHarvestPlugin
Returns:
Name of the processor

executePlugin

public Variable executePlugin(Scraper scraper,
                              ScraperContext context)
Description copied from class: WebHarvestPlugin
Mathod that actually executes processor. Since one instance of this class may be used for multiple executions, creator of plugin is responsible for initiating local variables at the beginning of this method.

Specified by:
executePlugin in class WebHarvestPlugin
Returns:
Instance of variable as result of xecution.

getValidAttributes

public java.lang.String[] getValidAttributes()
Description copied from class: WebHarvestPlugin
This method should return all possible attribute names for the plugin processor.

Overrides:
getValidAttributes in class WebHarvestPlugin
Returns:
Array of attribute names (case insensitive)

getRequiredAttributes

public java.lang.String[] getRequiredAttributes()
Description copied from class: WebHarvestPlugin
This method should return all mandatory attribute names for the plugin processor.

Overrides:
getRequiredAttributes in class WebHarvestPlugin
Returns:
Array of attribute names (case insensitive)

getAttributeValueSuggestions

public java.lang.String[] getAttributeValueSuggestions(java.lang.String attributeName)
Overrides:
getAttributeValueSuggestions in class WebHarvestPlugin
Parameters:
attributeName - Name of plugin attribute
Returns:
Array of valuee suggestions for specified attribute (this is used for auto-complete feature in IDE). null means nothing to suggest.

getDependantProcessors

public java.lang.Class[] getDependantProcessors()
Description copied from class: WebHarvestPlugin
Defines dependant subprocessors that are used inside this plugin and that will automatically be registered with this plugin.

Overrides:
getDependantProcessors in class WebHarvestPlugin
Returns:
Array of subprocessor classes