org.apache.avalon.composition.model
Interface ContainmentModel

All Superinterfaces:
Model
All Known Implementing Classes:
DefaultContainmentModel

public interface ContainmentModel
extends Model

Containment model is an extended deployment model that aggregates a set of models. A containment model describes a logical containment context.

Version:
$Revision: 1.9.4.1 $ $Date: 2004/01/12 06:22:53 $
Author:
Avalon Development Team

Field Summary
static String SEPERATOR
           
 
Method Summary
 void addCompositionListener(CompositionEventListener listener)
          Add a composition listener to the model.
 ContainmentModel addContainmentModel(URL block, URL config)
          Addition of a new subsidiary containment model within the containment context using a supplied url.
 Model addModel(Profile profile)
          Addition of a new subsidiary model within the containment context using a supplied profile.
 Model addModel(URL url)
          Addition of a new subsidiary model within the containment context using a supplied profile url.
 void applyTargets(TargetDirective[] targets)
          Apply a set of override targets.
 void applyTargets(URL url)
          Apply a set of override targets resolvable from a supplied url.
 CategoriesDirective getCategories()
          Return the logging categories.
 ClassLoaderModel getClassLoaderModel()
          Return the classloader model.
 Model getModel(DependencyDescriptor dependency)
          Return a model relative to a supplied dependency.
 Model getModel(StageDescriptor stage)
          Return a model relative to a supplied stage descriptor.
 Model getModel(String name)
          Return a model relative to a supplied name.
 Model[] getModels()
          Return the set of models nested within this model.
 String getPartition()
          Return the partition established by the containment model.
 ServiceModel getServiceModel(Class clazz)
          Return a service exoport model matching a supplied class.
 ServiceModel[] getServiceModels()
          Return the set of service export models.
 void removeCompositionListener(CompositionEventListener listener)
          Remove a composition listener from the model.
 void removeModel(String name)
          Removal of a named model for the containment model.
 void setCategories(CategoriesDirective categories)
          Set categories.
 
Methods inherited from interface org.apache.avalon.composition.model.Model
getMode, getName, getPath, getQualifiedName, getServices, isaCandidate, isaCandidate
 

Field Detail

SEPERATOR

public static final String SEPERATOR
See Also:
Constant Field Values
Method Detail

getCategories

public CategoriesDirective getCategories()
Return the logging categories.

Returns:
the logging categories

setCategories

public void setCategories(CategoriesDirective categories)
Set categories.

Parameters:
categories - the logging categories

getPartition

public String getPartition()
Return the partition established by the containment model.

Returns:
the partition name

getClassLoaderModel

public ClassLoaderModel getClassLoaderModel()
Return the classloader model.

Returns:
the classloader model

getModels

public Model[] getModels()
Return the set of models nested within this model.

Returns:
the classloader model

getModel

public Model getModel(String name)
Return a model relative to a supplied name.

Returns:
the named model or null if the name is unknown

getModel

public Model getModel(DependencyDescriptor dependency)
               throws ModelRuntimeException
Return a model relative to a supplied dependency.

Returns:
a matching model or null if the dependency is unresolvable
Throws:
ModelRuntimeException - if an error occurs during model establishment

getModel

public Model getModel(StageDescriptor stage)
               throws ModelRuntimeException
Return a model relative to a supplied stage descriptor.

Parameters:
stage - the stage descriptor
Returns:
model of a an stage handler or null if the stage is unresolvable
Throws:
ModelRuntimeException - if an error occurs during model establishment

addModel

public Model addModel(URL url)
               throws ModelException
Addition of a new subsidiary model within the containment context using a supplied profile url.

Parameters:
url - a containment profile url
Returns:
the model based on the derived profile
Throws:
ModelException - if an error occurs during model establishment

addContainmentModel

public ContainmentModel addContainmentModel(URL block,
                                            URL config)
                                     throws ModelException
Addition of a new subsidiary containment model within the containment context using a supplied url.

Parameters:
block - a url referencing a containment profile
config - containment configuration targets
Returns:
the model created using the derived profile and configuration
Throws:
ModelException - if an error occurs during model establishment

addModel

public Model addModel(Profile profile)
               throws ModelException
Addition of a new subsidiary model within the containment context using a supplied profile.

Parameters:
profile - a containment or deployment profile
Returns:
the model based on the supplied profile
Throws:
ModelException - if an error occurs during model establishment

removeModel

public void removeModel(String name)
Removal of a named model for the containment model.

Parameters:
name - the name of the subsidiary model to be removed

getServiceModels

public ServiceModel[] getServiceModels()
Return the set of service export models.

Returns:
t he export directives

getServiceModel

public ServiceModel getServiceModel(Class clazz)
Return a service exoport model matching a supplied class.

Returns:
the service model

applyTargets

public void applyTargets(URL url)
                  throws ModelException
Apply a set of override targets resolvable from a supplied url.

Parameters:
url - a url resolvable to a TargetDirective[]
Throws:
ModelException - if an error occurs

applyTargets

public void applyTargets(TargetDirective[] targets)
Apply a set of override targets.

Parameters:
targets - a set of target directives

addCompositionListener

public void addCompositionListener(CompositionEventListener listener)
Add a composition listener to the model.

Parameters:
listener - the composition listener

removeCompositionListener

public void removeCompositionListener(CompositionEventListener listener)
Remove a composition listener from the model.

Parameters:
listener - the composition listener


Copyright © Apache Software Foundation. All Rights Reserved.