01: /* Copyright 2002 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.groups;
07:
08: import org.apache.commons.logging.Log;
09: import org.apache.commons.logging.LogFactory;
10:
11: /**
12: * Creates an instance of the reference <code>IEntityGroupStore</code>.
13: * @author Dan Ellentuck
14: * @version $Revision: 35418 $
15: */
16:
17: public class ReferenceEntityGroupStoreFactory implements
18: IEntityGroupStoreFactory {
19:
20: private static final Log log = LogFactory
21: .getLog(ReferenceEntityGroupStoreFactory.class);
22:
23: /**
24: * ReferenceGroupServiceFactory constructor.
25: */
26: public ReferenceEntityGroupStoreFactory() {
27: super ();
28: }
29:
30: /**
31: * Return an instance of the group store implementation.
32: * @return IEntityGroupStore
33: * @exception GroupsException
34: */
35: public IEntityGroupStore newGroupStore() throws GroupsException {
36: return newGroupStore(null);
37: }
38:
39: /**
40: * Return an instance of the group store implementation.
41: * @return IEntityGroupStore
42: * @exception GroupsException
43: */
44: public IEntityGroupStore newGroupStore(
45: ComponentGroupServiceDescriptor svcDescriptor)
46: throws GroupsException {
47: return newInstance();
48: }
49:
50: /**
51: * Return an instance of the group store implementation.
52: * @return IEntityGroupStore
53: * @exception GroupsException
54: */
55: public IEntityGroupStore newInstance() throws GroupsException {
56: try {
57: return new RDBMEntityGroupStore();
58: } catch (Exception ex) {
59: log
60: .error("ReferenceEntityGroupStoreFactory.newInstance(): "
61: + ex);
62: throw new GroupsException(ex);
63: }
64: }
65: }
|