/* * Copyright 2003-2005 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. */ using System; using System.Collections; namespace Agility.Core { /// /// A {@link ICatalog} is a collection of named {@link ICommand}s (or /// {@link IChain}s) that can be used retrieve the set of commands that /// should be performed based on a symbolic identifier. /// /// ///

Use of catalogs is optional, but convenient when there are multiple possible /// chains that can be selected and executed based on environmental conditions.

///
public interface ICatalog { /// /// Add a new name and associated {@link ICommand} or {@link IChain} /// to the set of named commands known to this {@link ICatalog}, /// replacing any previous command for that name. /// /// Name of the new command /// {@link ICommand} or {@link IChain} to be returned void AddCommand(String name, ICommand command); /// /// Return the {@link ICommand} or {@link IChain} associated with the /// specified name, if any; otherwise, return null. /// /// Name for which a {@link ICommand} or {@link IChain} /// should be retrieved ICommand GetCommand(String name); /// /// Return an IEnumerator over the set of named commands /// known to this {@link ICatalog}. /// /// ///

If there are no known commands, an empty IEnumerator is returned.

///
IEnumerator GetNames(); } }