KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > boot > PropertyDefinitionCategory


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  * This program 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
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.boot;
21
22 import java.util.Collection JavaDoc;
23
24 /**
25  * Property definitions may be categorised. Implementations of this interface
26  * provide additional data about categories such as the bundle from which to get
27  * resources and the path to use for images.
28  *
29  * @author Brett Smith <a HREF="mailto: brett@3sp.com">&lt;brett@3sp.com&gt;</a>
30  * @see com.sslexplorer.properties.PropertyDatabase
31  */

32 public interface PropertyDefinitionCategory {
33
34     /**
35      * Get the ID for this property category
36      *
37      * @return id
38      */

39     public int getId();
40
41     /**
42      * Get the key for the bundle containing message resources for this category
43      *
44      * @return message bundle key
45      */

46     public String JavaDoc getBundle();
47
48     /**
49      * Get the page for the image for this category
50      *
51      * @return image page
52      */

53     public String JavaDoc getImagePath();
54
55     /**
56      * Add a new child category to this category
57      *
58      * @param category category to add
59      * @return this category
60      */

61     public PropertyDefinitionCategory addCategory(PropertyDefinitionCategory category);
62
63     /**
64      * Remove a child category from this category
65      *
66      * @param category category to remove
67      * @return this category
68      */

69
70     public PropertyDefinitionCategory removeCategory(PropertyDefinitionCategory category);
71
72     /**
73      * Set the parent or <code>null</code> if at the root.
74      *
75      * @param parent parent
76      */

77     public void setParent(PropertyDefinitionCategory parent);
78
79     /**
80      * Get the number of sub-categories
81      *
82      * @return number of sub-categories
83      */

84     public int size();
85
86     /**
87      * Get if this category contains another
88      *
89      * @param category category to test
90      * @return <code>true</code> if this category contains the one specified
91      */

92     public boolean contains(PropertyDefinitionCategory category);
93
94     /**
95      * Get an umodifiable collection of all child categories.
96      *
97      * @return child categories
98      */

99     public Collection JavaDoc<PropertyDefinitionCategory> getCategories();
100
101     /**
102      * Enable / disable this category. When disabled it will not appear in the
103      * user interface.
104      *
105      * @param enabled category enabled
106      */

107     public void setEnabled(boolean enabled);
108
109     /**
110      * Enabled / disable this category. When disabled it will not appear in the
111      * user interface.
112      *
113      * @return category enabled
114      */

115     public boolean isEnabled();
116
117     /**
118      * Get the property class this category is registered under.
119      *
120      * @return property class
121      */

122     public PropertyClass getPropertyClass();
123
124     /**
125      * Set the property class this category is registered under.
126      *
127      * @param propertyClass property class
128      */

129     public void setPropertyClass(PropertyClass propertyClass);
130
131     /**
132      * Get this categories parent or <code>null</code> if there is no parent.
133      *
134      * @return parent
135      */

136     public PropertyDefinitionCategory getParent();
137     
138     /**
139      * Get all definitions found in this category
140      *
141      * @return definitions
142      */

143     public Collection JavaDoc<PropertyDefinition> getDefinitions();
144
145 }
Popular Tags