/* * 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.Meta; using Apache.Avalon.Composition.Data; /// Containment model is an extended deployment model that aggregates /// a set of models. A containment model describes a logical containment /// context. /// /// /// Avalon Development Team /// /// $Revision: 1.1 $ $Date: 2004/02/28 22:15:43 $ /// public struct IContainmentModel_Fields { public readonly static System.String KEY = "urn:composition:containment.model"; public readonly static System.String SECURE_EXECUTION_KEY = "urn:composition:security.enabled"; } public interface IContainmentModel : IDeploymentModel { /// Get the startup sequence for the model. IDeploymentModel[] StartupGraph { get; } /// Get the shutdown sequence for the model. IDeploymentModel[] ShutdownGraph { get; } /// Return the logging categories. /// the logging categories /// CategoriesDirective Categories { get; set; } /// Return the partition established by the containment model. /// /// /// the partition name /// System.String Partition { get; } /// Return the classloader model. /// /// /// the classloader model /// ITypeLoaderModel TypeLoaderModel { get; } /// Returns true if Secure Execution mode has been enabled in the kernel. /// /// Secure Execution mode enables the deployer to restrict the exection /// environment, and this flag allows for developers to quickly switch /// between the secure and non-secure execution modes. /// /// /// true if Secure Execution mode has been enabled in the kernel. /// /// bool IsSecureExecutionEnabled(); /// Assemble the containment model. /// Exception if an error occurs during model assembly /// void Assemble(); /// Return the set of models nested within this model. /// the classloader model /// IDeploymentModel[] Models { get; } /// Return a model relative to a supplied path. /// /// /// a relative or absolute path /// /// the model or null if the path is unresolvable /// /// IllegalArgumentException if the path if badly formed /// IDeploymentModel GetModel(System.String path); /// Addition of a new subsidiary containment model /// using a supplied profile url. /// /// /// a containment profile url /// /// the model based on the derived profile /// /// ModelException if an error occurs during model establishment /// IContainmentModel AddContainmentModel(System.Uri url); /// Addition of a new subsidiary containment model within /// the containment context using a supplied url. /// /// /// a url referencing a containment profile /// /// containment configuration targets /// /// the model created using the derived profile and configuration /// /// ModelException if an error occurs during model establishment /// IContainmentModel AddContainmentModel(System.Uri block, System.Uri config); /// Addition of a new subsidiary model within /// the containment context using a supplied profile. /// /// /// a containment or deployment profile /// /// the model based on the supplied profile /// /// ModelException if an error occurs during model establishment /// IDeploymentModel AddModel(DeploymentProfile profile); /// Addition of a new subsidiary model within /// the containment context. /// /// /// the model to add /// /// the model /// IDeploymentModel AddModel(IDeploymentModel model); /// Remove a named model from this model. /// the name of an immediate child model /// void RemoveModel(System.String name); /// Return the set of service export models. /// t he export directives /// IServiceModel[] ServiceModels { get; } /// Return a service exoport model matching a supplied class. /// the service model /// IServiceModel GetServiceModel(System.Type clazz); /// Apply a set of override targets resolvable from a supplied url. /// a url resolvable to a TargetDirective[] /// /// ModelException if an error occurs /// void ApplyTargets(System.Uri url); /// Apply a set of override targets. /// a set of target directives /// void ApplyTargets(TargetDirective[] targets); /// Add a composition listener to the model. /// the composition listener /// // void addCompositionListener(CompositionListener listener); /// Remove a composition listener from the model. /// the composition listener /// // void removeCompositionListener(CompositionListener listener); } }