org.apache.avalon.composition.model
Interface ComponentModel

All Superinterfaces:
Commissionable, DeploymentModel, Resolver
All Known Implementing Classes:
DefaultComponentModel

public interface ComponentModel
extends DeploymentModel

Deployment model defintion.

Version:
$Revision: 1.9 $ $Date: 2004/03/17 10:30:08 $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from interface org.apache.avalon.composition.model.DeploymentModel
DEPLOYMENT_TIMEOUT_KEY, SEPARATOR
 
Method Summary
 boolean getActivationPolicy()
          Return the activation policy for the model.
 int getCollectionPolicy()
          Return the collection policy for the model.
 Configuration getConfiguration()
          Return the configuration to be applied to the component.
 ContextModel getContextModel()
          Return the context model for this deployment model.
 DependencyModel getDependencyModel(DependencyDescriptor dependency)
          Return a dependency model for a supplied descriptor or null if no match found.
 DependencyModel[] getDependencyModels()
          Return the dependency models for this deployment model.
 Class getDeploymentClass()
          Return the class for the deployable target.
 Class[] getInterfaces()
          Return the set of services produced by the model as a array of classes.
 Parameters getParameters()
          Return the parameters to be applied to the component.
 StageModel getStageModel(StageDescriptor stage)
          Return a stage model matching the supplied descriptor or null if no match found.
 StageModel[] getStageModels()
          Return the stage models for this deployment model.
 Type getType()
          Return the deployment type.
 boolean isParameterizable()
          Test if the component type backing the model is parameterizable.
 void setActivationPolicy(boolean policy)
          Set the activation policy for the model.
 void setCollectionPolicy(int policy)
          Set the collection policy to a supplied value.
 void setConfiguration(Configuration config)
          Set the configuration to the supplied value.
 void setConfiguration(Configuration config, boolean policy)
          Set the configuration to the supplied value.
 void setParameters(Parameters parameters)
          Set the parameters to the supplied value.
 void setParameters(Parameters parameters, boolean policy)
          Set the parameters to the supplied value.
 
Methods inherited from interface org.apache.avalon.composition.model.DeploymentModel
getAccessControlContext, getCategories, getConsumerGraph, getDeploymentTimeout, getLogger, getMode, getName, getPath, getProviderGraph, getProviders, getQualifiedName, getServices, isaCandidate, isaCandidate, isaCandidate, isAssembled, setCategories
 
Methods inherited from interface org.apache.avalon.composition.model.Commissionable
commission, decommission
 
Methods inherited from interface org.apache.avalon.composition.model.Resolver
release, resolve, resolve
 

Method Detail

getType

public Type getType()
Return the deployment type.

Returns:
the type

getActivationPolicy

public boolean getActivationPolicy()
Return the activation policy for the model.

Returns:
the activaltion policy

getCollectionPolicy

public int getCollectionPolicy()
Return the collection policy for the model. If a profile does not declare a collection policy, the collection policy declared by the type will be used.

Returns:
the collection policy
See Also:
InfoDescriptor.WEAK, InfoDescriptor.SOFT, InfoDescriptor.HARD

setCollectionPolicy

public void setCollectionPolicy(int policy)
Set the collection policy to a supplied value.

Parameters:
policy - the collection policy
See Also:
InfoDescriptor.WEAK, InfoDescriptor.SOFT, InfoDescriptor.HARD, InfoDescriptor.UNDEFINED

setActivationPolicy

public void setActivationPolicy(boolean policy)
Set the activation policy for the model.

Parameters:
policy - the activaltion policy

getDeploymentClass

public Class getDeploymentClass()
Return the class for the deployable target.

Returns:
the class

setConfiguration

public void setConfiguration(Configuration config)
Set the configuration to the supplied value. The supplied configuration will replace the existing configuration.

Parameters:
config - the supplied configuration

setConfiguration

public void setConfiguration(Configuration config,
                             boolean policy)
Set the configuration to the supplied value. The supplied configuration may suppliment or replace the existing configuration.

Parameters:
config - the supplied configuration
policy - if TRUE the supplied configuration replaces the current configuration otherwise the resoved configuration shall be layed above the configuration supplied with the profile which in turn is layer above the type default configuration (if any)

getConfiguration

public Configuration getConfiguration()
Return the configuration to be applied to the component. The implementation returns the current configuration state. If the the component type does not implementation the Configurable interface, the implementation returns null.

Returns:
the qualified configuration

isParameterizable

public boolean isParameterizable()
Test if the component type backing the model is parameterizable.

Returns:
TRUE if the component type is parameterizable otherwise FALSE

setParameters

public void setParameters(Parameters parameters)
Set the parameters to the supplied value. The supplied parameters value will replace the existing parameters value.

Parameters:
parameters - the supplied parameters value

setParameters

public void setParameters(Parameters parameters,
                          boolean policy)
Set the parameters to the supplied value. The supplied parameters value may suppliment or replace the existing parameters value.

Parameters:
parameters - the supplied parameters
policy - if TRUE the supplied parameters replaces the current parameters value otherwise the existing and supplied values are aggregrated

getParameters

public Parameters getParameters()
Return the parameters to be applied to the component. If the the component type does not implementation the Parameterizable interface, the implementation returns null.

Returns:
the assigned parameters

getContextModel

public ContextModel getContextModel()
Return the context model for this deployment model.

Returns:
the context model
See Also:
ContextModel.isEnabled()

getDependencyModels

public DependencyModel[] getDependencyModels()
Return the dependency models for this deployment model.

Returns:
the dependency models

getDependencyModel

public DependencyModel getDependencyModel(DependencyDescriptor dependency)
Return a dependency model for a supplied descriptor or null if no match found.

Returns:
the dependency model

getStageModels

public StageModel[] getStageModels()
Return the stage models for this deployment model.

Returns:
the stage models

getStageModel

public StageModel getStageModel(StageDescriptor stage)
Return a stage model matching the supplied descriptor or null if no match found.

Parameters:
stage - the stage descriptor
Returns:
the matching stage model

getInterfaces

public Class[] getInterfaces()
Return the set of services produced by the model as a array of classes.

Returns:
the service classes


Copyright © The Apache Software Foundation. All Rights Reserved.