|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.composition.model.impl.DefaultDeploymentModel
org.apache.avalon.composition.model.impl.DefaultComponentModel
Deployment model defintion.
Field Summary |
Fields inherited from interface org.apache.avalon.composition.model.DeploymentModel |
DEPLOYMENT_TIMEOUT_KEY, SEPARATOR |
Constructor Summary | |
DefaultComponentModel(ComponentContext context,
SecurityModel security)
Creation of a new deployment model. |
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. |
boolean |
getDefaultActivationPolicy()
Get the default activation policy for the model. |
DependencyModel |
getDependencyModel(DependencyDescriptor dependency)
Return a dependency model matching the supplied descriptor. |
DependencyModel[] |
getDependencyModels()
Return the dependency models for this component type. |
Class |
getDeploymentClass()
Return the class for the deployable target. |
long |
getDeploymentTimeout()
Return the deployment timeout value for the component. |
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. |
DeploymentModel[] |
getProviders()
Return the set of models assigned as providers. |
ServiceDescriptor[] |
getServices()
Return the set of services produced by the model. |
StageModel |
getStageModel(StageDescriptor stage)
Return a stage model matching the supplied descriptor. |
StageModel[] |
getStageModels()
Return the stage models for this component type. |
Type |
getType()
Return the component type descriptor. |
boolean |
isaCandidate(DependencyDescriptor dependency)
Return TRUE is this model is capable of supporting a supplied depedendency. |
boolean |
isaCandidate(ReferenceDescriptor reference)
Return TRUE is this model is capable of supporting a supplied service. |
boolean |
isaCandidate(StageDescriptor stage)
Return TRUE is this model is capable of supporting a supplied stage dependency. |
boolean |
isAssembled()
Returns the assembled state of the model. |
boolean |
isConfigurable()
Rest if the component type backing the model is configurable. |
boolean |
isParameterizable()
Rest 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 for the model. |
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 class org.apache.avalon.composition.model.impl.DefaultDeploymentModel |
commission, decommission, equals, getAccessControlContext, getCategories, getConsumerGraph, getLogger, getMode, getName, getPath, getPermissions, getProviderGraph, getQualifiedName, release, resolve, resolve, setCategories, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.avalon.composition.model.DeploymentModel |
getAccessControlContext, getCategories, getConsumerGraph, getLogger, getMode, getName, getPath, getProviderGraph, getQualifiedName, 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 |
Constructor Detail |
public DefaultComponentModel(ComponentContext context, SecurityModel security) throws ModelException
context
- the deployment contextMethod Detail |
public boolean getDefaultActivationPolicy()
public boolean isAssembled()
isAssembled
in interface DeploymentModel
public DeploymentModel[] getProviders()
getProviders
in interface DeploymentModel
IllegalStateException
- if the model is not in an assembled statepublic ServiceDescriptor[] getServices()
getServices
in interface DeploymentModel
public boolean isaCandidate(DependencyDescriptor dependency)
isaCandidate
in interface DeploymentModel
dependency
- the dependency descriptor
public boolean isaCandidate(StageDescriptor stage)
isaCandidate
in interface DeploymentModel
stage
- the stage descriptor
public boolean isaCandidate(ReferenceDescriptor reference)
isaCandidate
in interface DeploymentModel
reference
- the service reference descriptor
public int getCollectionPolicy()
getCollectionPolicy
in interface ComponentModel
InfoDescriptor.WEAK
,
InfoDescriptor.SOFT
,
InfoDescriptor.HARD
,
InfoDescriptor.UNDEFINED
public void setCollectionPolicy(int policy)
setCollectionPolicy
in interface ComponentModel
policy
- the collection policyInfoDescriptor.WEAK
,
InfoDescriptor.SOFT
,
InfoDescriptor.HARD
public boolean getActivationPolicy()
getActivationPolicy
in interface ComponentModel
public void setActivationPolicy(boolean policy)
setActivationPolicy
in interface ComponentModel
policy
- the activaltion policypublic Type getType()
getType
in interface ComponentModel
public Class getDeploymentClass()
getDeploymentClass
in interface ComponentModel
public boolean isParameterizable()
isParameterizable
in interface ComponentModel
public void setParameters(Parameters parameters)
setParameters
in interface ComponentModel
parameters
- the supplied parameters value
IllegalStateException
- if the component type backing the
model does not implement the parameteriazable interface
NullPointerException
- if the supplied parameters are nullpublic void setParameters(Parameters parameters, boolean policy) throws IllegalStateException
setParameters
in interface ComponentModel
parameters
- the supplied parameterspolicy
- if TRUE the supplied parameters replaces the current
parameters value otherwise the existing and supplied values
are aggregrated
IllegalStateException
- if the component type backing the
model does not implement the parameteriazable interface
NullPointerException
- if the supplied parameters are nullpublic Parameters getParameters()
getParameters
in interface ComponentModel
public boolean isConfigurable()
public void setConfiguration(Configuration config) throws IllegalStateException, NullPointerException
setConfiguration
in interface ComponentModel
config
- the supplied configuration
IllegalStateException
- if the component type backing the
model does not implement the configurable interface
NullPointerException
- if the supplied configuration is nullpublic void setConfiguration(Configuration config, boolean policy) throws IllegalStateException, NullPointerException
setConfiguration
in interface ComponentModel
config
- the supplied configurationpolicy
- 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)
IllegalStateException
- if the component type backing the
model does not implement the configurable interface
NullPointerException
- if the supplied configuration is nullpublic Configuration getConfiguration()
getConfiguration
in interface ComponentModel
public ContextModel getContextModel()
getContextModel
in interface ComponentModel
ContextModel.isEnabled()
public DependencyModel[] getDependencyModels()
getDependencyModels
in interface ComponentModel
public DependencyModel getDependencyModel(DependencyDescriptor dependency)
getDependencyModel
in interface ComponentModel
dependency
- the dependency descriptor
public StageModel[] getStageModels()
getStageModels
in interface ComponentModel
public StageModel getStageModel(StageDescriptor stage)
getStageModel
in interface ComponentModel
stage
- the stage descriptor
public Class[] getInterfaces()
getInterfaces
in interface ComponentModel
public long getDeploymentTimeout()
getDeploymentTimeout
in interface DeploymentModel
getDeploymentTimeout
in class DefaultDeploymentModel
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |