4740 |
05 Feb 09 |
nicklas |
1 |
/** |
4740 |
05 Feb 09 |
nicklas |
$Id$ |
4740 |
05 Feb 09 |
nicklas |
3 |
|
4740 |
05 Feb 09 |
nicklas |
Copyright (C) 2008 Nicklas Nordborg |
4740 |
05 Feb 09 |
nicklas |
5 |
|
4740 |
05 Feb 09 |
nicklas |
This file is part of BASE - BioArray Software Environment. |
4740 |
05 Feb 09 |
nicklas |
Available at http://base.thep.lu.se/ |
4740 |
05 Feb 09 |
nicklas |
8 |
|
4740 |
05 Feb 09 |
nicklas |
BASE is free software; you can redistribute it and/or |
4740 |
05 Feb 09 |
nicklas |
modify it under the terms of the GNU General Public License |
4740 |
05 Feb 09 |
nicklas |
as published by the Free Software Foundation; either version 3 |
4740 |
05 Feb 09 |
nicklas |
of the License, or (at your option) any later version. |
4740 |
05 Feb 09 |
nicklas |
13 |
|
4740 |
05 Feb 09 |
nicklas |
BASE is distributed in the hope that it will be useful, |
4740 |
05 Feb 09 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
4740 |
05 Feb 09 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4740 |
05 Feb 09 |
nicklas |
GNU General Public License for more details. |
4740 |
05 Feb 09 |
nicklas |
18 |
|
4740 |
05 Feb 09 |
nicklas |
You should have received a copy of the GNU General Public License |
4740 |
05 Feb 09 |
nicklas |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
4740 |
05 Feb 09 |
nicklas |
21 |
*/ |
4740 |
05 Feb 09 |
nicklas |
22 |
package net.sf.basedb.util.overview.loader; |
4740 |
05 Feb 09 |
nicklas |
23 |
|
4740 |
05 Feb 09 |
nicklas |
24 |
import net.sf.basedb.core.BaseException; |
4740 |
05 Feb 09 |
nicklas |
25 |
import net.sf.basedb.core.ItemNotFoundException; |
4740 |
05 Feb 09 |
nicklas |
26 |
|
4740 |
05 Feb 09 |
nicklas |
27 |
/** |
4740 |
05 Feb 09 |
nicklas |
A node loader factory is a class that know how to |
4740 |
05 Feb 09 |
nicklas |
create {@link NodeLoader}:s for a given key domain. |
4740 |
05 Feb 09 |
nicklas |
30 |
|
4740 |
05 Feb 09 |
nicklas |
@author Nicklas |
4740 |
05 Feb 09 |
nicklas |
@version 2.10 |
4740 |
05 Feb 09 |
nicklas |
@base.modified $Date$ |
4740 |
05 Feb 09 |
nicklas |
34 |
*/ |
4740 |
05 Feb 09 |
nicklas |
35 |
public interface NodeLoaderFactory<L, K> |
4740 |
05 Feb 09 |
nicklas |
36 |
{ |
4740 |
05 Feb 09 |
nicklas |
37 |
|
4740 |
05 Feb 09 |
nicklas |
38 |
/** |
4740 |
05 Feb 09 |
nicklas |
Create a node loader that knows how to load nodes for items |
4740 |
05 Feb 09 |
nicklas |
that are specified by the given key. The key can be almost anything. |
4740 |
05 Feb 09 |
nicklas |
The interpretation of it is entirely up to the factory implementation. |
4740 |
05 Feb 09 |
nicklas |
42 |
|
4740 |
05 Feb 09 |
nicklas |
@param key A key that can be used to identify which items the node |
4740 |
05 Feb 09 |
nicklas |
loader should load |
4740 |
05 Feb 09 |
nicklas |
@return A node loader object |
4740 |
05 Feb 09 |
nicklas |
@throws ItemNotFoundException If a node loader for the given key |
4740 |
05 Feb 09 |
nicklas |
can't be found. NOTE! Instead of throwing an exception it is possible |
4740 |
05 Feb 09 |
nicklas |
to return a {@link NullNodeLoader} or any other "generic" implementation. |
4740 |
05 Feb 09 |
nicklas |
@throws BaseException If there is any other problem creating the |
4740 |
05 Feb 09 |
nicklas |
node loader |
4740 |
05 Feb 09 |
nicklas |
51 |
*/ |
4740 |
05 Feb 09 |
nicklas |
52 |
public NodeLoader<? extends L> createNodeLoader(K key); |
4740 |
05 Feb 09 |
nicklas |
53 |
|
4740 |
05 Feb 09 |
nicklas |
54 |
} |