se.kmr.scam.client.chain
Class CommandChainConfiguration

java.lang.Object
  extended byse.kmr.scam.client.chain.CommandChainConfiguration

public class CommandChainConfiguration
extends Object

A container for named CommandChain definitions. Note: Only definitions of CommandChain's is stored in this object This object provides a mechanism for instanciating named CommandChain objects, provided that the provided name is associated with a CommandChain definition.

Version:
$Revision: 1.8 $
Author:
Jöran
Created:
den 25 juli 2002

Constructor Summary
CommandChainConfiguration(String nameOfDefaultChain, String nameOfErrorHandlerChain)
          Constructor for the CommandChainConfiguration object
 
Method Summary
 void addChain(String name, Map chainDef)
          Adds a definition for a CommandChain object to the CommandChainConfiguration object
 CommandChain getChain(String name)
          Gets an instance of a named CommandChain object.
 Map getChainDefinition(String name)
          Gets a named chain-definition from the CommandChainConfiguration object
 CommandChain getChainFromAlias(String alias)
          Gets an instance of a CommandChain object, identified through an alias.
 CommandChain getErrorHandlerChain()
          Gets the CommandChain designated as error handler.
 void setActionsMapping(Map actions)
          Sets the actionsMapping attribute of the CommandChainConfiguration object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandChainConfiguration

public CommandChainConfiguration(String nameOfDefaultChain,
                                 String nameOfErrorHandlerChain)
Constructor for the CommandChainConfiguration object

Parameters:
nameOfDefaultChain - identifier for the default CommandChain object
nameOfErrorHandlerChain - identifier for the CommandChain object designated as a error handler
Method Detail

setActionsMapping

public void setActionsMapping(Map actions)
Sets the actionsMapping attribute of the CommandChainConfiguration object

Parameters:
actions - The new actionsMapping value

addChain

public void addChain(String name,
                     Map chainDef)
Adds a definition for a CommandChain object to the CommandChainConfiguration object

Parameters:
name - The name associated with the definition
chainDef - The CommandChain definition

getChain

public CommandChain getChain(String name)
Gets an instance of a named CommandChain object.

Parameters:
name - The identifier of the CommandChain definition.
Returns:
An instance of the named CommandChain, if the name is associated with a CommandChain definition, otherwise an instance of the designated default CommandChain.

getChainFromAlias

public CommandChain getChainFromAlias(String alias)
Gets an instance of a CommandChain object, identified through an alias.

Parameters:
alias - The alias of the CommandChain definition.
Returns:
An instance of a CommandChain, if the alias is associated with a CommandChain definition, otherwise an instance of the designated default CommandChain.

getChainDefinition

public Map getChainDefinition(String name)
Gets a named chain-definition from the CommandChainConfiguration object

Parameters:
name - the name of the chain-definition
Returns:
The chain-definition

getErrorHandlerChain

public CommandChain getErrorHandlerChain()
Gets the CommandChain designated as error handler.

Returns:
The error handler CommandChain


Copyright © 2003 SCAM. All Rights Reserved.