commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-commons/chain/src/java/org/apache/commons/chain CatalogFactory.java
Date Sat, 02 Oct 2004 19:20:55 GMT
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 {@link CatalogFactory} is a class used to store and retrieve
   * {@link Catalog}s.  The factory allows for a default {@link Catalog}
   * as well as {@link 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message