01: /*****************************************************************************
02: * Java Plug-in Framework (JPF)
03: * Copyright (C) 2004-2007 Dmitry Olshansky
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: *****************************************************************************/package org.java.plugin.registry;
19:
20: import java.util.Collection;
21:
22: /**
23: * Interface to collect documentation data for some plug-in element.
24: * @param <T> type of identity this documentation belongs to
25: * @version $Id$
26: */
27: public interface Documentation<T extends Identity> {
28: /**
29: * @return plug-in element caption or empty string
30: */
31: String getCaption();
32:
33: /**
34: * @return main documentation text or empty string
35: */
36: String getText();
37:
38: /**
39: * @return collection of {@link Reference references} in this documentation
40: */
41: Collection<Reference<T>> getReferences();
42:
43: /**
44: * @return element, for which this documentation is provided
45: */
46: T getDeclaringIdentity();
47:
48: /**
49: * Documentation reference.
50: * @param <E> type of identity this documentation reference belongs to
51: * @version $Id$
52: */
53: interface Reference<E extends Identity> {
54: /**
55: * @return the reference as specified in manifest
56: */
57: String getRef();
58:
59: /**
60: * @return text to be used when making link for this reference
61: */
62: String getCaption();
63:
64: /**
65: * @return element, for which this documentation reference is provided
66: */
67: E getDeclaringIdentity();
68: }
69: }
|