Keel 2.1RC2

org.keel.models.util
Class SequenceInfo

java.lang.Object
  extended byorg.keel.models.util.SequenceInfo
All Implemented Interfaces:
LogEnabled

public class SequenceInfo
extends java.lang.Object
implements LogEnabled

A SequenceInfo is a class that lets you get information about all of the steps in a sequence. The information that can be obtained is information such as each model name and the order in which the models are called. This information may be useful in some cases, for example, if you wanted to dynamically create a side-bar navigation that displays the sequences, then you would need information about the sequences and their steps to created it. This class provides a wrapper around a sequenceContext and methods for reading information from the sequenceContext. This class was created to hide the complexity and ambiguity of the sequenceContext from programmers who are trying to get some infromation about a sequence context.

Version:
$Revision: 1.1 $ $Date: 2003/12/29 07:09:30 $
Author:
Philip Brown

Field Summary
private  int seqStepNum
           
private  java.lang.String sequenceName
           
private  Configuration[] sequenceSteps
           
private  Logger theSequenceInfoLogger
           
 
Constructor Summary
SequenceInfo(SequenceContext sc)
           
 
Method Summary
protected  void debug(java.lang.String msg)
           
 void enableLogging(Logger logger)
          Provide component with a logger.
 Configuration getCurrentStep()
          Gets and returns a Configuration object which contains information about the current step in the sequence.
static Configuration getCurrentStep(Context context)
           
static Configuration getCurrentStep(ModelRequest req)
           
static SequenceInfo getSequenceInfo(Context context)
           
static SequenceInfo getSequenceInfo(ModelRequest req)
           
 Configuration[] getSequenceSteps()
           
static Configuration[] getSequenceSteps(Context context)
           
static Configuration[] getSequenceSteps(ModelRequest req)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theSequenceInfoLogger

private Logger theSequenceInfoLogger

sequenceName

private java.lang.String sequenceName

seqStepNum

private int seqStepNum

sequenceSteps

private Configuration[] sequenceSteps
Constructor Detail

SequenceInfo

public SequenceInfo(SequenceContext sc)
Parameters:
sc -
Method Detail

getSequenceInfo

public static SequenceInfo getSequenceInfo(Context context)
                                    throws ModelException
Throws:
ModelException

getSequenceInfo

public static SequenceInfo getSequenceInfo(ModelRequest req)
                                    throws ModelException
Throws:
ModelException

getCurrentStep

public static Configuration getCurrentStep(ModelRequest req)
                                    throws ModelException
Throws:
ModelException

getCurrentStep

public static Configuration getCurrentStep(Context context)
                                    throws ModelException
Throws:
ModelException

getCurrentStep

public Configuration getCurrentStep()
Gets and returns a Configuration object which contains information about the current step in the sequence. Returns null if it is unable to properly get that information or if the seqStepNum is greater than the number of steps or less than one.

Returns:

getSequenceSteps

public static Configuration[] getSequenceSteps(ModelRequest req)
                                        throws ModelException
Throws:
ModelException

getSequenceSteps

public static Configuration[] getSequenceSteps(Context context)
                                        throws ModelException
Throws:
ModelException

getSequenceSteps

public Configuration[] getSequenceSteps()
                                 throws ModelException
Throws:
ModelException

enableLogging

public void enableLogging(Logger logger)
Description copied from interface: LogEnabled
Provide component with a logger.

Specified by:
enableLogging in interface LogEnabled
Parameters:
logger - the logger. Must not be null.
See Also:
LogEnabled.enableLogging(org.apache.avalon.framework.logger.Logger)

debug

protected void debug(java.lang.String msg)

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.