craigmcc    2004/10/02 12:20:55

  Added:       chain/src/java/org/apache/commons/chain CatalogFactory.java
  Log:
  Commit the proposed CatalogFactory interface, from Sean Schofield.  This is
  primarily for discussion at this point; I'm not (quite) ready to consider it
  to be part of the final API for [chain].
  
  Revision  Changes    Path
  1.1                  
jakarta-commons/chain/src/java/org/apache/commons/chain/CatalogFactory.java
  
  Index: CatalogFactory.java
  ===================================================================
  /*

   * Copyright 1999-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.

   */

  package org.apache.commons.chain;

  

  /**

   * <p>A [EMAIL PROTECTED] CatalogFactory} is a class used to store and retrieve

   * [EMAIL PROTECTED] Catalog}s.  The factory allows for a default [EMAIL PROTECTED] 
Catalog}

   * as well as [EMAIL PROTECTED] Catalog}s stored with a name key.  Follows the

   * Factory pattern (see GoF).</p>

   *

   * @author Sean Schofield 

   * @version $Revision: 1.1 $ $Date: 2004/10/02 19:20:55 $

   */

  

  public interface CatalogFactory {

  

  

      /**

       * <p>Returns a instance of CatalogFactory.</p>

       *

       * @return an instance of CatalogFactory

       */

      public CatalogFactory getInstance();

  

  

      /**

       * <p>Gets the default instance of Catalog associated with the factory.</p>

       *

       * @return the default Catalog instance

       */

      public Catalog getCatalog();

  

  

      /**

       * <p>Sets the default instance of Catalog associated with the factory.</p>

       *

       * @param catalog the default Catalog instance

       */

      public void setCatalog(Catalog catalog);

  

  

      /**

       * <p>Retrieves a Catalog instance by name.</p>

       *

       * @param name the name of the Catalog to retrieve

       * @return the specified Catalog

       */

      public Catalog getCatalog(String name);

  

  

      /**

       * <p>Adds a named instance of Catalog to the factory (for subsequent

       * retrieval later).</p>

       *

       * @param name the name of the Catalog to add

       * @param catalog the Catalog to add

       */

      public void addCatalog(String name, Catalog catalog);

  

  

  }

  

  

  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to