1 /******************************************************************************* 2 * Copyright (c) 2006, 2012 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.osgi.service.resolver; 15 16 import java.util.Dictionary; 17 import org.osgi.framework.Version; 18 19 /** 20 * A description of a generic capability. 21 * @since 3.2 22 * @noimplement This interface is not intended to be implemented by clients. 23 */ 24 public interface GenericDescription extends BaseDescription { 25 /** 26 * The default type of generic capability. 27 */ 28 public static String DEFAULT_TYPE = "generic"; //$NON-NLS-1$ 29 30 /** 31 * Returns the arbitrary attributes for this description 32 * @return the arbitrary attributes for this description 33 */ getAttributes()34 public Dictionary<String, Object> getAttributes(); 35 36 /** 37 * Returns the type of generic description capability 38 * @return the type of generic description capability 39 */ getType()40 public String getType(); 41 42 /** 43 * This method is deprecated. Capabilities do not always have a 44 * name associated with them. All matching attributes associated 45 * with a capability are available in the attributes of a 46 * capability. This method will return the value of the 47 * attribute with the same key as this capabilities type. 48 * If this attribute's value is not a String then null is 49 * returned. 50 * @deprecated matching should only be done against a capability's 51 * attributes. 52 */ 53 @Override getName()54 public String getName(); 55 56 /** 57 * This method is deprecated. Capabilities do not always have a 58 * version associated with them. All matching attributes associated 59 * with a capability are available in the attributes of a 60 * capability. This method will return the value of the 61 * attribute with the key <code>"version"</code>. 62 * If this attribute's value is not a {@link Version} then null is 63 * returned. 64 * @deprecated matching should only be done against a capability's 65 * attributes. 66 */ 67 @Override getVersion()68 public Version getVersion(); 69 } 70