1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.om.registry;
18
19 import java.util.Iterator;
20
21 /***
22 * <P>
23 * The <CODE>CapabilityMap</CODE> interface represents a list that
24 * stores capabilities a client is capable of. It is accessed
25 * by the portlet container to get information about the client's
26 * capabilities.
27 * </P>
28 * <P>
29 * The names of the capabilities are matched by the class variable names
30 * of the class <CODE>Capability</CODE>. To add a capability use the
31 * class variable name and <B>not</B> the internally used string value.
32 * </P>
33 *
34 * @author <a href="shesmer@raleigh.ibm.com">Stephan Hesmer</a>
35 * @author <a href="raphael@apache.org">Raphaël Luta</a>
36 * @see Capability
37 * @version $Id: CapabilityMap.java,v 1.3 2004/02/23 03:11:39 jford Exp $
38 */
39 public interface CapabilityMap
40 {
41
42 /***
43 * Returns an enumeration of all capabilities a client
44 * is capabale of.
45 *
46 * @return an enumeration of all capabilities
47 */
48 public Iterator getCapabilities();
49
50 /***
51 * Adds the given capability
52 *
53 * @param name the name of the new capability
54 */
55 public void addCapability(String name);
56
57 /***
58 * Removes the given capability
59 *
60 * @param name the name of the capability to be removed
61 */
62 public void removeCapability(String name);
63
64 /***
65 * Checks if the argument capability is included in this map
66 *
67 * @param capabiltiy a capability descriptor
68 * @return true if the capability is supported
69 */
70 public boolean contains(String capability);
71
72 /***
73 * Checks if the all the elements of argument capability map
74 * are included in the current one
75 *
76 * @param map a CapabilityMap implementation to test
77 * @return true is all the elements the argument map are included in the
78 * current map.
79 */
80 public boolean containsAll(CapabilityMap map);
81
82 }