org.strutsit.chain.interfaces
Interface ChainFacade

All Known Implementing Classes:
ChainFacadeImpl

public interface ChainFacade

Interface for a chain-facade.

This interface provides all methods that are need to configure a chain and get access to it. It is possible to configure the chain framework with several methods (configurations).

The way to configure it is described in the chain.properties file. If no file is found the standard behavior is choosed.

 
 chain.properties
   
 # Configuration mode: Maybe xml|prop|class
 chain.configuration=xml
 # Full qualified java class of the XML-Configuration
 chain.configuration.xml=org.strutsit.chain.configuration.ChainXMLConfiguration
 # Full qualified java class of the Chain-implementation. If no Dependencycheck
 # is need also the original class maybe used org.apache.commons.chain.impl.ChainBase
 chain.baseclass=org.strutsit.chain.configuration.ChainConfBase;

 # Name of the configuration item default is:
 # xml   : /org/struts-it/chain/config/chain-config.xml
 # prop  : /org/struts-it/chain/config/chain-config.properties
 # class : org.strutsit.chain.config.Configure.class
 configuration.name=/chain-config.xml
  
 

Since:
JDK 1.4
Version:
$Revision: 1.4 $
Author:
Manfred Wolff

Method Summary
 void destroy()
          Frees all Resources.
 boolean execute(java.lang.String commandString, org.apache.commons.chain.Context context)
          Executes a chain or a single command by name.
 void initFacade()
          Inits the framework.
 

Method Detail

initFacade

public void initFacade()
                throws ChainException
Inits the framework. The method has the following responsibilities:

Throws:
ChainException - if something fails

destroy

public void destroy()
Frees all Resources.


execute

public boolean execute(java.lang.String commandString,
                       org.apache.commons.chain.Context context)
                throws ChainException
Executes a chain or a single command by name.

Parameters:
commandString - The name of the command or chain.
context - The Context for executing
Returns:
True if the command can fulfill the operation, otherwise false
Throws:
ChainException - if something goes wrong


Copyright © 2004-2005 Struts-it community. All Rights Reserved.