org.apache.avalon.composition.model
Interface ModelRepository

All Known Implementing Classes:
DefaultModelRepository

public interface ModelRepository

The model repository interface declares operations through which clients may resolve new or existing model instances relative to a stage or service dependency.

Version:
$Revision: 1.5 $ $Date: 2004/02/24 22:18:21 $
Author:
Avalon Development Team

Method Summary
 void addModel(DeploymentModel model)
          Add an model to the repository.
 void addModel(String name, DeploymentModel model)
          Add an model to the repository.
 DeploymentModel[] getCandidateProviders(DependencyDescriptor dependency)
          Locate all models meeting the supplied dependency criteria.
 DeploymentModel[] getCandidateProviders(ReferenceDescriptor reference)
          Locate all models meeting the supplied service reference criteria.
 DeploymentModel[] getCandidateProviders(StageDescriptor stage)
          Locate all models meeting the supplied criteria.
 DeploymentModel getModel(DependencyDescriptor dependency)
          Locate a model meeting the supplied criteria.
 DeploymentModel getModel(ReferenceDescriptor reference)
          Locate a model meeting the supplied service criteria.
 DeploymentModel getModel(StageDescriptor stage)
          Locate a model meeting the supplied criteria.
 DeploymentModel getModel(String name)
          Locate an model matching the supplied name.
 DeploymentModel[] getModels()
          Locate an model meeting the supplied criteria.
 void removeModel(DeploymentModel model)
          Remove an model from the repository.
 

Method Detail

getModel

public DeploymentModel getModel(String name)
Locate an model matching the supplied name.

Parameters:
name - the model name
Returns:
the model or null if the model name is unknown

getModel

public DeploymentModel getModel(DependencyDescriptor dependency)
Locate a model meeting the supplied criteria.

Parameters:
dependency - a component service dependency
Returns:
the model

getModel

public DeploymentModel getModel(ReferenceDescriptor reference)
Locate a model meeting the supplied service criteria.

Parameters:
reference - a version interface descriptor
Returns:
the model

getCandidateProviders

public DeploymentModel[] getCandidateProviders(DependencyDescriptor dependency)
Locate all models meeting the supplied dependency criteria.

Parameters:
dependency - a component service dependency
Returns:
the candidate models

getCandidateProviders

public DeploymentModel[] getCandidateProviders(StageDescriptor stage)
Locate all models meeting the supplied criteria.

Parameters:
stage - a component stage dependency
Returns:
the candidate models

getCandidateProviders

public DeploymentModel[] getCandidateProviders(ReferenceDescriptor reference)
Locate all models meeting the supplied service reference criteria.

Parameters:
reference - a service reference
Returns:
the candidate models

getModel

public DeploymentModel getModel(StageDescriptor stage)
Locate a model meeting the supplied criteria.

Parameters:
stage - a component stage dependency
Returns:
the model

addModel

public void addModel(DeploymentModel model)
Add an model to the repository.

Parameters:
model - the model to add

addModel

public void addModel(String name,
                     DeploymentModel model)
Add an model to the repository.

Parameters:
name - the name to register the model under
model - the model to add

removeModel

public void removeModel(DeploymentModel model)
Remove an model from the repository.

Parameters:
model - the model to remove

getModels

public DeploymentModel[] getModels()
Locate an model meeting the supplied criteria.

Returns:
the model


Copyright © The Apache Software Foundation. All Rights Reserved.