eu.scape_project.watch.interfaces
Interface AdaptorPluginInterface

All Superinterfaces:
PluginInterface
All Known Implementing Classes:
C3POAdaptor

public interface AdaptorPluginInterface
extends PluginInterface

An adaptor plugin interface that each adaptor has to implement.

Author:
Petar Petrov

Method Summary
 ResultInterface execute()
          Fetches all information that this adaptor can obtain from the source.
 ResultInterface execute(Map<Entity,List<Property>> config)
          Executes this plugin and returns a specific ResultInterface implementation.
 List<ConfigParameter> getParameters()
          Retrieves a list with ConfigParameter objects needed/supported by this plugin.
 Map<String,String> getParameterValues()
          Returns a pre-polulated map with the configuration of this plugin.
 void setParameterValues(Map<String,String> values)
          Sets the config parameters.
 
Methods inherited from interface eu.scape_project.watch.interfaces.PluginInterface
getDescription, getName, getPluginType, getVersion, init, shutdown
 

Method Detail

getParameters

List<ConfigParameter> getParameters()
Retrieves a list with ConfigParameter objects needed/supported by this plugin. Note the not all config parameters have to be requried ( ConfigParameter.isRequired() )

Returns:
the list with the parameters.

getParameterValues

Map<String,String> getParameterValues()
Returns a pre-polulated map with the configuration of this plugin. The keys are the config parameters and the values are the config values. The plugin can provide default values, but is not expected to.

Returns:
the config of the plugin.

setParameterValues

void setParameterValues(Map<String,String> values)
                        throws InvalidParameterException
Sets the config parameters.

Parameters:
values - sets the values.
Throws:
InvalidParameterException - if some required parameters are not provided, or other problems occur.

execute

ResultInterface execute(Map<Entity,List<Property>> config)
                        throws PluginException
Executes this plugin and returns a specific ResultInterface implementation. The execution has to be done according to the current parameter setting.

Parameters:
config - the configuration map. Determines what should be fetched upon execution.
Returns:
the result of the execution.
Throws:
PluginException - if an error occurs.

execute

ResultInterface execute()
                        throws PluginException
Fetches all information that this adaptor can obtain from the source. To be used carefully as this can be a lot of data that is transfered over the network. Consider using a push adaptor.

Returns:
the result of the operation.
Throws:
PluginException - if an error occurrs.


Copyright © 2012. All Rights Reserved.