1/*2 * Copyright 2000-2001,2004 The Apache Software Foundation.3 * 4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.om.registry;
1819import java.util.Iterator;
2021/***22 * <P>23 * The <CODE>CapabilityMap</CODE> interface represents a list that24 * stores capabilities a client is capable of. It is accessed25 * by the portlet container to get information about the client's26 * capabilities.27 * </P>28 * <P>29 * The names of the capabilities are matched by the class variable names30 * of the class <CODE>Capability</CODE>. To add a capability use the31 * 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 Capability37 * @version $Id: CapabilityMap.java,v 1.3 2004/02/23 03:11:39 jford Exp $38 */39publicinterfaceCapabilityMap40 {
4142/***43 * Returns an enumeration of all capabilities a client44 * is capabale of.45 *46 * @return an enumeration of all capabilities47 */48public Iterator getCapabilities();
4950/***51 * Adds the given capability52 *53 * @param name the name of the new capability54 */55publicvoid addCapability(String name);
5657/***58 * Removes the given capability59 *60 * @param name the name of the capability to be removed61 */62publicvoid removeCapability(String name);
6364/***65 * Checks if the argument capability is included in this map66 *67 * @param capabiltiy a capability descriptor68 * @return true if the capability is supported69 */70publicboolean contains(String capability);
7172/***73 * Checks if the all the elements of argument capability map74 * are included in the current one75 *76 * @param map a CapabilityMap implementation to test77 * @return true is all the elements the argument map are included in the78 * current map.79 */80publicboolean containsAll(CapabilityMap map);
8182 }