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.jasig.portal.groups.local.EntitySearcherImpl;
09: import org.jasig.portal.groups.local.ITypedEntitySearcher;
10: import org.jasig.portal.groups.local.searchers.RDBMChannelDefSearcher;
11: import org.jasig.portal.groups.local.searchers.RDBMPersonSearcher;
12:
13: /**
14: * Creates an instance of the reference <code>IEntitySearcher</code>.
15: * @author Dan Ellentuck
16: * @version $Revision: 34758 $
17: */
18:
19: public class ReferenceEntitySearcherFactory implements
20: IEntitySearcherFactory {
21: /**
22: * ReferenceGroupServiceFactory constructor.
23: */
24: public ReferenceEntitySearcherFactory() {
25: super ();
26: }
27:
28: /**
29: * Return an instance of the entity searcher implementation.
30: * @return IEntitySearcher
31: * @exception GroupsException
32: */
33: public IEntitySearcher newEntitySearcher() throws GroupsException {
34: return newInstance();
35: }
36:
37: /**
38: * Return an instance of the entity searcher implementation.
39: * @return IEntitySearcher
40: * @exception GroupsException
41: */
42: public IEntitySearcher newInstance() throws GroupsException {
43: ITypedEntitySearcher[] tes = new ITypedEntitySearcher[2];
44: tes[0] = new RDBMChannelDefSearcher();
45: tes[1] = new RDBMPersonSearcher();
46: IEntitySearcher entitySearcher = new EntitySearcherImpl(tes);
47: return entitySearcher;
48: }
49: }
|