View Javadoc

1   /*
2    * Copyright (c) 2004 UNINETT FAS
3    *
4    * This program is free software; you can redistribute it and/or modify it
5    * under the terms of the GNU General Public License as published by the Free
6    * Software Foundation; either version 2 of the License, or (at your option)
7    * any later version.
8    *
9    * This program is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11   * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12   * more details.
13   *
14   * You should have received a copy of the GNU General Public License along with
15   * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16   * Place - Suite 330, Boston, MA 02111-1307, USA.
17   *
18   * $Id: MoriaStoreFactory.java,v 1.7 2004/12/15 13:10:00 jk Exp $
19   */
20  
21  package no.feide.moria.store;
22  
23  /***
24   * Class implementing simple factory pattern returning implementations
25   * of the MoriaStore interface.  Somewhat redundant as we only have one
26   * implementation at the moment.
27   *
28   * @author Bjørn Ola Smievoll <b.o@smievoll.no>
29   * @version $Revision: 1.7 $
30   */
31  public final class MoriaStoreFactory {
32  
33      /***
34       * Default private constructor.
35       */
36      private MoriaStoreFactory() {
37      }
38  
39      /***
40       * Static factory method creates an instance of MoriaStore.
41       *
42       * @return Instance of a MoriaStore implementation
43       * @throws MoriaStoreException
44       *         the constructor of returned implementation may throw this
45       */
46      public static MoriaStore createMoriaStore() throws MoriaStoreException {
47          // TODO: Read class to instantiate from config
48          return new MoriaCacheStore();
49      }
50  }