/* * Copyright 2003-2004 The Apache Software Foundation * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. * * See the License for the specific language governing permissions and * limitations under the License. */ namespace Apache.Avalon.Composition.Model { using System; using Apache.Avalon.Composition.Data; using Apache.Avalon.Framework; using Apache.Avalon.Meta; /// Deployment model defintion. /// /// /// Avalon Development Team /// /// $Revision: 1.1 $ $Date: 2004/02/28 22:15:43 $ /// public interface IComponentModel : IDeploymentModel { /// Test if the component type backing the model is /// parameterizable. /// /// /// TRUE if the component type is parameterizable /// otherwise FALSE /// /* bool Parameterizable { get; }*/ /// Return the deployment type. /// /// /// the type /// TypeDescriptor TypeDescriptor { get; } /// 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. /// /// /// the collection policy /// CollectionPolicy CollectionPolicy { get; set; } /// Return the logging categories. /// the logging categories /// CategoriesDirective Categories { get; set; } /// Set the activation policy for the model. /// the activaltion policy /// ActivationPolicy ActivationPolicy { get; set; } /// Set the activation policy for the model to the default value. void RevertActivationPolicy(); /// Return the class for the deployable target. /// the class /// System.Type DeploymentType { get; } /// Set the configuration to the supplied value. The supplied /// configuration will replace the existing configuration. /// /// /// the supplied configuration /// void SetConfiguration(IConfiguration config); /// Set the configuration to the supplied value. The supplied /// configuration may suppliment or replace the existing configuration. /// /// /// the supplied configuration /// /// 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) /// void SetConfiguration(IConfiguration config, bool policy); /// 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. /// /// /// the qualified configuration /// IConfiguration Configuration { get; } /// Set the parameters to the supplied value. The supplied /// parameters value will replace the existing parameters value. /// /// /// the supplied parameters value /// // void setParameters(Parameters parameters); /// Set the parameters to the supplied value. The supplied /// parameters value may suppliment or replace the existing /// parameters value. /// /// /// the supplied parameters /// /// if TRUE the supplied parameters replaces the current /// parameters value otherwise the existing and supplied values /// are aggregrated /// // void setParameters(Parameters parameters, bool policy); /// Return the parameters to be applied to the component. /// If the the component type does not implementation the /// Parameterizable interface, the implementation returns null. /// /// /// the assigned parameters /// // Parameters getParameters(); /// Rest if the component type backing the model requires the /// establishment of a runtime context. /// /// /// TRUE if the component type requires a runtime /// context otherwise FALSE /// bool IsContextDependent { get; } /// Return the context model for this deployment model. /// /// /// the context model if this model is context dependent, else /// the return value is null /// IContextModel ContextModel { get; } /// Return the dependency models for this deployment model. /// /// /// the dependency models /// IDependencyModel[] DependencyModels { get; } /// Return a dependency model for a supplied descriptor or null /// if no match found. /// /// /// the dependency model /// IDependencyModel GetDependencyModel(DependencyDescriptor dependency); /// Return the stage models for this deployment model. /// /// /// the stage models /// IStageModel[] StageModels { get; } /// Return a stage model matching the supplied descriptor or null /// if no match found. /// /// /// the stage descriptor /// /// the matching stage model /// IStageModel GetStageModel(StageDescriptor stage); /// Return the set of services produced by the model as a array of classes. /// /// /// the service classes /// System.Type[] Interfaces { get; } } }