5602 |
07 Apr 11 |
nicklas |
1 |
/** |
5602 |
07 Apr 11 |
nicklas |
$Id$ |
5602 |
07 Apr 11 |
nicklas |
3 |
|
5602 |
07 Apr 11 |
nicklas |
Copyright (C) 2011 Nicklas Nordborg |
5602 |
07 Apr 11 |
nicklas |
5 |
|
5602 |
07 Apr 11 |
nicklas |
This file is part of BASE - BioArray Software Environment. |
5602 |
07 Apr 11 |
nicklas |
Available at http://base.thep.lu.se/ |
5602 |
07 Apr 11 |
nicklas |
8 |
|
5602 |
07 Apr 11 |
nicklas |
BASE is free software; you can redistribute it and/or |
5602 |
07 Apr 11 |
nicklas |
modify it under the terms of the GNU General Public License |
5602 |
07 Apr 11 |
nicklas |
as published by the Free Software Foundation; either version 3 |
5602 |
07 Apr 11 |
nicklas |
of the License, or (at your option) any later version. |
5602 |
07 Apr 11 |
nicklas |
13 |
|
5602 |
07 Apr 11 |
nicklas |
BASE is distributed in the hope that it will be useful, |
5602 |
07 Apr 11 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
5602 |
07 Apr 11 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5602 |
07 Apr 11 |
nicklas |
GNU General Public License for more details. |
5602 |
07 Apr 11 |
nicklas |
18 |
|
5602 |
07 Apr 11 |
nicklas |
You should have received a copy of the GNU General Public License |
5602 |
07 Apr 11 |
nicklas |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
5602 |
07 Apr 11 |
nicklas |
21 |
*/ |
5602 |
07 Apr 11 |
nicklas |
22 |
package net.sf.basedb.util.extensions.manager; |
5602 |
07 Apr 11 |
nicklas |
23 |
|
5602 |
07 Apr 11 |
nicklas |
24 |
/** |
5602 |
07 Apr 11 |
nicklas |
Instances of object keys should be something that uniquely |
5602 |
07 Apr 11 |
nicklas |
identifies an object that has been defined by an extension. |
5602 |
07 Apr 11 |
nicklas |
Object keys are mainly used to lookup in which file a |
5602 |
07 Apr 11 |
nicklas |
certain object has been defined |
5602 |
07 Apr 11 |
nicklas |
(see {@link ExtensionsManager#getFileByObjectKey(ObjectKey)}) |
5602 |
07 Apr 11 |
nicklas |
and/or to get information about the object itself |
5602 |
07 Apr 11 |
nicklas |
(see {@link ExtensionsFile#getObjectForKey(ObjectKey)}) |
5602 |
07 Apr 11 |
nicklas |
<p> |
5602 |
07 Apr 11 |
nicklas |
33 |
|
5606 |
14 Apr 11 |
nicklas |
It is up to the actual implementations to decide what actually |
5606 |
14 Apr 11 |
nicklas |
makes up a key that can be used to identify an object. Implementors |
5602 |
07 Apr 11 |
nicklas |
of this interface should implement <code>equals()</code> and |
5602 |
07 Apr 11 |
nicklas |
<code>hashCode()</code> methods to only match with it's |
5602 |
07 Apr 11 |
nicklas |
own class. Implementations should be immutable. |
5602 |
07 Apr 11 |
nicklas |
39 |
|
5602 |
07 Apr 11 |
nicklas |
@author Nicklas |
5602 |
07 Apr 11 |
nicklas |
@since 3.0 |
5602 |
07 Apr 11 |
nicklas |
@base.modified $Date$ |
5602 |
07 Apr 11 |
nicklas |
@see ExtensionsManager#getFileByObjectKey(ObjectKey) |
5602 |
07 Apr 11 |
nicklas |
@see ExtensionsFile#getObjectForKey(ObjectKey) |
5602 |
07 Apr 11 |
nicklas |
@param <O> The type of object that the key references |
5602 |
07 Apr 11 |
nicklas |
46 |
*/ |
5602 |
07 Apr 11 |
nicklas |
47 |
public interface ObjectKey<O> |
5606 |
14 Apr 11 |
nicklas |
48 |
{ |
5606 |
14 Apr 11 |
nicklas |
49 |
/** |
5606 |
14 Apr 11 |
nicklas |
Get a string description of the key that is suitable for use |
5606 |
14 Apr 11 |
nicklas |
in (error) messages to users. |
5606 |
14 Apr 11 |
nicklas |
52 |
*/ |
5606 |
14 Apr 11 |
nicklas |
53 |
public String toDescription(); |
5606 |
14 Apr 11 |
nicklas |
54 |
} |