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: * This interface abstracts plug-in attribute, a <ID,VALUE> pair. Plug-in
24: * attributes are not involved into JPF runtime internal logic and intended
25: * to be used by plug-in developers.
26: * @version $Id$
27: */
28: public interface PluginAttribute extends PluginElement<PluginAttribute> {
29: /**
30: * @return attribute value as it is specified in manifest
31: */
32: String getValue();
33:
34: /**
35: * @return collection of all sub-attributes of this attribute
36: */
37: Collection<PluginAttribute> getSubAttributes();
38:
39: /**
40: * @param id ID of sub-attribute to look for
41: * @return sub-attribute with given ID
42: */
43: PluginAttribute getSubAttribute(String id);
44:
45: /**
46: * @param id ID of sub-attribute to look for
47: * @return collection of all sub-attributes with given ID
48: */
49: Collection<PluginAttribute> getSubAttributes(String id);
50:
51: /**
52: * @return attribute, of which this one is child or <code>null</code> if
53: * this is top level attribute
54: */
55: PluginAttribute getSuperAttribute();
56: }
|