|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.composition.model.impl.DefaultModel
org.apache.avalon.composition.model.impl.DefaultContainmentModel
Containment model implmentation within which composite models are aggregated as a part of a containment deployment model.
Field Summary |
Fields inherited from interface org.apache.avalon.composition.model.ContainmentModel |
SEPERATOR |
Constructor Summary | |
DefaultContainmentModel(ContainmentContext context)
Creation of a new containment model. |
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)
Add a model referenced by a url to this model. |
void |
applyTargets(TargetDirective[] targets)
Apply a set of override targets. |
void |
applyTargets(URL config)
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)
Get a local model relative to a supplied service dependency. |
Model |
getModel(StageDescriptor stage)
Return a model relative to a supplied stage descriptor. |
Model |
getModel(String path)
Return a child model relative to a supplied name. |
Model[] |
getModels()
Return the set of immediate child models nested within this model. |
String |
getPartition()
Return the partition name established by this containment context. |
ServiceModel |
getServiceModel(Class clazz)
Return the set of service export directives for a supplied class. |
ServiceModel[] |
getServiceModels()
Return the set of service export mappings |
ServiceDescriptor[] |
getServices()
Return the set of services produced by the model. |
boolean |
isaCandidate(DependencyDescriptor dependency)
Return TRUE is this model is capable of supporting a supplied depedendency. |
boolean |
isaCandidate(StageDescriptor stage)
Return TRUE is this model is capable of supporting a supplied stage dependency. |
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. |
String |
toString()
Return a simple string represention of the containment model. |
Methods inherited from class org.apache.avalon.composition.model.impl.DefaultModel |
getLogger, getMode, getName, getPath, getQualifiedName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.avalon.composition.model.Model |
getMode, getName, getPath, getQualifiedName |
Constructor Detail |
public DefaultContainmentModel(ContainmentContext context) throws ModelException
context
- the containment context that establishes
the structural association of this containment model
within a parent scopeMethod Detail |
public ClassLoaderModel getClassLoaderModel()
getClassLoaderModel
in interface ContainmentModel
public ServiceDescriptor[] getServices()
getServices
in interface Model
public boolean isaCandidate(DependencyDescriptor dependency)
isaCandidate
in interface Model
public boolean isaCandidate(StageDescriptor stage)
isaCandidate
in interface Model
public void addCompositionListener(CompositionEventListener listener)
addCompositionListener
in interface ContainmentModel
listener
- the composition listenerpublic void removeCompositionListener(CompositionEventListener listener)
removeCompositionListener
in interface ContainmentModel
listener
- the composition listenerpublic ServiceModel[] getServiceModels()
getServiceModels
in interface ContainmentModel
public ServiceModel getServiceModel(Class clazz)
getServiceModel
in interface ContainmentModel
clazz
- a cleaa identifying the directive
public CategoriesDirective getCategories()
getCategories
in interface ContainmentModel
public void setCategories(CategoriesDirective categories)
setCategories
in interface ContainmentModel
categories
- the logging categoriespublic Model addModel(URL url) throws ModelException
addModel
in interface ContainmentModel
url
- the url of the model to include
ModelException
- if a model related error occurspublic ContainmentModel addContainmentModel(URL block, URL config) throws ModelException
ContainmentModel
addContainmentModel
in interface ContainmentModel
block
- a url referencing a containment profileconfig
- containment configuration targets
ModelException
- if an error occurs during model establishmentpublic Model addModel(Profile profile) throws ModelException
ContainmentModel
addModel
in interface ContainmentModel
profile
- a containment or deployment profile
ModelException
- if an error occurs during model establishmentpublic void removeModel(String name) throws IllegalArgumentException
removeModel
in interface ContainmentModel
name
- the name of the subsidiary model to be removed
IllegalArgumentException
- if the supplied name is unknownpublic String getPartition()
getPartition
in interface ContainmentModel
public Model[] getModels()
getModels
in interface ContainmentModel
public Model getModel(String path)
getModel
in interface ContainmentModel
path
- a relative or absolute path
IllegalArgumentException
- if the name if badly formedpublic Model getModel(DependencyDescriptor dependency) throws ModelRuntimeException
getModel
in interface ContainmentModel
dependency
- the service dependency descriptor
ModelRuntimeException
- if an error occurs during model establishmentpublic Model getModel(StageDescriptor stage) throws ModelRuntimeException
getModel
in interface ContainmentModel
stage
- the stage descriptor
ModelRuntimeException
- if an error occurs during model establishmentpublic String toString()
toString
in class DefaultModel
public void applyTargets(URL config) throws ModelException
applyTargets
in interface ContainmentModel
config
- a url resolvable to a TargetDirective[]
ModelException
- if an error occurspublic void applyTargets(TargetDirective[] targets)
applyTargets
in interface ContainmentModel
targets
- a set of target directives
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |