org.aitools.programd.processor.botconfiguration
Class BotProcessor

java.lang.Object
  extended by org.aitools.programd.processor.Processor
      extended by org.aitools.programd.processor.botconfiguration.BotConfigurationElementProcessor
          extended by org.aitools.programd.processor.botconfiguration.BotProcessor

public class BotProcessor
extends BotConfigurationElementProcessor

Supports configuration of a bot from the startup file.

Author:
Noel Bush

Field Summary
static java.lang.String label
          The label (as required by the registration scheme).
 
Fields inherited from class org.aitools.programd.processor.botconfiguration.BotConfigurationElementProcessor
HREF, logger
 
Fields inherited from class org.aitools.programd.processor.Processor
core, EMPTY_STRING, ENABLED, ID, NAME, NAME_EQUALS, VALUE, VALUE_EQUALS
 
Constructor Summary
BotProcessor(Core coreToUse)
          Creates a new BotProcessor with the given Core.
 
Method Summary
 java.lang.String process(org.w3c.dom.Element element, BotsConfigurationFileParser parser)
          Generic implementation of process -- just processes children.
 java.lang.String processResponse(org.w3c.dom.Element element, BotsConfigurationFileParser parser)
          Processes a bot element and returns the id of the bot loaded.
 
Methods inherited from class org.aitools.programd.processor.botconfiguration.BotConfigurationElementProcessor
process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

label

public static final java.lang.String label
The label (as required by the registration scheme).

See Also:
Constant Field Values
Constructor Detail

BotProcessor

public BotProcessor(Core coreToUse)
Creates a new BotProcessor with the given Core.

Parameters:
coreToUse - the Core to use
Method Detail

process

public java.lang.String process(org.w3c.dom.Element element,
                                BotsConfigurationFileParser parser)
                         throws ProcessorException
Description copied from class: BotConfigurationElementProcessor
Generic implementation of process -- just processes children.

Overrides:
process in class BotConfigurationElementProcessor
Parameters:
element - the element to process
parser - the parser that is doing the processing
Returns:
the result of processing (usually ignored)
Throws:
ProcessorException - if there is an error in processing
See Also:
BotConfigurationElementProcessor.process(org.w3c.dom.Element, org.aitools.programd.parser.BotsConfigurationFileParser)

processResponse

public java.lang.String processResponse(org.w3c.dom.Element element,
                                        BotsConfigurationFileParser parser)
                                 throws ProcessorException
Processes a bot element and returns the id of the bot loaded.

Parameters:
element - the bot element
parser - the parser in use
Returns:
the id of the bot loaded
Throws:
ProcessorException - if there was a problem
See Also:
BotConfigurationElementProcessor.process(Element, BotsConfigurationFileParser)