org.apache.avalon.composition.model.impl
Class DefaultStageModel

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.composition.model.impl.DefaultStageModel
All Implemented Interfaces:
LogEnabled, StageModel

public class DefaultStageModel
extends AbstractLogEnabled
implements StageModel

Default implementation of the stage model.

Version:
$Revision: 1.2 $ $Date: 2003/10/28 20:21:00 $
Author:
Avalon Development Team

Constructor Summary
DefaultStageModel(Logger logger, String partition, StageDescriptor descriptor, StageDirective directive)
          Creation of a new stage model.
 
Method Summary
 ExtensionDescriptor[] filter(ExtensionDescriptor[] candidates)
          Filter a set of candidate extension descriptors and return the set of acceptable extensions as a ordered sequence.
 String getPath()
          Return an explicit path to a supplier component.
 StageDescriptor getStage()
          Return the stage descriptor.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultStageModel

public DefaultStageModel(Logger logger,
                         String partition,
                         StageDescriptor descriptor,
                         StageDirective directive)
                  throws ModelException
Creation of a new stage model.

Parameters:
logger - the logging channel
partition - the partition name
descriptor - the stage descriptors
directive - the stage directive (possibly null)
Method Detail

getStage

public StageDescriptor getStage()
Return the stage descriptor.

Specified by:
getStage in interface StageModel
Returns:
the descriptor

getPath

public String getPath()
Return an explicit path to a supplier component. If a stage directive has been declared and the directive contains a source declaration, the value returned is the result of parsing the source value relative to the absolute address of the dependent component.

Specified by:
getPath in interface StageModel
Returns:
the explicit path

filter

public ExtensionDescriptor[] filter(ExtensionDescriptor[] candidates)
Filter a set of candidate extension descriptors and return the set of acceptable extensions as a ordered sequence.

Specified by:
filter in interface StageModel
Parameters:
candidates - the set of candidate stage providers
Returns:
the accepted candidates in ranked order


Copyright © Apache Software Foundation. All Rights Reserved.